Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MenuMixin(object):
- def get_context_data(self, **kwargs):
- context = super(object, self).get_context_data(**kwargs)
- context['lates'] = self.model.objects.all()[:20]
- context['local'] = self.model.objects.filter(subtopic='Local')[:20]
- context['featured'] = self.model.objects.order_by('times_viewed')[:20]
- return context
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement