Advertisement
Guest User

Untitled

a guest
Mar 4th, 2012
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.45 KB | None | 0 0
  1. # Django settings for stahlhandel project.
  2. # -*- coding: utf-8 -*-
  3.  
  4. import os
  5. gettext = lambda s: s
  6. PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
  7.  
  8. DEBUG = True
  9. TEMPLATE_DEBUG = DEBUG
  10.  
  11. ADMINS = (
  12.     # ('Doniyor', 'doniyor.v.j@googlemail.com'),
  13. )
  14.  
  15. MANAGERS = ADMINS
  16.  
  17. DATABASES = {
  18.     'default': {
  19.         'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  20.         'NAME': os.path.join(PROJECT_PATH, 'database.sqlite'),
  21.         'USER': '',                      # Not used with sqlite3.
  22.         'PASSWORD': '',                  # Not used with sqlite3.
  23.         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
  24.         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
  25.     }
  26. }
  27.  
  28. # Local time zone for this installation. Choices can be found here:
  29. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  30. # although not all choices may be available on all operating systems.
  31. # On Unix systems, a value of None will cause Django to use the same
  32. # timezone as the operating system.
  33. # If running in a Windows environment this must be set to the same as your
  34. # system time zone.
  35. TIME_ZONE = 'Europe/Munich'
  36.  
  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.  
  41. SITE_ID = 1
  42.  
  43. # If you set this to False, Django will make some optimizations so as not
  44. # to load the internationalization machinery.
  45. USE_I18N = True
  46.  
  47. # If you set this to False, Django will not format dates, numbers and
  48. # calendars according to the current locale.
  49. USE_L10N = True
  50.  
  51. # If you set this to False, Django will not use timezone-aware datetimes.
  52. USE_TZ = True
  53.  
  54. # Absolute filesystem path to the directory that will hold user-uploaded files.
  55. # Example: "/home/media/media.lawrence.com/media/"
  56.  
  57. MEDIA_ROOT = os.path.join(PROJECT_PATH, "media")
  58.  
  59.  
  60. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  61. # trailing slash.
  62. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
  63.  
  64. MEDIA_URL = "/media/"
  65. # Absolute path to the directory static files should be collected to.
  66. # Don't put anything in this directory yourself; store your static files
  67. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  68. # Example: "/home/media/media.lawrence.com/static/"
  69. STATIC_ROOT = os.path.join(PROJECT_PATH, "static")
  70.  
  71. ADMIN_MEDIA_PREFIX = "/static/admin/"
  72.  
  73. # URL prefix for static files.
  74. # Example: "http://media.lawrence.com/static/"
  75. STATIC_URL = '/static/'
  76.  
  77. # Additional locations of static files
  78. STATICFILES_DIRS = (
  79.     # Put strings here, like "/home/html/static" or "C:/www/django/static".
  80.     # Always use forward slashes, even on Windows.
  81.     # Don't forget to use absolute paths, not relative paths.
  82. )
  83.  
  84. # List of finder classes that know how to find static files in
  85. # various locations.
  86. STATICFILES_FINDERS = (
  87.     'django.contrib.staticfiles.finders.FileSystemFinder',
  88.     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  89. #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
  90. )
  91.  
  92. # Make this unique, and don't share it with anybody.
  93. SECRET_KEY = 's_l-!*%v)&ij(*70*uu7y@c1898ehwb6%tip+eg1uv%_enjm3g'
  94.  
  95. # List of callables that know how to import templates from various sources.
  96. TEMPLATE_LOADERS = (
  97.     'django.template.loaders.filesystem.Loader',
  98.     'django.template.loaders.app_directories.Loader',
  99. #     'django.template.loaders.eggs.Loader',
  100. )
  101.  
  102. TEMPLATE_CONTEXT_PROCESSORS = (
  103.     'django.contrib.auth.context_processors.auth',
  104.     'django.core.context_processors.i18n',
  105.     'django.core.context_processors.request',
  106.     'django.core.context_processors.media',
  107.     'django.core.context_processors.static',
  108.     'cms.context_processors.media',
  109.     'sekizai.context_processors.sekizai',
  110. )
  111.  
  112. MIDDLEWARE_CLASSES = (
  113.     'django.middleware.common.CommonMiddleware',
  114.     'django.contrib.sessions.middleware.SessionMiddleware',
  115.     'django.middleware.csrf.CsrfViewMiddleware',
  116.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  117.     'django.contrib.messages.middleware.MessageMiddleware',
  118.     'cms.middleware.multilingual.MultilingualURLMiddleware',
  119.     'cms.middleware.page.CurrentPageMiddleware',
  120.     'cms.middleware.user.CurrentUserMiddleware',
  121.     'cms.middleware.toolbar.ToolbarMiddleware',
  122.     # Uncomment the next line for simple clickjacking protection:
  123.     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  124. )
  125.  
  126. ROOT_URLCONF = 'stahlhandel.urls'
  127.  
  128. # Python dotted path to the WSGI application used by Django's runserver.
  129. WSGI_APPLICATION = 'stahlhandel.wsgi.application'
  130.  
  131. TEMPLATE_DIRS = (
  132.     "template",
  133.     os.path.join(PROJECT_PATH, "template"),
  134.     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  135.     # Always use forward slashes, even on Windows.
  136.     # Don't forget to use absolute paths, not relative paths.
  137. )
  138.  
  139. CMS_TEMPLATES = (
  140.     ('template_1.html', 'Template One'),
  141.     ('template_2.html', 'Template Two'),
  142. )
  143.  
  144. LANGUAGES = [
  145.     ('en', 'English'),
  146. ]
  147.  
  148.  
  149. INSTALLED_APPS = (
  150.     'django.contrib.auth',
  151.     'django.contrib.contenttypes',
  152.     'django.contrib.sessions',
  153.     'django.contrib.sites',
  154.     'django.contrib.messages',
  155.     'django.contrib.staticfiles',
  156.     'django.contrib.admin',
  157.     'stahlhandel',
  158.     'home',
  159.     #cms apps
  160.     'cms',
  161.     'mptt',
  162.     'menus',
  163.     'south',
  164.     'sekizai',
  165.    
  166.     'filer'
  167.     'cmsplugin_filer_file'
  168.     'cmsplugin_filer_folder'
  169.     'cmsplugin_filer_image'
  170.     'cmsplugin_filer_teaser'
  171.     'cmsplugin_filer_video'
  172.  
  173.     #'cms.plugins.twitter',
  174.    
  175.     # Uncomment the next line to enable admin documentation:
  176.     # 'django.contrib.admindocs',
  177. )
  178.  
  179. # A sample logging configuration. The only tangible logging
  180. # performed by this configuration is to send an email to
  181. # the site admins on every HTTP 500 error when DEBUG=False.
  182. # See http://docs.djangoproject.com/en/dev/topics/logging for
  183. # more details on how to customize your logging configuration.
  184. LOGGING = {
  185.     'version': 1,
  186.     'disable_existing_loggers': False,
  187.    
  188.     'handlers': {
  189.         'mail_admins': {
  190.             'level': 'ERROR',
  191.             'class': 'django.utils.log.AdminEmailHandler'
  192.         }
  193.     },
  194.     'loggers': {
  195.         'django.request': {
  196.             'handlers': ['mail_admins'],
  197.             'level': 'ERROR',
  198.             'propagate': True,
  199.         },
  200.     }
  201. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement