settings.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Django settings for celery_http_gateway project.
  2. DEBUG = True
  3. TEMPLATE_DEBUG = DEBUG
  4. CARROT_BACKEND = 'amqp'
  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. # Notes: Django 1.3 deprecated the old-style way of specifying databases,
  12. # using 'django.db.backends.XXX' where XXX is one of:
  13. # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  14. import django
  15. if django.VERSION[:3] > (1, 3):
  16. DATABASE_ENGINE = 'django.db.backends.sqlite3'
  17. else:
  18. DATABASE_ENGINE = 'sqlite3'
  19. # path to database file if using sqlite3.
  20. DATABASE_NAME = 'development.db'
  21. # Not used with sqlite3.
  22. DATABASE_USER = ''
  23. # Not used with sqlite3.
  24. DATABASE_PASSWORD = ''
  25. # Set to empty string for localhost. Not used with sqlite3.
  26. DATABASE_HOST = ''
  27. # Set to empty string for default. Not used with sqlite3.
  28. DATABASE_PORT = ''
  29. DATABASES = {
  30. 'default': {
  31. 'ENGINE': DATABASE_ENGINE,
  32. 'NAME': DATABASE_NAME,
  33. 'USER': DATABASE_USER,
  34. 'PASSWORD': DATABASE_PASSWORD,
  35. 'HOST': DATABASE_HOST,
  36. 'PORT': DATABASE_PORT,
  37. }
  38. }
  39. # Local time zone for this installation. Choices can be found here:
  40. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  41. # although not all choices may be available on all operating systems.
  42. # If running in a Windows environment this must be set to the same as your
  43. # system time zone.
  44. TIME_ZONE = 'America/Chicago'
  45. # Language code for this installation. All choices can be found here:
  46. # http://www.i18nguy.com/unicode/language-identifiers.html
  47. LANGUAGE_CODE = 'en-us'
  48. SITE_ID = 1
  49. # If you set this to False, Django will make some optimizations so as not
  50. # to load the internationalization machinery.
  51. USE_I18N = True
  52. # Absolute path to the directory that holds media.
  53. # Example: "/home/media/media.lawrence.com/"
  54. MEDIA_ROOT = ''
  55. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  56. # trailing slash if there is a path component (optional in other cases).
  57. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  58. MEDIA_URL = ''
  59. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  60. # trailing slash.
  61. # Examples: "http://foo.com/media/", "/media/".
  62. ADMIN_MEDIA_PREFIX = '/media/'
  63. # Make this unique, and don't share it with anybody.
  64. SECRET_KEY = '#1i=edpk55k3781$z-p%b#dbn&n+-rtt83pgz2o9o)v8g7(owq'
  65. # List of callables that know how to import templates from various sources.
  66. TEMPLATE_LOADERS = (
  67. 'django.template.loaders.filesystem.load_template_source',
  68. 'django.template.loaders.app_directories.load_template_source',
  69. )
  70. MIDDLEWARE_CLASSES = (
  71. 'django.middleware.common.CommonMiddleware',
  72. 'django.contrib.sessions.middleware.SessionMiddleware',
  73. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  74. )
  75. ROOT_URLCONF = 'celery_http_gateway.urls'
  76. TEMPLATE_DIRS = (
  77. # Put strings here, like "/home/html/django_templates" or
  78. # "C:/www/django/templates".
  79. # Always use forward slashes, even on Windows.
  80. # Don't forget to use absolute paths, not relative paths.
  81. )
  82. INSTALLED_APPS = (
  83. 'django.contrib.auth',
  84. 'django.contrib.contenttypes',
  85. 'django.contrib.sessions',
  86. 'django.contrib.sites',
  87. 'djcelery',
  88. )