cmpuqrct/settings/base.py
changeset 24 bd646c8d68d8
child 46 24061881238b
equal deleted inserted replaced
23:f9eadb627bb4 24:bd646c8d68d8
       
     1 # Django settings for cmpuqrct project.
       
     2 
       
     3 ADMINS = (
       
     4     # ('Your Name', 'your_email@example.com'),
       
     5 )
       
     6 
       
     7 MANAGERS = ADMINS
       
     8 
       
     9 DATABASES = {
       
    10 
       
    11 }
       
    12 
       
    13 # Hosts/domain names that are valid for this site; required if DEBUG is False
       
    14 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
       
    15 ALLOWED_HOSTS = []
       
    16 
       
    17 # Local time zone for this installation. Choices can be found here:
       
    18 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
       
    19 # although not all choices may be available on all operating systems.
       
    20 # In a Windows environment this must be set to your system time zone.
       
    21 TIME_ZONE = 'UTC'
       
    22 
       
    23 # Language code for this installation. All choices can be found here:
       
    24 # http://www.i18nguy.com/unicode/language-identifiers.html
       
    25 LANGUAGE_CODE = 'en-us'
       
    26 
       
    27 SITE_ID = 1
       
    28 
       
    29 # If you set this to False, Django will make some optimizations so as not
       
    30 # to load the internationalization machinery.
       
    31 USE_I18N = True
       
    32 
       
    33 # If you set this to False, Django will not format dates, numbers and
       
    34 # calendars according to the current locale.
       
    35 USE_L10N = True
       
    36 
       
    37 # If you set this to False, Django will not use timezone-aware datetimes.
       
    38 USE_TZ = True
       
    39 
       
    40 # Absolute filesystem path to the directory that will hold user-uploaded files.
       
    41 # Example: "/var/www/example.com/media/"
       
    42 MEDIA_ROOT = './var/media'
       
    43 
       
    44 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
       
    45 # trailing slash.
       
    46 # Examples: "http://example.com/media/", "http://media.example.com/"
       
    47 MEDIA_URL = '/media/'
       
    48 
       
    49 # Absolute path to the directory static files should be collected to.
       
    50 # Don't put anything in this directory yourself; store your static files
       
    51 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
       
    52 # Example: "/var/www/example.com/static/"
       
    53 STATIC_ROOT = './var/static'
       
    54 
       
    55 # URL prefix for static files.
       
    56 # Example: "http://example.com/static/", "http://static.example.com/"
       
    57 STATIC_URL = '/static/'
       
    58 
       
    59 # Additional locations of static files
       
    60 STATICFILES_DIRS = (
       
    61     # Put strings here, like "/home/html/static" or "C:/www/django/static".
       
    62     # Always use forward slashes, even on Windows.
       
    63     # Don't forget to use absolute paths, not relative paths.
       
    64     './cmpuqrct/static',
       
    65 )
       
    66 
       
    67 # List of finder classes that know how to find static files in
       
    68 # various locations.
       
    69 STATICFILES_FINDERS = (
       
    70     'django.contrib.staticfiles.finders.FileSystemFinder',
       
    71     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
       
    72 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
       
    73 )
       
    74 
       
    75 # List of callables that know how to import templates from various sources.
       
    76 TEMPLATE_LOADERS = (
       
    77     'django.template.loaders.filesystem.Loader',
       
    78     'django.template.loaders.app_directories.Loader',
       
    79 #     'django.template.loaders.eggs.Loader',
       
    80 )
       
    81 
       
    82 MIDDLEWARE_CLASSES = (
       
    83     'django.middleware.common.CommonMiddleware',
       
    84     'django.contrib.sessions.middleware.SessionMiddleware',
       
    85     'django.middleware.csrf.CsrfViewMiddleware',
       
    86     'django.contrib.auth.middleware.AuthenticationMiddleware',
       
    87     'django.contrib.messages.middleware.MessageMiddleware',
       
    88     # Uncomment the next line for simple clickjacking protection:
       
    89     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
       
    90 )
       
    91 
       
    92 ROOT_URLCONF = 'cmpuqrct.urls'
       
    93 
       
    94 # Python dotted path to the WSGI application used by Django's runserver.
       
    95 WSGI_APPLICATION = 'cmpuqrct.wsgi.application'
       
    96 
       
    97 TEMPLATE_DIRS = (
       
    98     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
       
    99     # Always use forward slashes, even on Windows.
       
   100     # Don't forget to use absolute paths, not relative paths.
       
   101 )
       
   102 
       
   103 INSTALLED_APPS = (
       
   104     'qrurls',
       
   105     'django.contrib.auth',
       
   106     'django.contrib.contenttypes',
       
   107     'django.contrib.sessions',
       
   108     'django.contrib.sites',
       
   109     'django.contrib.messages',
       
   110     'django.contrib.staticfiles',
       
   111     'django.contrib.admin',
       
   112     'django.contrib.admindocs',
       
   113     'south',
       
   114 )
       
   115 
       
   116 # A sample logging configuration. The only tangible logging
       
   117 # performed by this configuration is to send an email to
       
   118 # the site admins on every HTTP 500 error when DEBUG=False.
       
   119 # See http://docs.djangoproject.com/en/dev/topics/logging for
       
   120 # more details on how to customize your logging configuration.
       
   121 LOGGING = {
       
   122     'version': 1,
       
   123     'disable_existing_loggers': False,
       
   124     'filters': {
       
   125         'require_debug_false': {
       
   126             '()': 'django.utils.log.RequireDebugFalse'
       
   127         }
       
   128     },
       
   129     'handlers': {
       
   130         'mail_admins': {
       
   131             'level': 'ERROR',
       
   132             'filters': ['require_debug_false'],
       
   133             'class': 'django.utils.log.AdminEmailHandler'
       
   134         }
       
   135     },
       
   136     'loggers': {
       
   137         'django.request': {
       
   138             'handlers': ['mail_admins'],
       
   139             'level': 'ERROR',
       
   140             'propagate': True,
       
   141         },
       
   142     }
       
   143 }