Compare commits
No commits in common. "21624d015b2a195391d6ffda9cd8289cc500848b" and "9873a7db2852730fad855839cdb7866a1a24c3dd" have entirely different histories.
21624d015b
...
9873a7db28
|
|
@ -1,10 +1,7 @@
|
|||
from django.db.models import QuerySet
|
||||
from django.shortcuts import render
|
||||
from django.contrib.auth.mixins import *
|
||||
from django.views.generic import *
|
||||
from .models import *
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
from django.utils.decorators import method_decorator
|
||||
|
||||
|
||||
# Create your views here.
|
||||
|
|
@ -37,7 +34,7 @@ def news(request):
|
|||
ordering = (ordering,)
|
||||
queryset = queryset.order_by(*ordering)
|
||||
|
||||
return render(request, 'blog/home.html', {context_object_name: queryset, 'topics': ['No Updates...']})
|
||||
return render(request, 'blog/home.html', { context_object_name: queryset, 'topics': ['No Updates...'] })
|
||||
|
||||
|
||||
class BlogDetailView(DetailView):
|
||||
|
|
@ -45,7 +42,6 @@ class BlogDetailView(DetailView):
|
|||
template_name = 'blog/blogDetail.html'
|
||||
|
||||
|
||||
@method_decorator(staff_member_required, name='dispatch')
|
||||
class BlogCreateView(LoginRequiredMixin, CreateView):
|
||||
model = Blog
|
||||
template_name = 'blog/blogCreate.html'
|
||||
|
|
@ -59,10 +55,8 @@ class BlogCreateView(LoginRequiredMixin, CreateView):
|
|||
def dev(request):
|
||||
return render(request, 'dev.html', {'title': 'Development'})
|
||||
|
||||
|
||||
def support(request):
|
||||
return render(request, 'support.html', {'title': 'Support Us'})
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, 'index.html', {'title': 'Home'})
|
||||
return render(request, 'index.html', {'title': 'Home'})
|
||||
Loading…
Reference in New Issue