diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-04-28 12:12:29 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-04-28 12:12:29 +0800 |
commit | 5af86ee6cbb4d9561c8f0a32d064f1ccd4e4b1cf (patch) | |
tree | 3c88e9e4f301310c9a37ba1fd6ddc5c077412694 /django_skaschool | |
parent | 001dc97e1f68a9782f0c289d890dd1cd6c2075d9 (diff) | |
download | django-skaschool-5af86ee6cbb4d9561c8f0a32d064f1ccd4e4b1cf.tar.bz2 |
* added 'archive' to INSTALLED_APPS
* updated ALLOWED_CONTENT_TYPES settings
Diffstat (limited to 'django_skaschool')
-rw-r--r-- | django_skaschool/settings.py | 53 | ||||
-rw-r--r-- | django_skaschool/settings_mysql.py | 57 | ||||
-rw-r--r-- | django_skaschool/settings_production.py | 57 |
3 files changed, 106 insertions, 61 deletions
diff --git a/django_skaschool/settings.py b/django_skaschool/settings.py index f64e098..7a20a0f 100644 --- a/django_skaschool/settings.py +++ b/django_skaschool/settings.py @@ -51,6 +51,7 @@ LOCAL_APPS = ( 'account', 'page', 'notice', + 'archive', ) # INSTALLED_APPS INSTALLED_APPS = DEFAULT_APPS + THIRD_PARTY_APPS + LOCAL_APPS @@ -175,21 +176,25 @@ RECAPTCHA_PRIVATE_KEY = '6Lf8dvISAAAAAH75mmLlVWOp6JB9Gx6WARR_6HXb' ################################################# ## allowed content types to be uploaded by user ALLOWED_CONTENT_TYPES = [ - 'application/gzip', # gzip - 'application/msword', # doc - 'application/pdf', # pdf - 'application/postscript', # postscript - 'application/rar', # rar + 'application/gzip', # gzip + 'application/msword', # doc + 'application/pdf', # pdf + 'application/postscript', # postscript + 'application/rar', # rar + 'application/vnd.ms-excel', # xls 'application/vnd.oasis.opendocument.spreadsheet', # ods - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # xlsx + 'application/vnd.oasis.opendocument.text', # odt + 'application/vnd.oasis.opendocument.presentation', # odp + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # xlsx 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', # docx - 'application/wps-office.doc', # wps doc/rtf - 'application/wps-office.dps', # wps dps - 'application/wps-office.et', # wps et - 'application/wps-office.ppt', # wps ppt - 'application/wps-office.pptx', # wps pptx - 'application/wps-office.wps', # wps wps - 'application/wps-office.xls', # wps xls + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', # pptx + 'application/wps-office.doc', # wps doc/rtf + 'application/wps-office.dps', # wps dps + 'application/wps-office.et', # wps et + 'application/wps-office.ppt', # wps ppt + 'application/wps-office.pptx', # wps pptx + 'application/wps-office.wps', # wps wps + 'application/wps-office.xls', # wps xls 'application/zip', # zip 'application/x-7z-compressed', # 7z 'application/x-bzip2', # bz2 @@ -197,18 +202,16 @@ ALLOWED_CONTENT_TYPES = [ 'application/x-latex', # latex 'application/x-rar-compressed', # rar 'application/x-tar', # tar - 'image/bmp', # bmp - 'image/gif', # gif - 'image/jpeg', # jpg - 'image/png', # png - 'image/tiff', # tif - 'text/csv', # csv - 'text/html', # html - 'text/plain', # txt - 'text/rtf', # rtf - 'text/xml', # xml - 'text/x-markdown', # markdown - 'text/x-tex', # latex + 'image/bmp', # bmp + 'image/gif', # gif + 'image/jpeg', # jpg + 'image/png', # png + 'image/tiff', # tif + 'text/csv', # csv + 'text/plain', # txt + 'text/rtf', # rtf + 'text/x-markdown', # markdown + 'text/x-tex', # latex ] ## allowed filesize of uploaded files ALLOWED_MAX_UPLOAD_SIZE = 10485760 # 10 MB diff --git a/django_skaschool/settings_mysql.py b/django_skaschool/settings_mysql.py index d5e69dd..c941f0f 100644 --- a/django_skaschool/settings_mysql.py +++ b/django_skaschool/settings_mysql.py @@ -51,6 +51,7 @@ LOCAL_APPS = ( 'account', 'page', 'notice', + 'archive', ) # INSTALLED_APPS INSTALLED_APPS = DEFAULT_APPS + THIRD_PARTY_APPS + LOCAL_APPS @@ -81,11 +82,11 @@ WSGI_APPLICATION = 'django_skaschool.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'django_skaschool', - 'USER': 'astro', - 'PASSWORD': 'astro', - 'HOST': '', # default: localhost - 'PORT': '', # default: 3306 + 'NAME': 'skaschool', + 'USER': 'skaschool', + 'PASSWORD': 'skaschool', + 'HOST': 'localhost', # default: localhost + 'PORT': '3306', # default: 3306 } } @@ -185,25 +186,45 @@ RECAPTCHA_PRIVATE_KEY = '6Lf8dvISAAAAAH75mmLlVWOp6JB9Gx6WARR_6HXb' ################################################# ## allowed content types to be uploaded by user ALLOWED_CONTENT_TYPES = [ - 'application/octet-stream', # arbitrary binary data: doc, ppt, etc. - 'application/pdf', # pdf - 'application/postscript', # postscript - 'application/zip', # zip - 'application/gzip', # gzip + 'application/gzip', # gzip + 'application/msword', # doc + 'application/pdf', # pdf + 'application/postscript', # postscript + 'application/rar', # rar + 'application/vnd.ms-excel', # xls + 'application/vnd.oasis.opendocument.spreadsheet', # ods + 'application/vnd.oasis.opendocument.text', # odt + 'application/vnd.oasis.opendocument.presentation', # odp + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # xlsx + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', # docx + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', # pptx + 'application/wps-office.doc', # wps doc/rtf + 'application/wps-office.dps', # wps dps + 'application/wps-office.et', # wps et + 'application/wps-office.ppt', # wps ppt + 'application/wps-office.pptx', # wps pptx + 'application/wps-office.wps', # wps wps + 'application/wps-office.xls', # wps xls + 'application/zip', # zip 'application/x-7z-compressed', # 7z + 'application/x-bzip2', # bz2 'application/x-dvi', # dvi 'application/x-latex', # latex 'application/x-rar-compressed', # rar 'application/x-tar', # tar - 'image/gif', # gif - 'image/jpeg', # jpg - 'image/png', # png - 'text/html', # html - 'text/plain', # txt - 'text/rtf', # rtf - 'text/xml', # xml - 'text/x-markdown', # markdown + 'image/bmp', # bmp + 'image/gif', # gif + 'image/jpeg', # jpg + 'image/png', # png + 'image/tiff', # tif + 'text/csv', # csv + 'text/plain', # txt + 'text/rtf', # rtf + 'text/x-markdown', # markdown + 'text/x-tex', # latex ] +## allowed filesize of uploaded files +ALLOWED_MAX_UPLOAD_SIZE = 10485760 # 10 MB # vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: diff --git a/django_skaschool/settings_production.py b/django_skaschool/settings_production.py index 2d079c6..bcec886 100644 --- a/django_skaschool/settings_production.py +++ b/django_skaschool/settings_production.py @@ -51,6 +51,7 @@ LOCAL_APPS = ( 'account', 'page', 'notice', + 'archive', ) # INSTALLED_APPS INSTALLED_APPS = DEFAULT_APPS + THIRD_PARTY_APPS + LOCAL_APPS @@ -75,11 +76,11 @@ WSGI_APPLICATION = 'django_skaschool.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'django_skaschool', - 'USER': 'astro', - 'PASSWORD': 'astro', - 'HOST': '', # default: localhost - 'PORT': '', # default: 3306 + 'NAME': 'skaschool', + 'USER': 'skaschool', + 'PASSWORD': 'skaschool', + 'HOST': 'localhost', # default: localhost + 'PORT': '3306', # default: 3306 } } @@ -191,25 +192,45 @@ RECAPTCHA_PRIVATE_KEY = '6Lf8dvISAAAAAH75mmLlVWOp6JB9Gx6WARR_6HXb' ################################################# ## allowed content types to be uploaded by user ALLOWED_CONTENT_TYPES = [ - 'application/octet-stream', # arbitrary binary data: doc, ppt, etc. - 'application/pdf', # pdf - 'application/postscript', # postscript - 'application/zip', # zip - 'application/gzip', # gzip + 'application/gzip', # gzip + 'application/msword', # doc + 'application/pdf', # pdf + 'application/postscript', # postscript + 'application/rar', # rar + 'application/vnd.ms-excel', # xls + 'application/vnd.oasis.opendocument.spreadsheet', # ods + 'application/vnd.oasis.opendocument.text', # odt + 'application/vnd.oasis.opendocument.presentation', # odp + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # xlsx + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', # docx + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', # pptx + 'application/wps-office.doc', # wps doc/rtf + 'application/wps-office.dps', # wps dps + 'application/wps-office.et', # wps et + 'application/wps-office.ppt', # wps ppt + 'application/wps-office.pptx', # wps pptx + 'application/wps-office.wps', # wps wps + 'application/wps-office.xls', # wps xls + 'application/zip', # zip 'application/x-7z-compressed', # 7z + 'application/x-bzip2', # bz2 'application/x-dvi', # dvi 'application/x-latex', # latex 'application/x-rar-compressed', # rar 'application/x-tar', # tar - 'image/gif', # gif - 'image/jpeg', # jpg - 'image/png', # png - 'text/html', # html - 'text/plain', # txt - 'text/rtf', # rtf - 'text/xml', # xml - 'text/x-markdown', # markdown + 'image/bmp', # bmp + 'image/gif', # gif + 'image/jpeg', # jpg + 'image/png', # png + 'image/tiff', # tif + 'text/csv', # csv + 'text/plain', # txt + 'text/rtf', # rtf + 'text/x-markdown', # markdown + 'text/x-tex', # latex ] +## allowed filesize of uploaded files +ALLOWED_MAX_UPLOAD_SIZE = 10485760 # 10 MB # vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: |