Answers for "django class based detail view"

1

django display view library

from django.views.generic.detail import DetailView
Posted by: Guest on March-02-2020
0

django create view class

###### views.py #####
from .forms import  CreateArticleForm
from django.views.generic import CreateView
class ArticleCreateView(CreateView):
    form_class = CreateArticleForm
    template_name = 'articles/create_article.html'
    
###### urls.py  ######
from .views import ArticleCreateView
urlpatterns =[ path('articles/create/', ArticleCreateView.as_view()),]
Posted by: Guest on April-17-2020

Code answers related to "django class based detail view"

Python Answers by Framework

Browse Popular Code Answers by Language