codeforlife-portal 1.0.0.post0.dev44__py2-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codeforlife_portal-1.0.0.post0.dev44.dist-info/DESCRIPTION.rst +3 -0
- codeforlife_portal-1.0.0.post0.dev44.dist-info/METADATA +53 -0
- codeforlife_portal-1.0.0.post0.dev44.dist-info/RECORD +142 -0
- codeforlife_portal-1.0.0.post0.dev44.dist-info/WHEEL +5 -0
- codeforlife_portal-1.0.0.post0.dev44.dist-info/metadata.json +1 -0
- codeforlife_portal-1.0.0.post0.dev44.dist-info/top_level.txt +4 -0
- deploy/__init__.py +36 -0
- deploy/captcha.py +38 -0
- deploy/mail.py +93 -0
- deploy/middleware/__init__.py +0 -0
- deploy/middleware/basicauth.py +24 -0
- deploy/middleware/exceptionlogging.py +8 -0
- deploy/permissions.py +2 -0
- deploy/settings.py +288 -0
- deploy/urls.py +22 -0
- deploy/views.py +5 -0
- deploy/wsgi.py +14 -0
- portal/__init__.py +40 -0
- portal/_version.py +21 -0
- portal/app_settings.py +49 -0
- portal/autoconfig.py +167 -0
- portal/beta.py +44 -0
- portal/emailMessages.py +189 -0
- portal/forms/__init__.py +36 -0
- portal/forms/admin_login.py +46 -0
- portal/forms/auth_forms.py +72 -0
- portal/forms/home.py +51 -0
- portal/forms/organisation.py +123 -0
- portal/forms/play.py +238 -0
- portal/forms/registration.py +220 -0
- portal/forms/teach.py +513 -0
- portal/helpers/__init__.py +36 -0
- portal/helpers/email.py +109 -0
- portal/helpers/generators.py +79 -0
- portal/helpers/location.py +138 -0
- portal/helpers/password.py +44 -0
- portal/middleware/__init__.py +36 -0
- portal/middleware/ratelimit_login_attempts.py +57 -0
- portal/migrations/0001_squashed_0041_new_news.py +574 -0
- portal/migrations/0042_school_country.py +55 -0
- portal/migrations/0043_auto_20150430_0952.py +55 -0
- portal/migrations/0044_auto_20150430_0959.py +71 -0
- portal/migrations/0045_auto_20150430_1446.py +55 -0
- portal/migrations/0046_auto_20150723_1101.py +54 -0
- portal/migrations/__init__.py +36 -0
- portal/models.py +204 -0
- portal/permissions.py +70 -0
- portal/templatetags/__init__.py +36 -0
- portal/templatetags/app_tags.py +119 -0
- portal/templatetags/table_tags.py +57 -0
- portal/tests/__init__.py +36 -0
- portal/tests/base_test.py +83 -0
- portal/tests/base_test_migration.py +67 -0
- portal/tests/pageObjects/__init__.py +36 -0
- portal/tests/pageObjects/portal/__init__.py +36 -0
- portal/tests/pageObjects/portal/about_page.py +43 -0
- portal/tests/pageObjects/portal/admin/__init__.py +36 -0
- portal/tests/pageObjects/portal/admin/admin_base_page.py +73 -0
- portal/tests/pageObjects/portal/admin/admin_data_page.py +45 -0
- portal/tests/pageObjects/portal/admin/admin_login_page.py +75 -0
- portal/tests/pageObjects/portal/admin/admin_map_page.py +45 -0
- portal/tests/pageObjects/portal/base_page.py +156 -0
- portal/tests/pageObjects/portal/contact_page.py +43 -0
- portal/tests/pageObjects/portal/email_verification_needed_page.py +49 -0
- portal/tests/pageObjects/portal/forbidden_page.py +44 -0
- portal/tests/pageObjects/portal/game_page.py +135 -0
- portal/tests/pageObjects/portal/help_and_support_page.py +43 -0
- portal/tests/pageObjects/portal/home_page.py +48 -0
- portal/tests/pageObjects/portal/play/__init__.py +36 -0
- portal/tests/pageObjects/portal/play/account_page.py +62 -0
- portal/tests/pageObjects/portal/play/dashboard_page.py +52 -0
- portal/tests/pageObjects/portal/play/join_school_or_club_page.py +51 -0
- portal/tests/pageObjects/portal/play/play_base_page.py +60 -0
- portal/tests/pageObjects/portal/play_page.py +187 -0
- portal/tests/pageObjects/portal/teach/__init__.py +36 -0
- portal/tests/pageObjects/portal/teach/account_page.py +80 -0
- portal/tests/pageObjects/portal/teach/add_independent_student_to_class_page.py +51 -0
- portal/tests/pageObjects/portal/teach/added_independent_student_to_class_page.py +50 -0
- portal/tests/pageObjects/portal/teach/class_page.py +193 -0
- portal/tests/pageObjects/portal/teach/class_settings_page.py +84 -0
- portal/tests/pageObjects/portal/teach/classes_page.py +76 -0
- portal/tests/pageObjects/portal/teach/dashboard_page.py +43 -0
- portal/tests/pageObjects/portal/teach/dismiss_students_page.py +65 -0
- portal/tests/pageObjects/portal/teach/move_class_page.py +63 -0
- portal/tests/pageObjects/portal/teach/move_students_disambiguate_page.py +55 -0
- portal/tests/pageObjects/portal/teach/move_students_page.py +63 -0
- portal/tests/pageObjects/portal/teach/new_students_page.py +55 -0
- portal/tests/pageObjects/portal/teach/organisation_create_page.py +90 -0
- portal/tests/pageObjects/portal/teach/organisation_manage_page.py +94 -0
- portal/tests/pageObjects/portal/teach/organisation_revoke_page.py +53 -0
- portal/tests/pageObjects/portal/teach/teach_base_page.py +83 -0
- portal/tests/pageObjects/portal/teach/thanks_for_reset_page.py +45 -0
- portal/tests/pageObjects/portal/teach_page.py +90 -0
- portal/tests/pageObjects/portal/terms_page.py +43 -0
- portal/tests/pageObjects/registration/__init__.py +36 -0
- portal/tests/pageObjects/registration/independent_student_login_form_page.py +53 -0
- portal/tests/pageObjects/registration/password_reset_form_page.py +61 -0
- portal/tests/pageObjects/registration/student_password_reset_form_page.py +58 -0
- portal/tests/pageObjects/registration/teacher_password_reset_form_page.py +59 -0
- portal/tests/test_admin.py +148 -0
- portal/tests/test_class.py +176 -0
- portal/tests/test_independent_student.py +129 -0
- portal/tests/test_independent_student_joins_a_class.py +75 -0
- portal/tests/test_location.py +224 -0
- portal/tests/test_migration_country.py +130 -0
- portal/tests/test_navigation.py +108 -0
- portal/tests/test_organisation.py +225 -0
- portal/tests/test_school_student.py +101 -0
- portal/tests/test_teacher.py +193 -0
- portal/tests/test_teacher_student.py +244 -0
- portal/tests/utils/__init__.py +36 -0
- portal/tests/utils/classes.py +97 -0
- portal/tests/utils/email.py +103 -0
- portal/tests/utils/messages.py +67 -0
- portal/tests/utils/organisation.py +81 -0
- portal/tests/utils/student.py +114 -0
- portal/tests/utils/teacher.py +73 -0
- portal/urls.py +175 -0
- portal/views/__init__.py +36 -0
- portal/views/admin.py +308 -0
- portal/views/email.py +77 -0
- portal/views/home.py +345 -0
- portal/views/organisation.py +379 -0
- portal/views/play.py +165 -0
- portal/views/registration.py +105 -0
- portal/views/teacher/__init__.py +36 -0
- portal/views/teacher/home.py +104 -0
- portal/views/teacher/teach.py +768 -0
- portal/wsgi.py +50 -0
- ratelimit/__init__.py +1 -0
- ratelimit/backends/__init__.py +8 -0
- ratelimit/backends/cache.py +42 -0
- ratelimit/decorators.py +59 -0
- reports/__init__.py +36 -0
- reports/admin.py +39 -0
- reports/migrations/0001_initial.py +65 -0
- reports/migrations/0002_hitsperlevelperday.py +62 -0
- reports/migrations/__init__.py +36 -0
- reports/models.py +53 -0
- reports/tests.py +39 -0
- reports/urls.py +87 -0
- reports/views.py +39 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.0
|
|
2
|
+
Name: codeforlife-portal
|
|
3
|
+
Version: 1.0.0.post0.dev44
|
|
4
|
+
Summary: UNKNOWN
|
|
5
|
+
Home-page: UNKNOWN
|
|
6
|
+
Author: UNKNOWN
|
|
7
|
+
Author-email: UNKNOWN
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Platform: UNKNOWN
|
|
10
|
+
Requires-Dist: django (==1.8.2)
|
|
11
|
+
Requires-Dist: django-appconf (==1.0.1)
|
|
12
|
+
Requires-Dist: django-countries (==3.4.1)
|
|
13
|
+
Requires-Dist: djangorestframework (==3.1.3)
|
|
14
|
+
Requires-Dist: django-jquery (==1.9.1)
|
|
15
|
+
Requires-Dist: django-autoconfig (==0.3.6)
|
|
16
|
+
Requires-Dist: pyyaml (==3.10)
|
|
17
|
+
Requires-Dist: rapid-router (>=1.0.0.post.dev1)
|
|
18
|
+
Requires-Dist: six (==1.9.0)
|
|
19
|
+
Requires-Dist: docutils (==0.12)
|
|
20
|
+
Requires-Dist: django-recaptcha-field (==1.0b2)
|
|
21
|
+
Requires-Dist: reportlab (==3.2.0)
|
|
22
|
+
Requires-Dist: postcodes (==0.1)
|
|
23
|
+
Requires-Dist: django-formtools (==1.0)
|
|
24
|
+
Requires-Dist: django-two-factor-auth (==1.2.0)
|
|
25
|
+
Requires-Dist: urllib3 (==1.10.4)
|
|
26
|
+
Requires-Dist: requests (==2.7.0)
|
|
27
|
+
Requires-Dist: django-cms (==3.1.2)
|
|
28
|
+
Requires-Dist: django-classy-tags (==0.6.1)
|
|
29
|
+
Requires-Dist: django-treebeard (==3.0)
|
|
30
|
+
Requires-Dist: django-sekizai (==0.8.2)
|
|
31
|
+
Requires-Dist: djangocms-admin-style (==0.2.8)
|
|
32
|
+
Requires-Dist: djangocms-text-ckeditor (==2.6.0)
|
|
33
|
+
Requires-Dist: djangocms-link (==1.6.2)
|
|
34
|
+
Requires-Dist: djangocms-snippet (==1.5)
|
|
35
|
+
Requires-Dist: djangocms-style (==1.5)
|
|
36
|
+
Requires-Dist: djangocms-column (==1.5)
|
|
37
|
+
Requires-Dist: djangocms-grid (==1.2)
|
|
38
|
+
Requires-Dist: djangocms-oembed (==0.5)
|
|
39
|
+
Requires-Dist: djangocms-table (==1.2)
|
|
40
|
+
Requires-Dist: djangocms-file (==0.1)
|
|
41
|
+
Requires-Dist: djangocms-flash (==0.2.0)
|
|
42
|
+
Requires-Dist: djangocms-googlemap (==0.3)
|
|
43
|
+
Requires-Dist: djangocms-inherit (==0.1)
|
|
44
|
+
Requires-Dist: djangocms-picture (==0.1)
|
|
45
|
+
Requires-Dist: djangocms-teaser (==0.1)
|
|
46
|
+
Requires-Dist: djangocms-video (==0.1)
|
|
47
|
+
Requires-Dist: django-online-status (==0.1.0)
|
|
48
|
+
Requires-Dist: Pillow (==2.9.0)
|
|
49
|
+
Requires-Dist: django-reversion (==1.9.3)
|
|
50
|
+
|
|
51
|
+
UNKNOWN
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
deploy/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
2
|
+
deploy/captcha.py,sha256=fM7h-SRraNbZmcQixFR-iKCkJOyGrCFp1jF35rLvv64,1856
|
|
3
|
+
deploy/mail.py,sha256=VJ49VvcNYu30imI9Z4wqjna2wp11-Y-tLOiekYxNnmc,3190
|
|
4
|
+
deploy/permissions.py,sha256=BDTlRgnG5RYUXys1_dLNoW57KTWuNC1YRFBUgkB-NAY,125
|
|
5
|
+
deploy/settings.py,sha256=VRc4InOMU-Evn2rqZQhIr7vwlEw6EYaKeZWiTQuNSi8,8689
|
|
6
|
+
deploy/urls.py,sha256=t87jHCgcL-YYPcvKgrhUap_6HKYD3sb0jpXq03Sq0H0,582
|
|
7
|
+
deploy/views.py,sha256=YZhPza6tLmEuxr9iojPt_vaHsga1jue-2U6-9pMmp5Q,131
|
|
8
|
+
deploy/wsgi.py,sha256=alJ1UPJIHzAaB1P2pv3R2DYZHmc7ai5IXzxlq9-SukU,399
|
|
9
|
+
deploy/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
deploy/middleware/basicauth.py,sha256=cFAQdZ5_TLH6_nwo-yT_Kt4B0Pks21jljyiUeHnf63w,1049
|
|
11
|
+
deploy/middleware/exceptionlogging.py,sha256=Buz96QLtowcnPq2dqOg6zEe3iBM0LHV30PXp4d8M6mM,268
|
|
12
|
+
portal/__init__.py,sha256=G--madRjvBaQsBY33nqU_I83PVikJ6eSDvhCcr53Xv0,1925
|
|
13
|
+
portal/app_settings.py,sha256=Z5mNI4ve_TnaAcJbb9s_pQZC08VQ2j3JW6PlUCqSxRM,2379
|
|
14
|
+
portal/autoconfig.py,sha256=MQGoa3AsAm2YTY8Cg1EfnyMNp4o8b4O2CWvN_H-Y5tc,5798
|
|
15
|
+
portal/beta.py,sha256=-6j6r-DqBNGU2yUr79WUFgTfEnvL8bL-bYB3qM8kenA,2120
|
|
16
|
+
portal/emailMessages.py,sha256=lW2KI515nz3zksMo3Xq7XpwCHs44un_gqr9VsrUNLr4,8842
|
|
17
|
+
portal/models.py,sha256=U80TWvbrRIbGBl25kT7DO1vAhRWtY6ZecJepxSdlhxU,7647
|
|
18
|
+
portal/permissions.py,sha256=vcOwBvCfnz5dasotV1DnhRVy6jrvLnD67uRRgc2ZEL4,2764
|
|
19
|
+
portal/urls.py,sha256=MTwUefy9OUIzzBxvcT46ah-xsLG7ODS9pDI1nGFu6B0,9833
|
|
20
|
+
portal/wsgi.py,sha256=mZ7JDcGneB4V_0D5DH1bcvSYLUazUHjM71i7BP8QpPA,2231
|
|
21
|
+
portal/_version.py,sha256=-FurlMPWwOcNTmcm9LCVFRKRQ0PzArHhr6nZ8k4Aaa8,482
|
|
22
|
+
portal/forms/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
23
|
+
portal/forms/admin_login.py,sha256=6PWYtZJ8YdkOccFnqx9VGlcExSu9KwVVb4QgI41BP6U,2153
|
|
24
|
+
portal/forms/auth_forms.py,sha256=MVv5VZYcfizJVnhFCHw-Wyhd3JzRIehFd4_hwUZQ4s0,3708
|
|
25
|
+
portal/forms/home.py,sha256=Qe6HjCUbeTgthf-S4QuCeGEk4Cz9L0w8H3RHUZ2-_y0,2686
|
|
26
|
+
portal/forms/organisation.py,sha256=-KlTvuzXPM-_KERu0lqm-bFiCiSodqZx5Q6HPVjzQa0,5038
|
|
27
|
+
portal/forms/play.py,sha256=MrFc_i430A8fmn21hodpUwA2z6-n9h1OmLDMvFx8nag,9714
|
|
28
|
+
portal/forms/registration.py,sha256=kiBCVS1a1BnteTh2oJsETvIag7HXTOHFvSfO1Fp4BNQ,10354
|
|
29
|
+
portal/forms/teach.py,sha256=urK1mMbicp6tiPEp8_0YpbTpnrIlfGNBQzuUKAcmT60,19522
|
|
30
|
+
portal/helpers/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
31
|
+
portal/helpers/email.py,sha256=dt-YuGUwQ21bhPalCb-oygw7waAdfTTxTmJqmvTu6h8,4835
|
|
32
|
+
portal/helpers/generators.py,sha256=7UVEPVL5EnI-z0lgUnbDxjiOuseQp5FHgXUDskY304g,3093
|
|
33
|
+
portal/helpers/location.py,sha256=6YgNchJjsgbterLvS3_1pIBiilQVA8TwHlZTC6eyNQg,5227
|
|
34
|
+
portal/helpers/password.py,sha256=bB3ERnEaiorkFylcniSvpm1YSSWAPD8N4EjwRMcQug0,2152
|
|
35
|
+
portal/middleware/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
36
|
+
portal/middleware/ratelimit_login_attempts.py,sha256=5_0LBu0wLISDKx49gUs7nWJffdHLI1IrtUi0KbU3PdQ,2569
|
|
37
|
+
portal/migrations/0001_squashed_0041_new_news.py,sha256=oEKFweuhCWwI2pgDCzUaWh3vME1TYrJNAthbUXIQl1M,27922
|
|
38
|
+
portal/migrations/0042_school_country.py,sha256=YeXsQ_zeUc56t6kyPv9gSTGiuQCIosZYcJ3S-RzpkKo,2271
|
|
39
|
+
portal/migrations/0043_auto_20150430_0952.py,sha256=l79nq2n9luC6wNmwY1tcPLmJ-OwP3Q0bC1NPjQsGEYA,2279
|
|
40
|
+
portal/migrations/0044_auto_20150430_0959.py,sha256=WTBg2Ag9pF2tDRdmqyguiwyDGf0c2PknTN-7ete7R08,2942
|
|
41
|
+
portal/migrations/0045_auto_20150430_1446.py,sha256=KVqsfVNQjSsw7BsmeaU4YLSW9pPM1OxVkc2PG2aAM6s,2260
|
|
42
|
+
portal/migrations/0046_auto_20150723_1101.py,sha256=raO1OblDK6qyKVWOL1ghNSjCgYKqv-nzh47cZ6Ge5_I,2336
|
|
43
|
+
portal/migrations/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
44
|
+
portal/templatetags/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
45
|
+
portal/templatetags/app_tags.py,sha256=pyLmibR77tOM8CQvthYYsy8ZQYz60IPhHFEvSgQUfio,4325
|
|
46
|
+
portal/templatetags/table_tags.py,sha256=2U46OB08yifh9hXP1lIiJFxQvWhCDIRbLod1mHoOqtA,2277
|
|
47
|
+
portal/tests/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
48
|
+
portal/tests/base_test.py,sha256=6U6_xfltIpzsBcdoJaEfvaez49V_gd8OYrJn7nuJ0Es,3260
|
|
49
|
+
portal/tests/base_test_migration.py,sha256=AzC4E_0hjAbmy-TxLkQOLmWQq90R208HPZw7Sv7HV10,3057
|
|
50
|
+
portal/tests/test_admin.py,sha256=DIzuTmZWFyRnu9-DF_dOdVCVvdrQOYD9C3sXFfwKzPk,6799
|
|
51
|
+
portal/tests/test_class.py,sha256=0-9a4rzeguADnx0KyI0cT1lXxXNKPKrM5-zhCrMbqWU,7377
|
|
52
|
+
portal/tests/test_independent_student.py,sha256=vQfhctgDqqF2XxEd9avU9oLo0a9IqdhwxNRiMa-V-Tc,4870
|
|
53
|
+
portal/tests/test_independent_student_joins_a_class.py,sha256=FQo9YcOCxJuijFjYeOLSDo77ZW0rNiaIxJCJzlCL9Nk,3302
|
|
54
|
+
portal/tests/test_location.py,sha256=DmAaG1Fzuqs54zGcoU-nTHHVNNVfJreHFl32bgkbkk4,10264
|
|
55
|
+
portal/tests/test_migration_country.py,sha256=v-LfBFY8ZfYRJbZAnuQN7wV-rJf37mbO49tO6ygn6IQ,5843
|
|
56
|
+
portal/tests/test_navigation.py,sha256=Y7HYFJrvY_CFiZsP1ejSFFTLFHm0bUoMNMIdka6gbdU,4172
|
|
57
|
+
portal/tests/test_organisation.py,sha256=nd8RNLtRbuD5WHCrYj0EQ98Tfe4syGcwoQmbjQ4u0hw,8392
|
|
58
|
+
portal/tests/test_school_student.py,sha256=dhFwCpK_Spq1BIuaRmynvaWLxZAJAbP90Ev1Ve9uP1s,4379
|
|
59
|
+
portal/tests/test_teacher.py,sha256=K6OzLfWEQ8jN1LmhuYPROzJ-r3OG9N0n8d0BZgjL7kc,7340
|
|
60
|
+
portal/tests/test_teacher_student.py,sha256=pA0y0U9OVhi3B2ynYJkjd6IWx6T-cFga9ahkMfku5Ko,11340
|
|
61
|
+
portal/tests/pageObjects/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
62
|
+
portal/tests/pageObjects/portal/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
63
|
+
portal/tests/pageObjects/portal/about_page.py,sha256=z-Vb5V98I51e-lAQKYDbGBwPm51vcIBYfWh48MHoV-Y,2024
|
|
64
|
+
portal/tests/pageObjects/portal/base_page.py,sha256=FaFOXvvbvCsMEBURMeHO5XdyPnQifHRT9PiFyeWpxho,6078
|
|
65
|
+
portal/tests/pageObjects/portal/contact_page.py,sha256=4Ze_rj7k37CqL0ezRw9Oz1OrfiKsb0M5-SDtsXoyiOM,2030
|
|
66
|
+
portal/tests/pageObjects/portal/email_verification_needed_page.py,sha256=qqKgZyr_E5H1Rf57y4yFp6s66C3KSqcCl0oOUJHbsGY,2246
|
|
67
|
+
portal/tests/pageObjects/portal/forbidden_page.py,sha256=oUb8V254PP6JrFklY4sfwrAHH8VkhCgXGthMHKfGfTM,2067
|
|
68
|
+
portal/tests/pageObjects/portal/game_page.py,sha256=x3QlywZD8ceARdgqjADfFg9iz1wmBfMEJLhUSq4FiS0,5454
|
|
69
|
+
portal/tests/pageObjects/portal/help_and_support_page.py,sha256=PWCXFikM9BLm9MmzEvFW50b4QplhKzSqRYzbSHnFbfk,2021
|
|
70
|
+
portal/tests/pageObjects/portal/home_page.py,sha256=Mb9TUKlAPKYkuUnVe2UtqqCPcVC-uRKEv5vSR01Y9gY,2199
|
|
71
|
+
portal/tests/pageObjects/portal/play_page.py,sha256=wi7CcDPlpBdZ_4LDowGAO4rdGohgsn43luIaPRD4BlM,8649
|
|
72
|
+
portal/tests/pageObjects/portal/teach_page.py,sha256=qBGqNsIXEwS3s7UQLXXgL2gBTwsbyrS1gQeJkDsy5NA,4184
|
|
73
|
+
portal/tests/pageObjects/portal/terms_page.py,sha256=hXYaJjdMjYTrpbEp9eeh93Motn9w_qzBBRJH5o9Yo3U,2024
|
|
74
|
+
portal/tests/pageObjects/portal/admin/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
75
|
+
portal/tests/pageObjects/portal/admin/admin_base_page.py,sha256=MrQCLtXUC2XtMCTbN3cGFvpnRyb5TOvVzNN6ntMhcOQ,3121
|
|
76
|
+
portal/tests/pageObjects/portal/admin/admin_data_page.py,sha256=_iMO23Rp-LhgsJqVZPJsHdnIHaH2XwuETDluiQ2KkcQ,2122
|
|
77
|
+
portal/tests/pageObjects/portal/admin/admin_login_page.py,sha256=chQj0DwLRd6SAfqih9fKLgOzpAM8xLC9da4mMsYrEOw,3434
|
|
78
|
+
portal/tests/pageObjects/portal/admin/admin_map_page.py,sha256=nS_s2PDmzt-QmuF_dhpxH9CvrnuCeN2iL_p8FUe_N8Q,2119
|
|
79
|
+
portal/tests/pageObjects/portal/play/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
80
|
+
portal/tests/pageObjects/portal/play/account_page.py,sha256=1dZDmY4B9dlG-3IVplkQfRH8McgT74JQv1LW4U3DOLA,2704
|
|
81
|
+
portal/tests/pageObjects/portal/play/dashboard_page.py,sha256=R3dTiNYRvIzyOlzCKedjCBZRgJfxUchYV-T9BxztXQ8,2333
|
|
82
|
+
portal/tests/pageObjects/portal/play/join_school_or_club_page.py,sha256=JgYH6Kki5IfagmojRE2DGj6WmwcDZ3D6OehnlyJ83Q8,2411
|
|
83
|
+
portal/tests/pageObjects/portal/play/play_base_page.py,sha256=duKE--dhl-SuQ9-0vzzwmq_hHzhsRuvO4IEE7IGvR2c,2628
|
|
84
|
+
portal/tests/pageObjects/portal/teach/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
85
|
+
portal/tests/pageObjects/portal/teach/account_page.py,sha256=5mpY7fQ7Lshz-OT9MO4G0RnxYm2Ufxy1dr3BK-YeLLE,3524
|
|
86
|
+
portal/tests/pageObjects/portal/teach/add_independent_student_to_class_page.py,sha256=_ru9xQgIMGh19FnszmnCef3GWPOBj_87FbA28dIbkM0,2440
|
|
87
|
+
portal/tests/pageObjects/portal/teach/added_independent_student_to_class_page.py,sha256=C1COT2SkgkdUy3nZ9TgyK7R5pvG2ApD8yhPEvaM-qno,2373
|
|
88
|
+
portal/tests/pageObjects/portal/teach/class_page.py,sha256=BYzYHClrAfSHP7Ea-vvNezks6Z-kb8m0qgOPS3Yi06U,6774
|
|
89
|
+
portal/tests/pageObjects/portal/teach/class_settings_page.py,sha256=YAiHJp2CD5A1c9fV1RIJI1DCNEfmVl9fgm65aGBN4lA,3687
|
|
90
|
+
portal/tests/pageObjects/portal/teach/classes_page.py,sha256=41cDEvVPeN8zQtKdJMW4g0PVWqIHZEmMenNUfhsgna0,3542
|
|
91
|
+
portal/tests/pageObjects/portal/teach/dashboard_page.py,sha256=3xA9HzrGfXnBuA5eqwquRExoBf_i5vcyzN1JV50JcF8,2068
|
|
92
|
+
portal/tests/pageObjects/portal/teach/dismiss_students_page.py,sha256=_sn6Ww1XV5dGi-Q0k288kHGsSR3jK5M-SPAJkCK3fYo,3075
|
|
93
|
+
portal/tests/pageObjects/portal/teach/move_class_page.py,sha256=a8I99cWb62wkyKSwa3ee6b98RsTRkOEI0A4LEsFPkiI,2754
|
|
94
|
+
portal/tests/pageObjects/portal/teach/move_students_disambiguate_page.py,sha256=yv4bKWTiOPy-ApWWIid0CBsGSbbIR3QEF9kkP0eQ0Ks,2466
|
|
95
|
+
portal/tests/pageObjects/portal/teach/move_students_page.py,sha256=dq5GdGjwGTgYbZWjpH7WZfEYRWL94X2ETprQemEAljY,2812
|
|
96
|
+
portal/tests/pageObjects/portal/teach/new_students_page.py,sha256=AwBCd5yQ2fSEAY737iEJapK_iwz38_O8i0DGrPx5xJY,2504
|
|
97
|
+
portal/tests/pageObjects/portal/teach/organisation_create_page.py,sha256=QR4OccOzgNPowk1Z_8C-B7TtG8l0ueqHvg-BqebluAc,3918
|
|
98
|
+
portal/tests/pageObjects/portal/teach/organisation_manage_page.py,sha256=n606sjaB-Dh_mVszfH5bfzb_WXjw5uRty1rtJniq19Q,4231
|
|
99
|
+
portal/tests/pageObjects/portal/teach/organisation_revoke_page.py,sha256=odw5QTSKOgNes2AHtZjnDhL0WGujLEO6CWHDBVG-h1w,2523
|
|
100
|
+
portal/tests/pageObjects/portal/teach/teach_base_page.py,sha256=dk8r7YoylZMgjKsnM2DTR487FsA9svbW7MAdUgoUEzo,3409
|
|
101
|
+
portal/tests/pageObjects/portal/teach/thanks_for_reset_page.py,sha256=-beMvHljrxnlRIxlfQGwvQ9zO2TKEcjcWDTjKxvcGNw,2100
|
|
102
|
+
portal/tests/pageObjects/registration/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
103
|
+
portal/tests/pageObjects/registration/independent_student_login_form_page.py,sha256=jXuk75h_OFcd2mM8gOUKJTgH4oAFqo4V19seVue0k1Q,2474
|
|
104
|
+
portal/tests/pageObjects/registration/password_reset_form_page.py,sha256=rPnZ6aO1EO26jspYK4CVoqWXLTEpXLATDjRxCHGs2YA,2619
|
|
105
|
+
portal/tests/pageObjects/registration/student_password_reset_form_page.py,sha256=-6UzuYZacuB5X4683IxrH5cXaOqxXjSJiDI263zH778,2625
|
|
106
|
+
portal/tests/pageObjects/registration/teacher_password_reset_form_page.py,sha256=bjvz1Ngf9sFkEnpHohzGcIn7FhQFk_oqG5NOe9UvFRk,2675
|
|
107
|
+
portal/tests/utils/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
108
|
+
portal/tests/utils/classes.py,sha256=tEXXPtNlroVhw6pDlWBWQbej-2mySXYwW8upyCfT804,3381
|
|
109
|
+
portal/tests/utils/email.py,sha256=T7PB2qmZ2Kmk3YJxxnbVmTyVfY75nPBNK3FqxswnW6I,3504
|
|
110
|
+
portal/tests/utils/messages.py,sha256=vhzXnJyTgl4vpKpjdBTXyBtz_sM_qW6xJRYR0FOO69A,3131
|
|
111
|
+
portal/tests/utils/organisation.py,sha256=zP_T7P1tEUoocSaJDbZl-UyAIlqw5j6FTizXt0riqdY,3112
|
|
112
|
+
portal/tests/utils/student.py,sha256=sVoFLiyvCXpb-pfbdGcSTEz5ACZ4TPOe8aeP3R1vp_E,3987
|
|
113
|
+
portal/tests/utils/teacher.py,sha256=pdn7Bj5_Eje9XpihdIRwae_XpFIs0Fd-P6AV48uCtik,3078
|
|
114
|
+
portal/views/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
115
|
+
portal/views/admin.py,sha256=7IqNTYsLERbutzsrA7AyJPRZU10i_lI2lenAJ3vxhh0,16076
|
|
116
|
+
portal/views/email.py,sha256=J6kQcSS2I0wEyIq8xV6XtM8FiN_JAsUsiQyFc7c3OvU,3149
|
|
117
|
+
portal/views/home.py,sha256=EmHfE2budZOu0ZKRH-nVJShj9AgaZEf53lnVZ9qT75Q,15162
|
|
118
|
+
portal/views/organisation.py,sha256=JDxEX_ZEc-9jIRRFzhmtsQePCPLNwy8FEZEwuH4Ouow,15690
|
|
119
|
+
portal/views/play.py,sha256=jPXXsxOFy4Aqj-B4ABCDaCh8T59T_9YdWiE3JfoslT4,7889
|
|
120
|
+
portal/views/registration.py,sha256=V291hTCp68FPTf4n1BCQGT-dfXr42xICLeez5IdGOmg,5391
|
|
121
|
+
portal/views/teacher/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
122
|
+
portal/views/teacher/home.py,sha256=MUzCPCfoub2TGyF8TV1NgSkdbRU9lVjMUd_JDwXcIDk,5319
|
|
123
|
+
portal/views/teacher/teach.py,sha256=o2dAOyzI3m4ec-U99HNny4d8kek1C4n3eB_seRBOZhw,33938
|
|
124
|
+
ratelimit/__init__.py,sha256=iwhKnzeBJLKxpRVjvzwiRE63_zNpIBfaKLITauVph-0,24
|
|
125
|
+
ratelimit/decorators.py,sha256=4ALlxnqim6ItPWe_ALyCqEReEMQrE092Xe_dU-Dw6wo,1859
|
|
126
|
+
ratelimit/backends/__init__.py,sha256=i0bUBumCOYbvPn0u7bkOXLMOu_-Rzd9av7x7EhmCBnM,249
|
|
127
|
+
ratelimit/backends/cache.py,sha256=KEaWXrK3rsBWUD_jktb0MzCQGVmqFIpnQLgoD_wdYw8,1222
|
|
128
|
+
reports/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
129
|
+
reports/admin.py,sha256=uiPe8rCM3MuwdKRxpDnqmdEMQukPoFgOQTAaYrV8Vjg,1895
|
|
130
|
+
reports/models.py,sha256=RfdYkN0RH-yOGcNWG-BoYzbYFbz10ELguElvzTa1RRg,2506
|
|
131
|
+
reports/tests.py,sha256=lbf1rbo9GRWtuCeBDX2RUpp6beyatGWyE9woYB7wfu0,1892
|
|
132
|
+
reports/urls.py,sha256=N9BAPNsJbax_vn7XLVwndIHRFh8tN17W5Ow6g-NlyDU,3901
|
|
133
|
+
reports/views.py,sha256=Qwwu7hcK8S2uxKpbxcsNRnp2ke9-pBGeQOIHGEm64z4,1895
|
|
134
|
+
reports/migrations/0001_initial.py,sha256=CR5tlX8xtkehewORIbSZE2w5P8St4gR1xLWlUVg40HQ,2812
|
|
135
|
+
reports/migrations/0002_hitsperlevelperday.py,sha256=EMkfANeaMPTB7L4OrTXY2lwLxzhh2ZAVoNupOaJscZI,2568
|
|
136
|
+
reports/migrations/__init__.py,sha256=W4VeGk0r7YdM-TwIsa9dfGs-uLd1ecQb0tK8w44viQA,1832
|
|
137
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/top_level.txt,sha256=C9YsSRHAv7e7yPSiI00MYzyVT8JnUZzBbOqvGZWEKPc,32
|
|
138
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/METADATA,sha256=1KSNqFdZtOyLqD5G0LykVZtUyDRA3wvHLmg-TzHS1fs,1784
|
|
139
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/DESCRIPTION.rst,sha256=OCTuuN6LcWulhHS3d5rfjdsQtW22n7HENFRh6jC6ego,10
|
|
140
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/metadata.json,sha256=n_HxNs9yz8Xvq3aC7aaLExV9imnYG4e_2BWy5FevsjU,1532
|
|
141
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/WHEEL,sha256=54bVun1KfEBTJ68SHUmbxNPj80VxlQ0sHi4gZdGZXEY,92
|
|
142
|
+
codeforlife_portal-1.0.0.post0.dev44.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "codeforlife-portal", "run_requires": [{"requires": ["django (==1.8.2)", "django-appconf (==1.0.1)", "django-countries (==3.4.1)", "djangorestframework (==3.1.3)", "django-jquery (==1.9.1)", "django-autoconfig (==0.3.6)", "pyyaml (==3.10)", "rapid-router (>=1.0.0.post.dev1)", "six (==1.9.0)", "docutils (==0.12)", "django-recaptcha-field (==1.0b2)", "reportlab (==3.2.0)", "postcodes (==0.1)", "django-formtools (==1.0)", "django-two-factor-auth (==1.2.0)", "urllib3 (==1.10.4)", "requests (==2.7.0)", "django-cms (==3.1.2)", "django-classy-tags (==0.6.1)", "django-treebeard (==3.0)", "django-sekizai (==0.8.2)", "djangocms-admin-style (==0.2.8)", "djangocms-text-ckeditor (==2.6.0)", "djangocms-link (==1.6.2)", "djangocms-snippet (==1.5)", "djangocms-style (==1.5)", "djangocms-column (==1.5)", "djangocms-grid (==1.2)", "djangocms-oembed (==0.5)", "djangocms-table (==1.2)", "djangocms-file (==0.1)", "djangocms-flash (==0.2.0)", "djangocms-googlemap (==0.3)", "djangocms-inherit (==0.1)", "djangocms-picture (==0.1)", "djangocms-teaser (==0.1)", "djangocms-video (==0.1)", "django-online-status (==0.1.0)", "Pillow (==2.9.0)", "django-reversion (==1.9.3)"]}], "generator": "bdist_wheel (0.24.0)", "test_requires": [{"requires": ["django-setuptest", "django-selenium-clean (==0.2.1)", "responses (==0.4.0)", "selenium (==2.48.0)"]}], "summary": "UNKNOWN", "metadata_version": "2.0", "version": "1.0.0.post0.dev44", "extensions": {"python.details": {"document_names": {"description": "DESCRIPTION.rst"}}}, "extras": []}
|
deploy/__init__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Code for Life
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2015, Ocado Limited
|
|
5
|
+
#
|
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU Affero General Public License as
|
|
8
|
+
# published by the Free Software Foundation, either version 3 of the
|
|
9
|
+
# License, or (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU Affero General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Affero General Public License
|
|
17
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
# ADDITIONAL TERMS – Section 7 GNU General Public Licence
|
|
20
|
+
#
|
|
21
|
+
# This licence does not grant any right, title or interest in any “Ocado” logos,
|
|
22
|
+
# trade names or the trademark “Ocado” or any other trademarks or domain names
|
|
23
|
+
# owned by Ocado Innovation Limited or the Ocado group of companies or any other
|
|
24
|
+
# distinctive brand features of “Ocado” as may be secured from time to time. You
|
|
25
|
+
# must not distribute any modification of this program using the trademark
|
|
26
|
+
# “Ocado” or claim any affiliation or association with Ocado or its employees.
|
|
27
|
+
#
|
|
28
|
+
# You are not authorised to use the name Ocado (or any of its trade names) or
|
|
29
|
+
# the names of any author or contributor in advertising or for publicity purposes
|
|
30
|
+
# pertaining to the distribution of this program, without the prior written
|
|
31
|
+
# authorisation of Ocado.
|
|
32
|
+
#
|
|
33
|
+
# Any propagation, distribution or conveyance of this program must include this
|
|
34
|
+
# copyright notice and these terms. You must not misrepresent the origins of this
|
|
35
|
+
# program; modified versions of the program must be marked as such and not
|
|
36
|
+
# identified as the original program.
|
deploy/captcha.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Code for Life
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2015, Ocado Limited
|
|
5
|
+
#
|
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU Affero General Public License as
|
|
8
|
+
# published by the Free Software Foundation, either version 3 of the
|
|
9
|
+
# License, or (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU Affero General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Affero General Public License
|
|
17
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
# ADDITIONAL TERMS – Section 7 GNU General Public Licence
|
|
20
|
+
#
|
|
21
|
+
# This licence does not grant any right, title or interest in any “Ocado” logos,
|
|
22
|
+
# trade names or the trademark “Ocado” or any other trademarks or domain names
|
|
23
|
+
# owned by Ocado Innovation Limited or the Ocado group of companies or any other
|
|
24
|
+
# distinctive brand features of “Ocado” as may be secured from time to time. You
|
|
25
|
+
# must not distribute any modification of this program using the trademark
|
|
26
|
+
# “Ocado” or claim any affiliation or association with Ocado or its employees.
|
|
27
|
+
#
|
|
28
|
+
# You are not authorised to use the name Ocado (or any of its trade names) or
|
|
29
|
+
# the names of any author or contributor in advertising or for publicity purposes
|
|
30
|
+
# pertaining to the distribution of this program, without the prior written
|
|
31
|
+
# authorisation of Ocado.
|
|
32
|
+
#
|
|
33
|
+
# Any propagation, distribution or conveyance of this program must include this
|
|
34
|
+
# copyright notice and these terms. You must not misrepresent the origins of this
|
|
35
|
+
# program; modified versions of the program must be marked as such and not
|
|
36
|
+
# identified as the original program.
|
|
37
|
+
|
|
38
|
+
CAPTCHA_ENABLED = True
|
deploy/mail.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from email.MIMEBase import MIMEBase
|
|
2
|
+
|
|
3
|
+
from django.core.mail.backends.base import BaseEmailBackend
|
|
4
|
+
from django.core.mail import EmailMultiAlternatives
|
|
5
|
+
from django.core.exceptions import ImproperlyConfigured
|
|
6
|
+
|
|
7
|
+
from google.appengine.api import mail as aeemail
|
|
8
|
+
from google.appengine.runtime import apiproxy_errors
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _send_deferred(message, fail_silently=False):
|
|
12
|
+
try:
|
|
13
|
+
message.send()
|
|
14
|
+
except (aeemail.Error, apiproxy_errors.Error):
|
|
15
|
+
if not fail_silently:
|
|
16
|
+
raise
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class EmailBackend(BaseEmailBackend):
|
|
20
|
+
can_defer = False
|
|
21
|
+
|
|
22
|
+
def send_messages(self, email_messages):
|
|
23
|
+
num_sent = 0
|
|
24
|
+
for message in email_messages:
|
|
25
|
+
if self._send(message):
|
|
26
|
+
num_sent += 1
|
|
27
|
+
return num_sent
|
|
28
|
+
|
|
29
|
+
def _copy_message(self, message):
|
|
30
|
+
"""
|
|
31
|
+
Creates and returns App Engine EmailMessage class from message.
|
|
32
|
+
"""
|
|
33
|
+
gmsg = aeemail.EmailMessage(sender=message.from_email,
|
|
34
|
+
to=message.to,
|
|
35
|
+
subject=message.subject,
|
|
36
|
+
body=message.body)
|
|
37
|
+
if message.extra_headers.get('Reply-To', None):
|
|
38
|
+
gmsg.reply_to = message.extra_headers['Reply-To']
|
|
39
|
+
if message.cc:
|
|
40
|
+
gmsg.cc = list(message.cc)
|
|
41
|
+
if message.bcc:
|
|
42
|
+
gmsg.bcc = list(message.bcc)
|
|
43
|
+
if message.attachments:
|
|
44
|
+
# Must be populated with (filename, filecontents) tuples.
|
|
45
|
+
attachments = []
|
|
46
|
+
for attachment in message.attachments:
|
|
47
|
+
if isinstance(attachment, MIMEBase):
|
|
48
|
+
attachments.append((attachment.get_filename(),
|
|
49
|
+
attachment.get_payload(decode=True)))
|
|
50
|
+
else:
|
|
51
|
+
attachments.append((attachment[0], attachment[1]))
|
|
52
|
+
gmsg.attachments = attachments
|
|
53
|
+
# Look for HTML alternative content.
|
|
54
|
+
if isinstance(message, EmailMultiAlternatives):
|
|
55
|
+
for content, mimetype in message.alternatives:
|
|
56
|
+
if mimetype == 'text/html':
|
|
57
|
+
gmsg.html = content
|
|
58
|
+
break
|
|
59
|
+
return gmsg
|
|
60
|
+
|
|
61
|
+
def _send(self, message):
|
|
62
|
+
try:
|
|
63
|
+
message = self._copy_message(message)
|
|
64
|
+
except (ValueError, aeemail.InvalidEmailError), err:
|
|
65
|
+
import logging
|
|
66
|
+
logging.warn(err)
|
|
67
|
+
if not self.fail_silently:
|
|
68
|
+
raise
|
|
69
|
+
return False
|
|
70
|
+
if self.can_defer:
|
|
71
|
+
self._defer_message(message)
|
|
72
|
+
return True
|
|
73
|
+
try:
|
|
74
|
+
message.send()
|
|
75
|
+
except (aeemail.Error, apiproxy_errors.Error):
|
|
76
|
+
if not self.fail_silently:
|
|
77
|
+
raise
|
|
78
|
+
return False
|
|
79
|
+
return True
|
|
80
|
+
|
|
81
|
+
def _defer_message(self, message):
|
|
82
|
+
from google.appengine.ext import deferred
|
|
83
|
+
from django.conf import settings
|
|
84
|
+
queue_name = getattr(settings, 'EMAIL_QUEUE_NAME', 'default')
|
|
85
|
+
deferred.defer(_send_deferred,
|
|
86
|
+
message,
|
|
87
|
+
fail_silently=self.fail_silently,
|
|
88
|
+
_queue=queue_name)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class AsyncEmailBackend(EmailBackend):
|
|
92
|
+
can_defer = True
|
|
93
|
+
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from django.http import HttpResponse
|
|
2
|
+
from django.conf import settings
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
class BasicAuthMiddleware:
|
|
6
|
+
def unauthed(self):
|
|
7
|
+
response = HttpResponse("""<html><title>Auth required</title><body>
|
|
8
|
+
<h1>Authorization Required</h1></body></html>""", content_type="text/html")
|
|
9
|
+
response['WWW-Authenticate'] = 'Basic realm="' + os.getenv('APPLICATION_ID', '') + '"'
|
|
10
|
+
response.status_code = 401
|
|
11
|
+
return response
|
|
12
|
+
|
|
13
|
+
def process_request(self, request):
|
|
14
|
+
if request.META.has_key('HTTP_AUTHORIZATION'):
|
|
15
|
+
authmeth, auth = request.META['HTTP_AUTHORIZATION'].split(' ', 1)
|
|
16
|
+
if authmeth.lower() == 'basic':
|
|
17
|
+
auth = auth.strip().decode('base64')
|
|
18
|
+
username, password = auth.split(':', 1)
|
|
19
|
+
if username != settings.BASICAUTH_USERNAME or password != settings.BASICAUTH_PASSWORD:
|
|
20
|
+
return self.unauthed()
|
|
21
|
+
else:
|
|
22
|
+
return self.unauthed()
|
|
23
|
+
else:
|
|
24
|
+
return self.unauthed()
|
deploy/permissions.py
ADDED