This commit is contained in:
Qwann 2017-04-04 21:48:17 +02:00
parent ba11aa49db
commit 7350006990
2 changed files with 44 additions and 44 deletions

View file

@ -756,8 +756,8 @@ class CategoryUpdate(SuccessMessageMixin, UpdateView):
# Article views
# -----
# Article - General
# Article - General
class ArticleList(ListView):
queryset = (Article.objects
.select_related('category')
@ -768,8 +768,8 @@ class ArticleList(ListView):
template_name = 'kfet/article.html'
context_object_name = 'articles'
# Article - Create
# Article - Create
class ArticleCreate(SuccessMessageMixin, CreateView):
model = Article
template_name = 'kfet/article_create.html'
@ -813,8 +813,8 @@ class ArticleCreate(SuccessMessageMixin, CreateView):
# Creating
return super(ArticleCreate, self).form_valid(form)
# Article - Read
# Article - Read
class ArticleRead(DetailView):
model = Article
template_name = 'kfet/article_read.html'
@ -834,8 +834,8 @@ class ArticleRead(DetailView):
context['supplierarts'] = supplierarts
return context
# Article - Update
# Article - Update
class ArticleUpdate(SuccessMessageMixin, UpdateView):
model = Article
template_name = 'kfet/article_update.html'