settings.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import os
  2. import django
  3. from django.conf import global_settings
  4. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  5. SECRET_KEY = '!DJANGO_JET_TESTS!'
  6. DEBUG = True
  7. TEMPLATE_DEBUG = DEBUG
  8. DEBUG_PROPAGATE_EXCEPTIONS = True
  9. ROOT_URLCONF = 'jet.tests.urls'
  10. INSTALLED_APPS = (
  11. 'jet.dashboard',
  12. 'jet',
  13. 'django.contrib.auth',
  14. 'django.contrib.contenttypes',
  15. 'django.contrib.sessions',
  16. 'django.contrib.sites',
  17. 'django.contrib.messages',
  18. 'django.contrib.admin',
  19. 'jet.tests',
  20. )
  21. MIDDLEWARE_CLASSES = (
  22. 'django.contrib.sessions.middleware.SessionMiddleware',
  23. 'django.middleware.common.CommonMiddleware',
  24. 'django.middleware.csrf.CsrfViewMiddleware',
  25. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  26. 'django.contrib.messages.middleware.MessageMiddleware',
  27. )
  28. if django.VERSION[:2] < (1, 9):
  29. TEMPLATE_CONTEXT_PROCESSORS = tuple(global_settings.TEMPLATE_CONTEXT_PROCESSORS) + (
  30. 'django.core.context_processors.request',
  31. )
  32. else:
  33. TEMPLATES = [
  34. {
  35. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  36. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  37. 'APP_DIRS': True,
  38. 'OPTIONS': {
  39. 'context_processors': tuple(global_settings.TEMPLATE_CONTEXT_PROCESSORS) + (
  40. 'django.template.context_processors.request',
  41. )
  42. },
  43. },
  44. ]
  45. DATABASES = {
  46. 'default': {
  47. 'ENGINE': 'django.db.backends.sqlite3',
  48. }
  49. }
  50. TIME_ZONE = 'UTC'
  51. LANGUAGE_CODE = 'en-US'
  52. USE_I18N = True
  53. USE_L10N = True
  54. MEDIA_ROOT = ''
  55. MEDIA_URL = ''
  56. STATIC_URL = '/static/'