DjangoError1 [Django ์๋ฌ] NOT NULL constraint failed: blogapp_blog.pub_date ์์ธ: views.py์์ newblog(์๋ก์ด ๊ธ์์ฐ๋ ํจ์)๋ฅผ ์ ๋ชป ์ ์ํจ. ์๋ฌ ๋ ์ฝ๋ #views.py ์๋ฌ ๋ ์ฝ๋ def newblog(request): if request.method=='POST': blog=BlogPost(request.POST) if blog.is_valid(): blog.save(commit=False) #ํ๋ฆฐ ๋ถ๋ถ blog.pub_date=timezone.now() blog.save() return redirect('home') else: blog=BlogPost() return render(request, 'new.html', {'blog':blog} ์์ ํ ์ฝ๋ #views.py ์์ ํ ์ฝ๋ def newblog(request): if request.metho.. 2020. 7. 17. ์ด์ 1 ๋ค์