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. CARROT_BACKEND = 'amqp'
  6. CELERY_RESULT_BACKEND = 'database'
  7. BROKER_URL = 'amqp://guest:guest@localhost:5672//'
  8. ADMINS = (
  9. # ('Your Name', 'your_email@domain.com'),
  10. )
  11. MANAGERS = ADMINS
  12. DATABASES = {
  13. 'default': {
  14. 'ENGINE': 'django.db.backends.sqlite3',
  15. 'NAME': 'development.db',
  16. 'USER': '',
  17. 'PASSWORD': '',
  18. 'HOST': '',
  19. 'PORT': '',
  20. }
  21. }
  22. if django.VERSION[:3] < (1, 3):
  23. DATABASE_ENGINE = DATABASES['default']['ENGINE']
  24. DATABASE_NAME = DATABASES['default']['NAME']
  25. DATABASE_USER = DATABASES['default']['USER']
  26. DATABASE_PASSWORD = DATABASES['default']['PASSWORD']
  27. DATABASE_HOST = DATABASES['default']['HOST']
  28. DATABASE_PORT = DATABASES['default']['PORT']
  29. # Local time zone for this installation. Choices can be found here:
  30. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  31. # although not all choices may be available on all operating systems.
  32. # If running in a Windows environment this must be set to the same as your
  33. # system time zone.
  34. TIME_ZONE = 'America/Chicago'
  35. # Language code for this installation. All choices can be found here:
  36. # http://www.i18nguy.com/unicode/language-identifiers.html
  37. LANGUAGE_CODE = 'en-us'
  38. SITE_ID = 1
  39. # If you set this to False, Django will make some optimizations so as not
  40. # to load the internationalization machinery.
  41. USE_I18N = True
  42. # Absolute path to the directory that holds media.
  43. # Example: "/home/media/media.lawrence.com/"
  44. MEDIA_ROOT = ''
  45. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  46. # trailing slash if there is a path component (optional in other cases).
  47. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  48. MEDIA_URL = ''
  49. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  50. # trailing slash.
  51. # Examples: "http://foo.com/media/", "/media/".
  52. ADMIN_MEDIA_PREFIX = '/media/'
  53. # Make this unique, and don't share it with anybody.
  54. SECRET_KEY = '#1i=edpk55k3781$z-p%b#dbn&n+-rtt83pgz2o9o)v8g7(owq'
  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. )