SHARE
TWEET
Untitled
a guest
Jun 28th, 2015
195
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- from django.views.generic.detail import DetailView
- from django.utils import timezone
- from articles.models import Article
- class ArticleDetailView(DetailView):
- model = Article
- def get_context_data(self, **kwargs):
- context = super(ArticleDetailView, self).get_context_data(**kwargs)
- context['now'] = timezone.now()
- 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.
