settings.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Django settings for testproj project.
  2. import os
  3. import sys
  4. # import source code dir
  5. sys.path.insert(0, os.path.join(os.getcwd(), os.pardir))
  6. DEBUG = True
  7. TEMPLATE_DEBUG = DEBUG
  8. ADMINS = (
  9. # ('Your Name', 'your_email@domain.com'),
  10. )
  11. TEST_RUNNER = "yadayada.test.run_tests"
  12. TEST_APPS = (
  13. "celery",
  14. )
  15. AMQP_SERVER = "localhost"
  16. AMQP_PORT = 5672
  17. AMQP_VHOST = "celery"
  18. AMQP_USER = "celery"
  19. AMQP_PASSWORD = "celery"
  20. CELERY_AMQP_EXCHANGE = "testcelery"
  21. CELERY_AMQP_ROUTING_KEY = "testcelery"
  22. CELERY_AMQP_CONSUMER_QUEUE = "testcelery"
  23. CELERY_TASK_META_USE_DB = True
  24. MANAGERS = ADMINS
  25. DATABASE_ENGINE = 'sqlite3'
  26. DATABASE_NAME = 'testdb.sqlite'
  27. DATABASE_USER = ''
  28. DATABASE_PASSWORD = ''
  29. DATABASE_HOST = ''
  30. DATABASE_PORT = ''
  31. # Local time zone for this installation. Choices can be found here:
  32. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  33. # although not all choices may be available on all operating systems.
  34. # If running in a Windows environment this must be set to the same as your
  35. # system time zone.
  36. TIME_ZONE = 'America/Chicago'
  37. # Language code for this installation. All choices can be found here:
  38. # http://www.i18nguy.com/unicode/language-identifiers.html
  39. LANGUAGE_CODE = 'en-us'
  40. SITE_ID = 1
  41. # If you set this to False, Django will make some optimizations so as not
  42. # to load the internationalization machinery.
  43. USE_I18N = True
  44. # Absolute path to the directory that holds media.
  45. # Example: "/home/media/media.lawrence.com/"
  46. MEDIA_ROOT = ''
  47. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  48. # trailing slash if there is a path component (optional in other cases).
  49. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  50. MEDIA_URL = ''
  51. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  52. # trailing slash.
  53. # Examples: "http://foo.com/media/", "/media/".
  54. ADMIN_MEDIA_PREFIX = '/media/'
  55. # Make this unique, and don't share it with anybody.
  56. SECRET_KEY = '8j5$cwnv#bcdq(bolyf*#6icpmqn!o7^-q*b#n!=_r3!ol$932'
  57. # List of callables that know how to import templates from various sources.
  58. TEMPLATE_LOADERS = (
  59. 'django.template.loaders.filesystem.load_template_source',
  60. 'django.template.loaders.app_directories.load_template_source',
  61. # 'django.template.loaders.eggs.load_template_source',
  62. )
  63. MIDDLEWARE_CLASSES = (
  64. 'django.middleware.common.CommonMiddleware',
  65. 'django.contrib.sessions.middleware.SessionMiddleware',
  66. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  67. )
  68. ROOT_URLCONF = 'testproj.urls'
  69. TEMPLATE_DIRS = (
  70. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  71. # Always use forward slashes, even on Windows.
  72. # Don't forget to use absolute paths, not relative paths.
  73. )
  74. INSTALLED_APPS = (
  75. 'django.contrib.auth',
  76. 'django.contrib.contenttypes',
  77. 'django.contrib.sessions',
  78. 'django.contrib.sites',
  79. 'celery',
  80. 'someapp',
  81. 'someappwotask',
  82. )
  83. try:
  84. import test_extensions
  85. except ImportError:
  86. pass
  87. else:
  88. INSTALLED_APPS += ("test_extensions", )