diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-04-26 22:18:42 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-04-26 22:18:42 +0800 |
commit | a2beffe243e20a2cf3d8e24b6f19064a0c8990f5 (patch) | |
tree | bf30e75517b3855b8a6c67bc802d39be5345a426 | |
parent | 53fab66f5b584d071b05f81da34ec136331ad143 (diff) | |
download | django-skaschool-a2beffe243e20a2cf3d8e24b6f19064a0c8990f5.tar.bz2 |
* added 'django-recaptcha' settings
* added 'ALLOWED_CONTENT_TYPES' to settings
* updated 'settings_mysql' and 'settings_production'
-rw-r--r-- | django_skaschool/settings.py | 24 | ||||
-rw-r--r-- | django_skaschool/settings_mysql.py | 30 | ||||
-rw-r--r-- | django_skaschool/settings_production.py | 30 |
3 files changed, 84 insertions, 0 deletions
diff --git a/django_skaschool/settings.py b/django_skaschool/settings.py index f80c964..0a8326d 100644 --- a/django_skaschool/settings.py +++ b/django_skaschool/settings.py @@ -172,4 +172,28 @@ REGISTRATION_OPEN = True RECAPTCHA_PUBLIC_KEY = '6Lf8dvISAAAAAPljExJQcAkx4jDZPOYbTGXYXCME' 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/x-7z-compressed', # 7z + '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 +] + + # vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: diff --git a/django_skaschool/settings_mysql.py b/django_skaschool/settings_mysql.py index 05b02c5..d5e69dd 100644 --- a/django_skaschool/settings_mysql.py +++ b/django_skaschool/settings_mysql.py @@ -44,6 +44,7 @@ THIRD_PARTY_APPS = ( #'south', 'bootstrap3', 'registration', + 'captcha', ) # LOCAL_APPS LOCAL_APPS = ( @@ -176,4 +177,33 @@ ACCOUNT_ACTIVATION_DAYS = 7 # whether registration of new accounts if currently permitted REGISTRATION_OPEN = True +## django-recaptcha +# global key (recaptcha.net) +RECAPTCHA_PUBLIC_KEY = '6Lf8dvISAAAAAPljExJQcAkx4jDZPOYbTGXYXCME' +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/x-7z-compressed', # 7z + '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 +] + + # 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 80eaedf..2d079c6 100644 --- a/django_skaschool/settings_production.py +++ b/django_skaschool/settings_production.py @@ -44,6 +44,7 @@ THIRD_PARTY_APPS = ( #'south', 'bootstrap3', 'registration', + 'captcha', ) # LOCAL_APPS LOCAL_APPS = ( @@ -182,4 +183,33 @@ ACCOUNT_ACTIVATION_DAYS = 7 # whether registration of new accounts if currently permitted REGISTRATION_OPEN = True +## django-recaptcha +# global key (recaptcha.net) +RECAPTCHA_PUBLIC_KEY = '6Lf8dvISAAAAAPljExJQcAkx4jDZPOYbTGXYXCME' +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/x-7z-compressed', # 7z + '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 +] + + # vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: |