Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

settings.py 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. MIDDLEWARE_CLASSES = (
  58. 'django.middleware.common.CommonMiddleware',
  59. 'django.contrib.sessions.middleware.SessionMiddleware',
  60. 'django.middleware.csrf.CsrfViewMiddleware',
  61. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  62. #'debug_toolbar.middleware.DebugToolbarMiddleware',
  63. 'django.contrib.messages.middleware.MessageMiddleware',
  64. 'django.middleware.transaction.TransactionMiddleware',
  65. )
  66. INTERNAL_IPS = ('127.0.0.1',)
  67. ROOT_URLCONF = 'urls'
  68. TEMPLATE_DIRS = (
  69. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  70. # Always use forward slashes, even on Windows.
  71. # Don't forget to use absolute paths, not relative paths.
  72. )
  73. INSTALLED_APPS = (
  74. 'django.contrib.auth',
  75. 'django.contrib.contenttypes',
  76. 'django.contrib.sessions',
  77. 'django.contrib.sites',
  78. 'django.contrib.messages',
  79. 'django.contrib.admin',
  80. # External apps
  81. 'django_extensions',
  82. #'debug_toolbar',
  83. # Apps from oscar
  84. 'oscar',
  85. 'oscar.analytics',
  86. 'oscar.order',
  87. 'oscar.checkout',
  88. 'oscar.shipping',
  89. 'oscar.order_management',
  90. 'oscar.product',
  91. 'oscar.basket',
  92. 'oscar.payment',
  93. 'oscar.offer',
  94. 'oscar.address',
  95. 'oscar.stock',
  96. 'oscar.image',
  97. 'oscar.customer'
  98. )
  99. LOGIN_REDIRECT_URL = '/shop/accounts/profile/'
  100. APPEND_SLASH = True
  101. # Oscar settings
  102. OSCAR_DEFAULT_CURRENCY = 'GBP'
  103. # Local overrides
  104. try:
  105. from local_settings import *
  106. except ImportError:
  107. pass