Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 3 | jlesech | 1 | # Django settings for idreammicro project. |
| 2 | |||
| 5 | jlesech | 3 | import os |
| 4 | PROJECT_ROOT = os.path.dirname(__file__) + '/..' |
||
| 5 | |||
| 3 | jlesech | 6 | DEBUG = True |
| 7 | TEMPLATE_DEBUG = DEBUG |
||
| 8 | |||
| 9 | ADMINS = ( |
||
| 10 | # ('Your Name', 'your_email@example.com'), |
||
| 11 | ) |
||
| 12 | |||
| 13 | MANAGERS = ADMINS |
||
| 14 | |||
| 15 | DATABASES = { |
||
| 16 | 'default': { |
||
| 17 | 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
||
| 18 | 'NAME': '', # Or path to database file if using sqlite3. |
||
| 19 | # The following settings are not used with sqlite3: |
||
| 20 | 'USER': '', |
||
| 21 | 'PASSWORD': '', |
||
| 22 | 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. |
||
| 23 | 'PORT': '', # Set to empty string for default. |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | # Hosts/domain names that are valid for this site; required if DEBUG is False |
||
| 28 | # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts |
||
| 29 | ALLOWED_HOSTS = [] |
||
| 30 | |||
| 31 | # Local time zone for this installation. Choices can be found here: |
||
| 32 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
||
| 33 | # although not all choices may be available on all operating systems. |
||
| 34 | # In a Windows environment this must be set to your system time zone. |
||
| 35 | TIME_ZONE = 'America/Chicago' |
||
| 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: "/var/www/example.com/media/" |
||
| 56 | MEDIA_ROOT = '' |
||
| 57 | |||
| 58 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
||
| 59 | # trailing slash. |
||
| 60 | # Examples: "http://example.com/media/", "http://media.example.com/" |
||
| 61 | MEDIA_URL = '' |
||
| 62 | |||
| 63 | # Absolute path to the directory static files should be collected to. |
||
| 64 | # Don't put anything in this directory yourself; store your static files |
||
| 65 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
||
| 66 | # Example: "/var/www/example.com/static/" |
||
| 5 | jlesech | 67 | STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') |
| 3 | jlesech | 68 | |
| 69 | # URL prefix for static files. |
||
| 70 | # Example: "http://example.com/static/", "http://static.example.com/" |
||
| 71 | STATIC_URL = '/static/' |
||
| 72 | |||
| 73 | # Additional locations of static files |
||
| 74 | STATICFILES_DIRS = ( |
||
| 75 | # Put strings here, like "/home/html/static" or "C:/www/django/static". |
||
| 76 | # Always use forward slashes, even on Windows. |
||
| 77 | # Don't forget to use absolute paths, not relative paths. |
||
| 78 | ) |
||
| 79 | |||
| 80 | # List of finder classes that know how to find static files in |
||
| 81 | # various locations. |
||
| 82 | STATICFILES_FINDERS = ( |
||
| 83 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
||
| 84 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
||
| 85 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
||
| 86 | ) |
||
| 87 | |||
| 88 | # Make this unique, and don't share it with anybody. |
||
| 89 | SECRET_KEY = 'hwsx+cv9@lkwx^of4%&t02sqb(u62zu4nv4$w6-i@#!!l(=pto' |
||
| 90 | |||
| 91 | # List of callables that know how to import templates from various sources. |
||
| 92 | TEMPLATE_LOADERS = ( |
||
| 93 | 'django.template.loaders.filesystem.Loader', |
||
| 94 | 'django.template.loaders.app_directories.Loader', |
||
| 95 | # 'django.template.loaders.eggs.Loader', |
||
| 96 | ) |
||
| 97 | |||
| 98 | MIDDLEWARE_CLASSES = ( |
||
| 99 | 'django.middleware.common.CommonMiddleware', |
||
| 100 | 'django.contrib.sessions.middleware.SessionMiddleware', |
||
| 101 | 'django.middleware.csrf.CsrfViewMiddleware', |
||
| 102 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
||
| 103 | 'django.contrib.messages.middleware.MessageMiddleware', |
||
| 104 | # Uncomment the next line for simple clickjacking protection: |
||
| 105 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
||
| 106 | ) |
||
| 107 | |||
| 108 | ROOT_URLCONF = 'idreammicro.urls' |
||
| 109 | |||
| 110 | # Python dotted path to the WSGI application used by Django's runserver. |
||
| 111 | WSGI_APPLICATION = 'idreammicro.wsgi.application' |
||
| 112 | |||
| 113 | TEMPLATE_DIRS = ( |
||
| 114 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
||
| 115 | # Always use forward slashes, even on Windows. |
||
| 116 | # Don't forget to use absolute paths, not relative paths. |
||
| 117 | ) |
||
| 118 | |||
| 119 | INSTALLED_APPS = ( |
||
| 120 | 'django.contrib.auth', |
||
| 121 | 'django.contrib.contenttypes', |
||
| 122 | 'django.contrib.sessions', |
||
| 123 | 'django.contrib.sites', |
||
| 124 | 'django.contrib.messages', |
||
| 125 | 'django.contrib.staticfiles', |
||
| 126 | # Uncomment the next line to enable the admin: |
||
| 127 | # 'django.contrib.admin', |
||
| 128 | # Uncomment the next line to enable admin documentation: |
||
| 129 | # 'django.contrib.admindocs', |
||
| 130 | 'helloworld', |
||
| 131 | ) |
||
| 132 | |||
| 133 | SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' |
||
| 134 | |||
| 135 | # A sample logging configuration. The only tangible logging |
||
| 136 | # performed by this configuration is to send an email to |
||
| 137 | # the site admins on every HTTP 500 error when DEBUG=False. |
||
| 138 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
||
| 139 | # more details on how to customize your logging configuration. |
||
| 140 | LOGGING = { |
||
| 141 | 'version': 1, |
||
| 142 | 'disable_existing_loggers': False, |
||
| 143 | 'filters': { |
||
| 144 | 'require_debug_false': { |
||
| 145 | '()': 'django.utils.log.RequireDebugFalse' |
||
| 146 | } |
||
| 147 | }, |
||
| 148 | 'handlers': { |
||
| 149 | 'mail_admins': { |
||
| 150 | 'level': 'ERROR', |
||
| 151 | 'filters': ['require_debug_false'], |
||
| 152 | 'class': 'django.utils.log.AdminEmailHandler' |
||
| 153 | } |
||
| 154 | }, |
||
| 155 | 'loggers': { |
||
| 156 | 'django.request': { |
||
| 157 | 'handlers': ['mail_admins'], |
||
| 158 | 'level': 'ERROR', |
||
| 159 | 'propagate': True, |
||
| 160 | }, |
||
| 161 | } |
||
| 162 | } |