daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Jun 28th, 2015 195 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.views.generic.detail import DetailView
  2. from django.utils import timezone
  3.  
  4. from articles.models import Article
  5.  
  6. class ArticleDetailView(DetailView):
  7.  
  8.     model = Article
  9.  
  10.     def get_context_data(self, **kwargs):
  11.         context = super(ArticleDetailView, self).get_context_data(**kwargs)
  12.         context['now'] = timezone.now()
  13.         return context
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top