You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.py 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import os
  2. # Django settings for oscar project.
  3. PROJECT_DIR = os.path.dirname(__file__)
  4. DEBUG = True
  5. TEMPLATE_DEBUG = DEBUG
  6. ADMINS = (
  7. # ('Your Name', 'your_email@domain.com'),
  8. )
  9. MANAGERS = ADMINS
  10. DATABASES = {
  11. 'default': {
  12. 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  13. 'NAME': '', # Or path to database file if using sqlite3.
  14. 'USER': '', # Not used with sqlite3.
  15. 'PASSWORD': '', # Not used with sqlite3.
  16. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  17. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  18. }
  19. }
  20. # Local time zone for this installation. Choices can be found here:
  21. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  22. # although not all choices may be available on all operating systems.
  23. # On Unix systems, a value of None will cause Django to use the same
  24. # timezone as the operating system.
  25. # If running in a Windows environment this must be set to the same as your
  26. # system time zone.
  27. TIME_ZONE = 'Europe/London'
  28. # Language code for this installation. All choices can be found here:
  29. # http://www.i18nguy.com/unicode/language-identifiers.html
  30. LANGUAGE_CODE = 'en-us'
  31. SITE_ID = 1
  32. # If you set this to False, Django will make some optimizations so as not
  33. # to load the internationalization machinery.
  34. USE_I18N = True
  35. # If you set this to False, Django will not format dates, numbers and
  36. # calendars according to the current locale
  37. USE_L10N = True
  38. # Absolute path to the directory that holds media.
  39. # Example: "/home/media/media.lawrence.com/"
  40. MEDIA_ROOT = os.path.join(PROJECT_DIR, "assets")
  41. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  42. # trailing slash if there is a path component (optional in other cases).
  43. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  44. MEDIA_URL = '/media/'
  45. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  46. # trailing slash.
  47. # Examples: "http://foo.com/media/", "/media/".
  48. ADMIN_MEDIA_PREFIX = '/media/admin/'
  49. # Make this unique, and don't share it with anybody.
  50. SECRET_KEY = '$)a7n&o80u!6y5t-+jrd3)3!%vh&shg$wqpjpxc!ar&p#!)n1a'
  51. # List of callables that know how to import templates from various sources.
  52. TEMPLATE_LOADERS = (
  53. 'django.template.loaders.filesystem.Loader',
  54. 'django.template.loaders.app_directories.Loader',
  55. # 'django.template.loaders.eggs.Loader',
  56. )
  57. TEMPLATE_CONTEXT_PROCESSORS = (
  58. 'oscar.marketing.context_processors.banners',
  59. 'django.contrib.auth.context_processors.auth',
  60. )
  61. MIDDLEWARE_CLASSES = (
  62. 'django.middleware.common.CommonMiddleware',
  63. 'django.contrib.sessions.middleware.SessionMiddleware',
  64. 'django.middleware.csrf.CsrfViewMiddleware',
  65. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  66. #'debug_toolbar.middleware.DebugToolbarMiddleware',
  67. 'django.contrib.messages.middleware.MessageMiddleware',
  68. 'django.middleware.transaction.TransactionMiddleware',
  69. )
  70. INTERNAL_IPS = ('127.0.0.1',)
  71. ROOT_URLCONF = 'urls'
  72. TEMPLATE_DIRS = (
  73. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  74. # Always use forward slashes, even on Windows.
  75. # Don't forget to use absolute paths, not relative paths.
  76. )
  77. INSTALLED_APPS = (
  78. 'django.contrib.auth',
  79. 'django.contrib.contenttypes',
  80. 'django.contrib.sessions',
  81. 'django.contrib.sites',
  82. 'django.contrib.messages',
  83. 'django.contrib.admin',
  84. # External apps
  85. 'django_extensions',
  86. #'debug_toolbar',
  87. # Apps from oscar
  88. 'oscar',
  89. 'oscar.analytics',
  90. 'oscar.order',
  91. 'oscar.checkout',
  92. 'oscar.shipping',
  93. 'oscar.order_management',
  94. 'oscar.product',
  95. 'oscar.basket',
  96. 'oscar.payment',
  97. 'oscar.offer',
  98. 'oscar.address',
  99. 'oscar.stock',
  100. 'oscar.image',
  101. 'oscar.customer',
  102. 'oscar.marketing',
  103. )
  104. LOGIN_REDIRECT_URL = '/shop/accounts/profile/'
  105. APPEND_SLASH = True
  106. # Oscar settings
  107. OSCAR_DEFAULT_CURRENCY = 'GBP'
  108. # Local overrides
  109. try:
  110. from local_settings import *
  111. except ImportError:
  112. pass