Skip to content

Instantly share code, notes, and snippets.

@dimiro1
Created January 5, 2014 02:39
Show Gist options
  • Save dimiro1/8263596 to your computer and use it in GitHub Desktop.
Save dimiro1/8263596 to your computer and use it in GitHub Desktop.
class ExtraMixin(object):
def get_context_data(self):
context = super(ExtraMixin, self).get_context_data()
context['random'] = RandomModel.objects.all()
return context
class MyBeatifulView(ExtraMixin, TemplateView):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment