deb-python-jingo/fake_settings.py
James Socol 64402d2fcc Use the Django>=1.7 app registry
- Drops support for anything < 1.7.
- Use `django.apps.apps.get_app_configs()` for template loaders and
  helper discovery.
- Delays environment creation as long as possible, and caches it, should
  fix #50.
- Removes direct access to jingo.env, use jingo.get_env() instead.
- Removes env dependency from Registry().
- Moves Template() higher in the module and sets
  Environment().template_class directly.
- Adds `django.contrib.admin.apps.SimpleAdminConfig` to test settings
  to ensure support for AppConfig classes, fixes #68.
2015-09-21 12:55:35 -04:00

21 lines
522 B
Python

import os
path = lambda *a: os.path.join(ROOT, *a)
ROOT = os.path.dirname(os.path.abspath(__file__))
INSTALLED_APPS = (
'django.contrib.admin.apps.SimpleAdminConfig',
'jingo.tests.jinja_app',
'jingo.tests.django_app',
)
TEMPLATE_LOADERS = (
'jingo.Loader',
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
TEMPLATE_DIRS = (path('jingo/tests/templates'),)
JINGO_EXCLUDE_APPS = ('django_app',)
ROOT_URLCONF = 'jingo.tests.urls'
SECRET_KEY = 'jingo'