Darkolius

Untitled

Nov 28th, 2020
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. class ArticleCreateView(generic.CreateView):
  2.     template_name = 'blog/article_create.html'
  3.     context_object_name = 'article'
  4.     model = Article
  5.     fields = ['author', 'title', 'content']
  6.  
  7.     def get_success_url(self):
  8.         return reverse('blog:article-list')
Advertisement
Add Comment
Please, Sign In to add comment