macros.py 466 B

12345678910111213141516
  1. import django
  2. from django.conf import settings
  3. def define_env(env):
  4. """
  5. This is the hook for defining variables, macros and filters
  6. - variables: the dictionary that contains the environment variables
  7. - macro: a decorator function, to declare a macro.
  8. - filter: a function with one of more arguments,
  9. used to perform a transformation
  10. """
  11. if not settings.configured:
  12. settings.configure(DEBUG=True)
  13. django.setup()