Advertisement
Guest User

Untitled

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