context.py 375 B

123456789101112
  1. from django.template import Context
  2. from sekizai.context_processors import sekizai
  3. class SekizaiContext(Context):
  4. """
  5. An alternative context to be used instead of RequestContext in places where
  6. no request is available.
  7. """
  8. def __init__(self, *args, **kwargs):
  9. super(SekizaiContext, self).__init__(*args, **kwargs)
  10. self.update(sekizai())