| 1 | # Django settings for running cornetApps project *locally* |
|---|
| 2 | |
|---|
| 3 | DEBUG = True |
|---|
| 4 | TEMPLATE_DEBUG = DEBUG |
|---|
| 5 | |
|---|
| 6 | ADMINS = ( |
|---|
| 7 | # ('Your Name', 'your_email@example.com'), |
|---|
| 8 | ) |
|---|
| 9 | |
|---|
| 10 | MANAGERS = ADMINS |
|---|
| 11 | |
|---|
| 12 | DATABASES = { |
|---|
| 13 | 'default': { |
|---|
| 14 | 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|---|
| 15 | #'NAME': 'cornetApps.db', # Or path to database file if using sqlite3. |
|---|
| 16 | 'NAME': 'cornetApps.db', #webserver |
|---|
| 17 | 'USER': '', # Not used with sqlite3. |
|---|
| 18 | 'PASSWORD': '', # Not used with sqlite3. |
|---|
| 19 | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|---|
| 20 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|---|
| 21 | } |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | # Local time zone for this installation. Choices can be found here: |
|---|
| 25 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|---|
| 26 | # although not all choices may be available on all operating systems. |
|---|
| 27 | # On Unix systems, a value of None will cause Django to use the same |
|---|
| 28 | # timezone as the operating system. |
|---|
| 29 | # If running in a Windows environment this must be set to the same as your |
|---|
| 30 | # system time zone. |
|---|
| 31 | TIME_ZONE = 'America/Chicago' |
|---|
| 32 | |
|---|
| 33 | # Language code for this installation. All choices can be found here: |
|---|
| 34 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|---|
| 35 | LANGUAGE_CODE = 'en-us' |
|---|
| 36 | |
|---|
| 37 | SITE_ID = 1 |
|---|
| 38 | |
|---|
| 39 | # If you set this to False, Django will make some optimizations so as not |
|---|
| 40 | # to load the internationalization machinery. |
|---|
| 41 | USE_I18N = True |
|---|
| 42 | |
|---|
| 43 | # If you set this to False, Django will not format dates, numbers and |
|---|
| 44 | # calendars according to the current locale |
|---|
| 45 | USE_L10N = True |
|---|
| 46 | |
|---|
| 47 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|---|
| 48 | # Example: "/home/media/media.lawrence.com/media/" |
|---|
| 49 | MEDIA_ROOT = '' |
|---|
| 50 | |
|---|
| 51 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|---|
| 52 | # trailing slash. |
|---|
| 53 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|---|
| 54 | MEDIA_URL = 'http://localhost:8000/' |
|---|
| 55 | |
|---|
| 56 | # Absolute path to the directory static files should be collected to. |
|---|
| 57 | # Don't put anything in this directory yourself; store your static files |
|---|
| 58 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|---|
| 59 | # Example: "/home/media/media.lawrence.com/static/" |
|---|
| 60 | |
|---|
| 61 | #STATIC_ROOT = '/home/ossie/workspace/cornetApps/static/' |
|---|
| 62 | STATIC_ROOT = 'static/' #webserver |
|---|
| 63 | |
|---|
| 64 | # URL prefix for static files. |
|---|
| 65 | # Example: "http://media.lawrence.com/static/" |
|---|
| 66 | STATIC_URL = 'http://cornet.wireless.vt.edu/~webdemo/django/static/' #webserver |
|---|
| 67 | #STATIC_URL = '/static/' |
|---|
| 68 | |
|---|
| 69 | #Login redirect url that directs user to next page after logging in |
|---|
| 70 | LOGIN_REDIRECT_URL = '/ossie' |
|---|
| 71 | |
|---|
| 72 | # URL prefix for admin static files -- CSS, JavaScript and images. |
|---|
| 73 | # Make sure to use a trailing slash. |
|---|
| 74 | # Examples: "http://foo.com/static/admin/", "/static/admin/". |
|---|
| 75 | ADMIN_MEDIA_PREFIX = '/static/admin/' |
|---|
| 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 | #'/home/ossie/workspace/cornetApps/HtmlPages/static/', |
|---|
| 83 | '/home/webdemo/cornetApps/HtmlPages/static/', #webserver |
|---|
| 84 | #'/home/webdemo/cornetApps/WebDemo/static/', |
|---|
| 85 | ) |
|---|
| 86 | |
|---|
| 87 | # List of finder classes that know how to find static files in |
|---|
| 88 | # various locations. |
|---|
| 89 | STATICFILES_FINDERS = ( |
|---|
| 90 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|---|
| 91 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|---|
| 92 | #'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|---|
| 93 | ) |
|---|
| 94 | |
|---|
| 95 | # Make this unique, and don't share it with anybody. |
|---|
| 96 | SECRET_KEY = 'xxnv0%@di9(x1h&h(2^z90g1q3zghp(0)-x=!!6xx)xt*y@902' |
|---|
| 97 | |
|---|
| 98 | # List of callables that know how to import templates from various sources. |
|---|
| 99 | TEMPLATE_LOADERS = ( |
|---|
| 100 | 'django.template.loaders.filesystem.Loader', |
|---|
| 101 | 'django.template.loaders.app_directories.Loader', |
|---|
| 102 | # 'django.template.loaders.eggs.Loader', |
|---|
| 103 | ) |
|---|
| 104 | |
|---|
| 105 | MIDDLEWARE_CLASSES = ( |
|---|
| 106 | 'django.middleware.common.CommonMiddleware', |
|---|
| 107 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|---|
| 108 | 'django.middleware.csrf.CsrfViewMiddleware', |
|---|
| 109 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|---|
| 110 | 'django.contrib.messages.middleware.MessageMiddleware', |
|---|
| 111 | ) |
|---|
| 112 | |
|---|
| 113 | ROOT_URLCONF = 'cornetApps.urls' |
|---|
| 114 | #ROOT_URLCONF = 'urls' |
|---|
| 115 | |
|---|
| 116 | TEMPLATE_DIRS = ( |
|---|
| 117 | "templates", |
|---|
| 118 | '/home/webdemo/cornetApps/templates', #webserver |
|---|
| 119 | 'templates/HtmlPages', |
|---|
| 120 | 'templates/WebDash', |
|---|
| 121 | 'templates/DomainMan', |
|---|
| 122 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|---|
| 123 | # Always use forward slashes, even on Windows. |
|---|
| 124 | # Don't forget to use absolute paths, not relative paths. |
|---|
| 125 | ) |
|---|
| 126 | |
|---|
| 127 | INSTALLED_APPS = ( |
|---|
| 128 | 'django.contrib.auth', |
|---|
| 129 | 'django.contrib.contenttypes', |
|---|
| 130 | 'django.contrib.sessions', |
|---|
| 131 | 'django.contrib.sites', |
|---|
| 132 | 'django.contrib.messages', |
|---|
| 133 | 'django.contrib.staticfiles', |
|---|
| 134 | 'HtmlPages', |
|---|
| 135 | 'NodeApp', |
|---|
| 136 | 'DomainMan', |
|---|
| 137 | #'WebDash', |
|---|
| 138 | # Uncomment the next line to enable the admin: |
|---|
| 139 | # 'django.contrib.admin', |
|---|
| 140 | # Uncomment the next line to enable admin documentation: |
|---|
| 141 | # 'django.contrib.admindocs', |
|---|
| 142 | ) |
|---|
| 143 | |
|---|
| 144 | # A sample logging configuration. The only tangible logging |
|---|
| 145 | # performed by this configuration is to send an email to |
|---|
| 146 | # the site admins on every HTTP 500 error. |
|---|
| 147 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
|---|
| 148 | # more details on how to customize your logging configuration. |
|---|
| 149 | LOGGING = { |
|---|
| 150 | 'version': 1, |
|---|
| 151 | 'disable_existing_loggers': False, |
|---|
| 152 | 'handlers': { |
|---|
| 153 | 'mail_admins': { |
|---|
| 154 | 'level': 'ERROR', |
|---|
| 155 | 'class': 'django.utils.log.AdminEmailHandler' |
|---|
| 156 | } |
|---|
| 157 | }, |
|---|
| 158 | 'loggers': { |
|---|
| 159 | 'django.request': { |
|---|
| 160 | 'handlers': ['mail_admins'], |
|---|
| 161 | 'level': 'ERROR', |
|---|
| 162 | 'propagate': True, |
|---|
| 163 | }, |
|---|
| 164 | } |
|---|
| 165 | } |
|---|