settings.py 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Django settings for celery_http_gateway project.
  2. import django
  3. DEBUG = True
  4. TEMPLATE_DEBUG = DEBUG
  5. CELERY_RESULT_BACKEND = 'database'
  6. BROKER_URL = 'amqp://guest:guest@localhost:5672//'
  7. ADMINS = (
  8. # ('Your Name', 'your_email@domain.com'),
  9. )
  10. MANAGERS = ADMINS
  11. DATABASES = {
  12. 'default': {
  13. 'ENGINE': 'django.db.backends.sqlite3',
  14. 'NAME': 'development.db',
  15. 'USER': '',
  16. 'PASSWORD': '',
  17. 'HOST': '',
  18. 'PORT': '',
  19. }
  20. }
  21. if django.VERSION[:3] < (1, 3):
  22. DATABASE_ENGINE = DATABASES['default']['ENGINE']
  23. DATABASE_NAME = DATABASES['default']['NAME']
  24. DATABASE_USER = DATABASES['default']['USER']
  25. DATABASE_PASSWORD = DATABASES['default']['PASSWORD']
  26. DATABASE_HOST = DATABASES['default']['HOST']
  27. DATABASE_PORT = DATABASES['default']['PORT']
  28. # Local time zone for this installation. Choices can be found here:
  29. # https://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  30. # although not all choices may be available on all operating systems.
  31. # If running in a Windows environment this must be set to the same as your
  32. # system time zone.
  33. TIME_ZONE = 'America/Chicago'
  34. # Language code for this installation. All choices can be found here:
  35. # http://www.i18nguy.com/unicode/language-identifiers.html
  36. LANGUAGE_CODE = 'en-us'
  37. SITE_ID = 1
  38. # If you set this to False, Django will make some optimizations so as not
  39. # to load the internationalization machinery.
  40. USE_I18N = True
  41. # Absolute path to the directory that holds media.
  42. # Example: '/home/media/media.lawrence.com/'
  43. MEDIA_ROOT = ''
  44. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  45. # trailing slash if there's a path component (optional in other cases).
  46. # Examples: 'http://media.lawrence.com', 'http://example.com/media/'
  47. MEDIA_URL = ''
  48. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  49. # trailing slash.
  50. # Examples: 'http://foo.com/media/', '/media/'.
  51. ADMIN_MEDIA_PREFIX = '/media/'
  52. # Make this unique, and don't share it with anybody.
  53. # XXX TODO FIXME Set this secret key to anything you want, just change it!
  54. SECRET_KEY = 'This is not a secret, be sure to change this.'
  55. # List of callables that know how to import templates from various sources.
  56. TEMPLATE_LOADERS = (
  57. 'django.template.loaders.filesystem.load_template_source',
  58. 'django.template.loaders.app_directories.load_template_source',
  59. )
  60. MIDDLEWARE_CLASSES = (
  61. 'django.middleware.common.CommonMiddleware',
  62. 'django.contrib.sessions.middleware.SessionMiddleware',
  63. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  64. )
  65. ROOT_URLCONF = 'celery_http_gateway.urls'
  66. TEMPLATE_DIRS = (
  67. # Put strings here, like '/home/html/django_templates' or
  68. # 'C:/www/django/templates'.
  69. # Always use forward slashes, even on Windows.
  70. # Don't forget to use absolute paths, not relative paths.
  71. )
  72. INSTALLED_APPS = (
  73. 'django.contrib.auth',
  74. 'django.contrib.contenttypes',
  75. 'django.contrib.sessions',
  76. 'django.contrib.sites',
  77. 'djcelery',
  78. )