예제 #1
0
 def get_context_data(self, **kwargs):
     context = super(WhatIsNewListView, self).get_context_data(**kwargs)
     context['latest'] = NewStuff.objects.all()
     context['now'] = timezone.now()
     context['is_staff'] = get_current_user().is_staff
     if settings.DEBUG:
         print("is staff?", context['is_staff'])
     return context
예제 #2
0
 def get_context_data(self, **kwargs):
     context = super(WhatIsNewDeleteView, self).get_context_data(**kwargs)
     context['is_staff'] = get_current_user().is_staff
     if settings.DEBUG:
         print("Delete View: is staff?", context['is_staff'])
     return context