settings.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. # http://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 is 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. SECRET_KEY = '#1i=edpk55k3781$z-p%b#dbn&n+-rtt83pgz2o9o)v8g7(owq'
  54. # List of callables that know how to import templates from various sources.
  55. TEMPLATE_LOADERS = (
  56. 'django.template.loaders.filesystem.load_template_source',
  57. 'django.template.loaders.app_directories.load_template_source',
  58. )
  59. MIDDLEWARE_CLASSES = (
  60. 'django.middleware.common.CommonMiddleware',
  61. 'django.contrib.sessions.middleware.SessionMiddleware',
  62. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  63. )
  64. ROOT_URLCONF = 'celery_http_gateway.urls'
  65. TEMPLATE_DIRS = (
  66. # Put strings here, like "/home/html/django_templates" or
  67. # "C:/www/django/templates".
  68. # Always use forward slashes, even on Windows.
  69. # Don't forget to use absolute paths, not relative paths.
  70. )
  71. INSTALLED_APPS = (
  72. 'django.contrib.auth',
  73. 'django.contrib.contenttypes',
  74. 'django.contrib.sessions',
  75. 'django.contrib.sites',
  76. 'djcelery',
  77. )