diff options
Diffstat (limited to '97suifangqa/settings.py')
-rw-r--r-- | 97suifangqa/settings.py | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/97suifangqa/settings.py b/97suifangqa/settings.py index b36f4f0..9dd3fc9 100644 --- a/97suifangqa/settings.py +++ b/97suifangqa/settings.py @@ -25,23 +25,55 @@ DATABASES = { FILE_SITE = "http://127.0.0.1:8000" +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# In a Windows environment this must be set to your system time zone. TIME_ZONE = 'Asia/Shanghai' +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'zh-cn' SITE_ID = 1 +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. USE_I18N = True +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale. USE_L10N = True +# If you set this to False, Django will not use timezone-aware datetimes. +USE_TZ = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = path('media') -MEDIA_URL = '/site_media/' +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash. +# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" +# MEDIA_URL = '/site_media/' +MEDIA_URL = '/media/' + +# Absolute path to the directory static files should be collected to. +# Don't put anything in this directory yourself; store your static files +# in apps' "static/" subdirectories and in STATICFILES_DIRS. +# Example: "/home/media/media.lawrence.com/static/" STATIC_ROOT = path('../static') + +# URL prefix for static files. +# Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' -ADMIN_MEDIA_PREFIX = '/static/admin/' +# URL prefix for admin static files -- CSS, JavaScript and images. +# Make sure to use a trailing slash. +# Examples: "http://foo.com/static/admin/", "/static/admin/". +ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' + +# Additional locations of static files STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. @@ -78,11 +110,16 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + # Uncomment the next line for simple clickjacking protection: + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'urls' TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. path("templates"), ) @@ -102,7 +139,10 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', + # Uncomment the next line to enable the admin: 'django.contrib.admin', + # Uncomment the next line to enable admin documentation: + # 'django.contrib.admindocs', 'haystack', 'profile', 'location', |