diff options
author | hrcerqueira <hrcerqueira@gmail.com> | 2010-03-07 23:41:26 +0000 |
---|---|---|
committer | hrcerqueira <hrcerqueira@gmail.com> | 2010-03-07 23:41:26 +0000 |
commit | ccfbbd7f183538e96df76d82b2f4081fcc119b1f (patch) | |
tree | 9eae31a6f8d4d3c5397d6d6ff457b6ec51dd32b5 | |
parent | 0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05 (diff) | |
download | askbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.tar.gz askbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.tar.bz2 askbot-ccfbbd7f183538e96df76d82b2f4081fcc119b1f.zip |
Lots of small fixes, including the missing comments problem.
29 files changed, 244 insertions, 840 deletions
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0fe5d429..f4717294 100755 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -24,6 +24,7 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/openid-inputicon.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/openid-inputicon.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/wmd.css" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/wmd.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/facebookauth/templates/xd_receiver.html" afterPath="$PROJECT_DIR$/forum_modules/facebookauth/templates/xd_receiver.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/views/auth.py" afterPath="$PROJECT_DIR$/forum/views/auth.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-favorite-on.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-favorite-on.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/technorati.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/technorati.ico" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.flot.pack.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.flot.pack.js" />
@@ -41,8 +42,10 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/users_questions.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/users_questions.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-favorite-off.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-favorite-off.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cron/multi_award_badges_virtualenv" afterPath="$PROJECT_DIR$/cron/multi_award_badges_virtualenv" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\external_legacy_login_info.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/subscribe_everyone.py" afterPath="$PROJECT_DIR$/forum/management/commands/subscribe_everyone.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/medala.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/medala.gif" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\sendpw_email.txt" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/question_edit.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/question_edit.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/com.cnprog.tag_selector.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/com.cnprog.tag_selector.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/claimid.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/claimid.ico" />
@@ -58,8 +61,10 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/revisions_answer.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/revisions_answer.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-up-on.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-up-on.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/openid.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/openid.gif" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\email_validation.txt" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/localauth/authentication.py" afterPath="$PROJECT_DIR$/forum_modules/localauth/authentication.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/pg_clean_award_badges.py" afterPath="$PROJECT_DIR$/forum/management/commands/pg_clean_award_badges.py" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\delete.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/__init__.py" afterPath="$PROJECT_DIR$/forum/skins/__init__.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-up.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-up.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/aol.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/aol.gif" />
@@ -85,7 +90,6 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/send_email_alerts.py" afterPath="$PROJECT_DIR$/forum/management/commands/send_email_alerts.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/livejournal.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/livejournal.ico" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/fbconnect/xd_receiver.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/fbconnect/xd_receiver.html" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/views/readers.py" afterPath="$PROJECT_DIR$/forum/views/readers.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/edit.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/edit.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/blue-up-arrow-h18px.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/blue-up-arrow-h18px.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/user_messages/context_processors.py" afterPath="$PROJECT_DIR$/forum/user_messages/context_processors.py" />
@@ -98,10 +102,12 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/bullet_green.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/bullet_green.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/middleware/__init__.py" afterPath="$PROJECT_DIR$/forum/middleware/__init__.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/yahoo.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/yahoo.gif" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\settings.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/utils/forms.py" afterPath="$PROJECT_DIR$/forum/utils/forms.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/sample_command.py" afterPath="$PROJECT_DIR$/forum/management/commands/sample_command.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/models/answer.py" afterPath="$PROJECT_DIR$/forum/models/answer.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/middleware/anon_user.py" afterPath="$PROJECT_DIR$/forum/middleware/anon_user.py" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\complete.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/logo.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/logo.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/style/openid.css" afterPath="$PROJECT_DIR$/forum/skins/default/media/style/openid.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/showdown.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/showdown.js" />
@@ -119,12 +125,14 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/openid.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/openid.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/images/wmd-buttons.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/images/wmd-buttons.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/user_footer.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/user_footer.html" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\changeemail.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-accepted-on.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-accepted-on.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/encodings.xml" afterPath="$PROJECT_DIR$/.idea/encodings.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/auth/complete.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/auth/complete.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/flot-build.bat" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/flot-build.bat" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/models/user.py" afterPath="$PROJECT_DIR$/forum/models/user.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-down-on.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-arrow-down-on.png" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\sendpw.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/new.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/new.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/claimid-0.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/claimid-0.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/sphinxfulltext/models.py" afterPath="$PROJECT_DIR$/forum_modules/sphinxfulltext/models.py" />
@@ -177,8 +185,11 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/questions.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/questions.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/showdown-min.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/wmd/showdown-min.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/flickr.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/flickr.ico" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/log/README.TXT" afterPath="$PROJECT_DIR$/log/README.TXT" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/technorati-1.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/technorati-1.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/auth/temp_login_request.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/auth/temp_login_request.html" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\signin.html" afterPath="" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\confirm_email.txt" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/modules.py" afterPath="$PROJECT_DIR$/forum/modules.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/common/media/README" afterPath="$PROJECT_DIR$/forum/skins/common/media/README" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/dash.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/dash.gif" />
@@ -220,6 +231,7 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/facebookauth/authentication.py" afterPath="$PROJECT_DIR$/forum_modules/facebookauth/authentication.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/settings_local.py.dist" afterPath="$PROJECT_DIR$/settings_local.py.dist" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/myopenid-2.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/myopenid-2.png" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\failure.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/user_stats.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/user_stats.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/medala_on.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/medala_on.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/question_retag.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/question_retag.html" />
@@ -231,7 +243,6 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/sql_scripts/update_2010_01_23.sql" afterPath="$PROJECT_DIR$/sql_scripts/update_2010_01_23.sql" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/settings.py" afterPath="$PROJECT_DIR$/forum/settings.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/models/meta.py" afterPath="$PROJECT_DIR$/forum/models/meta.py" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/authopenid/signin.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/authopenid/signin.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/google.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/google.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/utils/diff.py" afterPath="$PROJECT_DIR$/forum/utils/diff.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/sphinxfulltext/DISABLED" afterPath="$PROJECT_DIR$/forum_modules/sphinxfulltext/DISABLED" />
@@ -241,6 +252,7 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/facebookauth/templates/button.html" afterPath="$PROJECT_DIR$/forum_modules/facebookauth/templates/button.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/wordpress.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/wordpress.ico" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/oauthauth/consumer.py" afterPath="$PROJECT_DIR$/forum_modules/oauthauth/consumer.py" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/cache/README.TXT" afterPath="$PROJECT_DIR$/cache/README.TXT" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/copyright/profiles_settings.xml" afterPath="$PROJECT_DIR$/.idea/copyright/profiles_settings.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/openid.css" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/openid.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/paginator.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/paginator.html" />
@@ -249,11 +261,12 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/facebookauth/urls.py" afterPath="$PROJECT_DIR$/forum_modules/facebookauth/urls.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/notarobot.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/notarobot.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/localauth/forms.py" afterPath="$PROJECT_DIR$/forum_modules/localauth/forms.py" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\changepw.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.form.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.form.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/user_tabs.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/user_tabs.html" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/dot-list.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/dot-list.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/oauthauth/__init__.py" afterPath="$PROJECT_DIR$/forum_modules/oauthauth/__init__.py" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/forum_modules/default_badges/__init__.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/facebook.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/facebook.gif" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/blogger.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/blogger.ico" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/answer_edit.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/answer_edit.html" />
@@ -270,11 +283,15 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/index_.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/index_.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/vcs.xml" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/models/__init__.py" afterPath="$PROJECT_DIR$/forum/models/__init__.py" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\yadis.xrdf" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/settings.py" afterPath="$PROJECT_DIR$/settings.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/excanvas.pack.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/excanvas.pack.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/about.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/about.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/openidauth/settings.py" afterPath="$PROJECT_DIR$/forum_modules/openidauth/settings.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cron/once_award_badges" afterPath="$PROJECT_DIR$/cron/once_award_badges" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/robotstxt/DISABLED" afterPath="$PROJECT_DIR$/forum_modules/robotstxt/DISABLED" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/__init__.py" afterPath="$PROJECT_DIR$/forum/management/commands/__init__.py" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/question_list.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/question_list.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/sphinxfulltext/settings.py" afterPath="$PROJECT_DIR$/forum_modules/sphinxfulltext/settings.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/README" afterPath="$PROJECT_DIR$/forum/skins/README" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/templatetags/__init__.py" afterPath="$PROJECT_DIR$/forum/templatetags/__init__.py" />
@@ -291,6 +308,7 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/admin.py" afterPath="$PROJECT_DIR$/forum/admin.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/views/meta.py" afterPath="$PROJECT_DIR$/forum/views/meta.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/openidico.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/jquery-openid/images/openidico.png" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\changeopenid.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/templatetags/smart_if.py" afterPath="$PROJECT_DIR$/forum/templatetags/smart_if.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/vote-accepted.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/vote-accepted.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/logout.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/logout.html" />
@@ -318,9 +336,12 @@ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/robotstxt/__init__.py" afterPath="$PROJECT_DIR$/forum_modules/robotstxt/__init__.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.ajaxfileupload.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.ajaxfileupload.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/robotstxt/urls.py" afterPath="$PROJECT_DIR$/forum_modules/robotstxt/urls.py" />
+ <change type="DELETED" beforePath="C:\osqadev\100302\osqa\forum\skins\default\templates\authopenid\signup.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/middleware/pagesize.py" afterPath="$PROJECT_DIR$/forum/middleware/pagesize.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/revisions_question.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/revisions_question.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/close-small-dark.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/close-small-dark.png" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/forum_modules/default_badges/badges.py" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/forum/management/commands/sximport.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/user_recent.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/user_recent.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/cc-wiki.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/cc-wiki.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/utils/__init__.py" afterPath="$PROJECT_DIR$/forum/utils/__init__.py" />
@@ -384,28 +405,19 @@ <component name="FileColors" enabled="true" enabledForTabs="true" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="settings_local.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/settings_local.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="41" column="17" selection-start="1141" selection-end="1141" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="settings_local.py.dist" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/settings_local.py.dist">
+ <file leaf-file-name="question.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="42" column="26" selection-start="1400" selection-end="1400" vertical-scroll-proportion="0.7492212">
+ <state line="179" column="49" selection-start="11615" selection-end="11615" vertical-scroll-proportion="-6.244898">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="readers.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/views/readers.py">
+ <file leaf-file-name="__init__.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/forum/models/__init__.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="531" column="42" selection-start="21760" selection-end="21760" vertical-scroll-proportion="0.0">
+ <state line="35" column="105" selection-start="1086" selection-end="1086" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -414,52 +426,25 @@ <file leaf-file-name="question.py" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/forum/models/question.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="95" column="16" selection-start="3352" selection-end="3373" vertical-scroll-proportion="0.0">
+ <state line="1" column="72" selection-start="38" selection-end="38" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="lists.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/utils/lists.py">
+ <file leaf-file-name="base.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/forum/models/base.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="4" column="28" selection-start="139" selection-end="139" vertical-scroll-proportion="0.0">
+ <state line="125" column="12" selection-start="4364" selection-end="4364" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="settings.py" pinned="false" current="false" current-in-tab="false">
+ <file leaf-file-name="settings.py" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/settings.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="70" column="20" selection-start="2587" selection-end="2587" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="index.html" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/index.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="34" column="0" selection-start="1648" selection-end="1682" vertical-scroll-proportion="15.833333">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="question_list.html" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question_list.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="11" column="53" selection-start="288" selection-end="288" vertical-scroll-proportion="-3.8163266">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="question.html" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="491" column="39" selection-start="31969" selection-end="31969" vertical-scroll-proportion="-7.632653">
+ <state line="71" column="5" selection-start="2587" selection-end="2587" vertical-scroll-proportion="0.5356601">
<folding />
</state>
</provider>
@@ -475,22 +460,22 @@ <component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
- <option value="$PROJECT_DIR$/forum/skins/default/templates/tag_selector.html" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/auth/signin.html" />
- <option value="$PROJECT_DIR$/forum_modules/robotsdennyall/templates/robots.txt" />
- <option value="$PROJECT_DIR$/forum_modules/robotsdennyall/urls.py" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/footer.html" />
- <option value="$PROJECT_DIR$/log/README.TXT" />
- <option value="$PROJECT_DIR$/forum/views/readers.py" />
- <option value="$PROJECT_DIR$/.gitignore" />
+ <option value="$PROJECT_DIR$/forum/management/commands/sximport.py" />
+ <option value="$PROJECT_DIR$/forum/badges/base.py" />
+ <option value="$PROJECT_DIR$/forum_modules/default_badges/badges.py" />
+ <option value="$PROJECT_DIR$/forum/badges/__init__.py" />
+ <option value="$PROJECT_DIR$/sql_scripts/badges.sql" />
+ <option value="$PROJECT_DIR$/forum/modules.py" />
+ <option value="$PROJECT_DIR$/forum_modules/facebookauth/views.py" />
<option value="$PROJECT_DIR$/forum/skins/default/templates/index.html" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/question_list.html" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/questions.html" />
+ <option value="$PROJECT_DIR$/sql_scripts/update_2010_01_23.sql" />
<option value="$PROJECT_DIR$/forum/models/question.py" />
- <option value="$PROJECT_DIR$/forum/utils/lists.py" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/question.html" />
+ <option value="$PROJECT_DIR$/forum/models/meta.py" />
+ <option value="$PROJECT_DIR$/forum/views/readers.py" />
+ <option value="$PROJECT_DIR$/forum/models/__init__.py" />
+ <option value="$PROJECT_DIR$/settings.py" />
+ <option value="$PROJECT_DIR$/forum/models/base.py" />
<option value="$PROJECT_DIR$/settings_local.py" />
- <option value="$PROJECT_DIR$/settings_local.py.dist" />
</list>
</option>
</component>
@@ -559,20 +544,6 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="log" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="osqa" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="osqa" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId" value="forum_modules" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -591,21 +562,7 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="robotstxt" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="osqa" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="osqa" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="forum" />
+ <option name="myItemId" value="openidauth" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -619,11 +576,11 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="forum" />
+ <option name="myItemId" value="forum_modules" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="views" />
+ <option name="myItemId" value="default_badges" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -640,10 +597,6 @@ <option name="myItemId" value="forum" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="utils" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -659,7 +612,7 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="templatetags" />
+ <option name="myItemId" value="skins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -691,15 +644,19 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="cron" />
+ <option name="myItemId" value="forum" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="badges" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
+ <pane id="Favorites" />
<pane id="Scope" />
<pane id="PackagesPane" />
- <pane id="Favorites" />
</panes>
</component>
<component name="PropertiesComponent">
@@ -715,11 +672,12 @@ <property name="WebServerToolWindowFactoryState" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
- <property name="options.searchVisible" value="true" />
<property name="options.splitter.details.proportions" value="0.2" />
+ <property name="options.searchVisible" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
+ <recent name="C:\osqadev\100302\osqa\forum\skins" />
<recent name="C:\osqadev\100302\osqa\cache" />
<recent name="C:\osqadev\100302\osqa" />
</key>
@@ -850,7 +808,7 @@ </configuration>
<configuration default="true" type="JavascriptDebugSession" factoryName="Local">
<JSDebuggerConfigurationSettings>
- <option name="engineId" />
+ <option name="engineId" value="embedded" />
<option name="fileUrl" />
</JSDebuggerConfigurationSettings>
<method>
@@ -1005,114 +963,100 @@ <breakpoint-manager />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="349" column="28" selection-start="13856" selection-end="13856" vertical-scroll-proportion="0.8174475">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/log/README.TXT">
- <provider selected="true" editor-type-id="text-editor">
- <state line="0" column="88" selection-start="88" selection-end="88" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/cache/README.TXT">
+ <entry file="file://$PROJECT_DIR$/sql_scripts/update_2010_01_23.sql">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="0" column="0" selection-start="0" selection-end="395" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/settings.py">
+ <entry file="file://$PROJECT_DIR$/forum_modules/facebookauth/views.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="70" column="20" selection-start="2587" selection-end="2587" vertical-scroll-proportion="0.0">
+ <state line="10" column="45" selection-start="325" selection-end="325" vertical-scroll-proportion="0.2647975">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/.gitignore">
+ <entry file="file://$PROJECT_DIR$/forum/utils/diff.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="3" column="8" selection-start="26" selection-end="26" vertical-scroll-proportion="0.077389985">
+ <state line="64" column="0" selection-start="1793" selection-end="1793" vertical-scroll-proportion="0.7936267">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/base.html">
+ <entry file="file://$PROJECT_DIR$/forum/modules.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.87741935">
+ <state line="55" column="32" selection-start="1580" selection-end="1580" vertical-scroll-proportion="0.38088012">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/templatetags/extra_filters.py">
+ <entry file="file://$PROJECT_DIR$/forum/views/readers.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="84" column="11" selection-start="2136" selection-end="2137" vertical-scroll-proportion="-24.0">
+ <state line="515" column="28" selection-start="21145" selection-end="21145" vertical-scroll-proportion="13.594721">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/questions.html">
+ <entry file="file://$PROJECT_DIR$/sql_scripts/badges.sql">
<provider selected="true" editor-type-id="text-editor">
- <state line="90" column="40" selection-start="4269" selection-end="4269" vertical-scroll-proportion="-0.33830845">
+ <state line="29" column="43" selection-start="2399" selection-end="2399" vertical-scroll-proportion="0.76552796">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/utils/lists.py">
+ <entry file="file://$PROJECT_DIR$/forum/models/meta.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="4" column="28" selection-start="139" selection-end="139" vertical-scroll-proportion="0.0">
+ <state line="89" column="0" selection-start="2688" selection-end="2688" vertical-scroll-proportion="0.84522">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/index.html">
+ <entry file="file://$PROJECT_DIR$/forum/badges/__init__.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="0" selection-start="1648" selection-end="1682" vertical-scroll-proportion="15.833333">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question_list.html">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="53" selection-start="288" selection-end="288" vertical-scroll-proportion="-3.8163266">
+ <state line="179" column="49" selection-start="11615" selection-end="11615" vertical-scroll-proportion="-6.244898">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question.html">
+ <entry file="file://$PROJECT_DIR$/forum/models/__init__.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="491" column="39" selection-start="31969" selection-end="31969" vertical-scroll-proportion="-7.632653">
+ <state line="35" column="105" selection-start="1086" selection-end="1086" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/forum/models/question.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="95" column="16" selection-start="3352" selection-end="3373" vertical-scroll-proportion="0.0">
+ <state line="1" column="72" selection-start="38" selection-end="38" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/views/readers.py">
+ <entry file="file://$PROJECT_DIR$/forum/models/base.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="531" column="42" selection-start="21760" selection-end="21760" vertical-scroll-proportion="0.0">
+ <state line="125" column="12" selection-start="4364" selection-end="4364" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/settings_local.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="17" selection-start="1141" selection-end="1141" vertical-scroll-proportion="0.0">
+ <state line="97" column="28" selection-start="2918" selection-end="2918" vertical-scroll-proportion="0.7936267">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/settings_local.py.dist">
+ <entry file="file://$PROJECT_DIR$/settings.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="42" column="26" selection-start="1400" selection-end="1400" vertical-scroll-proportion="0.7492212">
+ <state line="71" column="5" selection-start="2587" selection-end="2587" vertical-scroll-proportion="0.5356601">
<folding />
</state>
</provider>
diff --git a/forum/badges/__init__.py b/forum/badges/__init__.py new file mode 100755 index 00000000..5ed245af --- /dev/null +++ b/forum/badges/__init__.py @@ -0,0 +1,10 @@ +import re
+
+from forum.badges.base import BadgeImplementation
+from forum.modules import get_modules_script_classes
+
+ALL_BADGES = dict([
+ (re.sub('BadgeImpl', '', name).lower(), cls) for name, cls
+ in get_modules_script_classes('badges', BadgeImplementation).items()
+ if not re.search('AbstractBadgeImpl$', name)
+ ])
\ No newline at end of file diff --git a/forum/badges/base.py b/forum/badges/base.py new file mode 100755 index 00000000..154d4dfd --- /dev/null +++ b/forum/badges/base.py @@ -0,0 +1,11 @@ +
+
+class BadgeImplementation(object):
+ name = ""
+ description = ""
+
+ def install(self):
+ pass
+
+ def process_job(self):
+ raise NotImplementedError
\ No newline at end of file diff --git a/forum/management/commands/sximport.py b/forum/management/commands/sximport.py new file mode 100755 index 00000000..5a0bb96a --- /dev/null +++ b/forum/management/commands/sximport.py @@ -0,0 +1,109 @@ +from django.core.management.base import LabelCommand
+from zipfile import ZipFile
+from xml.dom import minidom as dom
+import datetime
+
+from forum.models import User
+
+class Command(LabelCommand):
+ def handle_label(self, label, **options):
+ zip = ZipFile(label)
+
+ map = {}
+
+ map['users'] = self.import_users(zip.open("Users.xml"))
+ map['questions'], map['answers'] = self.import_posts(zip.open("Posts.xml"))
+
+
+ def row_to_dic(self, row):
+ return dict([
+ (child.localName.lower(),
+ " ".join([t.nodeValue for t in child.childNodes if t.nodeType == t.TEXT_NODE]))
+ for child in row.childNodes
+ if child.nodeType == child.ELEMENT_NODE
+ ])
+
+ def from_sx_time(self, timestring):
+ if timestring is None:
+ return timestring
+
+ try:
+ return datetime.datetime.strptime(timestring, '%Y-%m-%dT%H:%M:%S')
+ except:
+ return datetime.datetime.strptime(timestring, '%Y-%m-%dT%H:%M:%S.%f')
+
+
+ def import_users(self, users):
+ pkey_map = {}
+ doc = dom.parse(users)
+
+ rows = doc.getElementsByTagName('row')
+ unknown_count = 0
+
+ added_names = []
+
+ for row in rows:
+ values = self.row_to_dic(row)
+
+ username = values.get('displayname',
+ values.get('realname',
+ values.get('email', None)))
+
+ if username is None:
+ unknown_count += 1
+ username = 'Unknown User %d' % unknown_count
+
+ if username in added_names:
+ cnt = 1
+ new_username = "%s %d" % (username, cnt)
+ while new_username in added_names:
+ cnt += 1
+ new_username = "%s %d" % (username, cnt)
+
+ username = new_username
+
+ added_names.append(username)
+
+ user = User(username=username, email=values.get('email', ''))
+
+ user.reputation = values['reputation']
+ user.last_seen = self.from_sx_time(values['lastaccessdate'])
+
+ user.real_name = values.get('realname', '')
+ user.about = values.get('aboutme', '')
+ user.website = values.get('websiteurl', '')
+ user.date_of_birth = self.from_sx_time(values.get('birthday', None))
+ user.location = values.get('location', '')
+
+ user.is_active = True
+ user.email_isvalid = True
+
+
+ if int(values['usertypeid']) == 5:
+ user.is_superuser = True
+
+ if int(values['usertypeid']) == 5:
+ user.is_staff = True
+
+ user.save()
+
+ pkey_map[values['id']] = user
+
+ return users
+
+ def import_posts(self, posts, map):
+ pkey_map = {}
+ doc = dom.parse(posts)
+
+ rows = doc.getElementsByTagName('row')
+
+ for row in rows:
+ map = {
+ 'title': row['']
+ }
+
+ pass
+ pass
+
+
+
diff --git a/forum/models/__init__.py b/forum/models/__init__.py index 09f5627f..01086213 100755 --- a/forum/models/__init__.py +++ b/forum/models/__init__.py @@ -122,9 +122,9 @@ def record_answer_event(instance, created, **kwargs): if created: q_author = instance.question.author found_match = False - print 'going through %d messages' % q_author.message_set.all().count() + #print 'going through %d messages' % q_author.message_set.all().count() for m in q_author.message_set.all(): - print m.message + #print m.message match = record_answer_event_re.search(m.message) if match: found_match = True @@ -134,15 +134,15 @@ def record_answer_event(instance, created, **kwargs): cnt = 1 m.message = u"You have received %d <a href=\"%s?sort=responses\">new responses</a>."\ % (cnt+1, q_author.get_profile_url()) - print 'updated message' - print m.message + #print 'updated message' + #print m.message m.save() break if not found_match: msg = u"You have received a <a href=\"%s?sort=responses\">new response</a>."\ % q_author.get_profile_url() - print 'new message' - print msg + #print 'new message' + #print msg q_author.message_set.create(message=msg) activity = Activity(user=instance.author, \ diff --git a/forum/models/base.py b/forum/models/base.py index 657f1e2f..2a8f3df9 100755 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -19,6 +19,13 @@ import logging from forum.const import * +class UserContent(models.Model): + user = models.ForeignKey(User, related_name='%(class)ss') + + class Meta: + abstract = True + app_label = 'forum' + class MetaContent(models.Model): """ Base class for Vote, Comment and FlaggedItem @@ -26,7 +33,6 @@ class MetaContent(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') - user = models.ForeignKey(User, related_name='%(class)ss') class Meta: abstract = True @@ -117,7 +123,7 @@ class Content(models.Model): except Exception: logging.debug('problem pinging google did you register you sitemap with google?') - def get_object_comments(self): + def get_comments(self): comments = self.comments.all().order_by('id') return comments diff --git a/forum/models/meta.py b/forum/models/meta.py index 7c3f5d36..af4a9f3d 100755 --- a/forum/models/meta.py +++ b/forum/models/meta.py @@ -22,7 +22,7 @@ class VoteManager(models.Manager): return 0 -class Vote(MetaContent): +class Vote(MetaContent, UserContent): VOTE_UP = +1 VOTE_DOWN = -1 VOTE_CHOICES = ( @@ -57,7 +57,7 @@ class FlaggedItemManager(models.Manager): else: return 0 -class FlaggedItem(MetaContent): +class FlaggedItem(MetaContent, UserContent): """A flag on a Question or Answer indicating offensive content.""" flagged_at = models.DateTimeField(default=datetime.datetime.now) @@ -70,7 +70,7 @@ class FlaggedItem(MetaContent): def __unicode__(self): return '[%s] flagged at %s' %(self.user, self.flagged_at) -class Comment(MetaContent): +class Comment(MetaContent, UserContent): comment = models.CharField(max_length=300) added_at = models.DateTimeField(default=datetime.datetime.now) @@ -86,4 +86,4 @@ class Comment(MetaContent): logging.debug('problem pinging google did you register you sitemap with google?') def __unicode__(self): - return self.comment
\ No newline at end of file + return self.comment diff --git a/forum/modules.py b/forum/modules.py index f786c719..6c9a9dba 100755 --- a/forum/modules.py +++ b/forum/modules.py @@ -54,7 +54,6 @@ def get_all_handlers(name): def get_handler(name, default): all = get_all_handlers(name) - print(len(all)) return len(all) and all[0] or default module_template_re = re.compile('^modules\/(\w+)\/(.*)$') diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css index 02148ab0..4f6b366b 100755 --- a/forum/skins/default/media/style/style.css +++ b/forum/skins/default/media/style/style.css @@ -1,8 +1,5 @@ @import url(jquery.autocomplete.css); -@import url(openid.css); -@import url(prettify.css); -/* 公用 */ body { background: #FFF; font-size: 12px; diff --git a/forum/skins/default/templates/authopenid/changeemail.html b/forum/skins/default/templates/authopenid/changeemail.html deleted file mode 100644 index 94d1881c..00000000 --- a/forum/skins/default/templates/authopenid/changeemail.html +++ /dev/null @@ -1,88 +0,0 @@ -{% extends "base_content.html" %} -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Change email" %}{% endspaceless %}{% endblock %} -{% block content %} -<!-- changeemail.html action_type={{action_type}}--> -{% ifequal action_type "change" %} - <div id="main-bar" class="headNormal"> - {% if user.email %} - {% trans "Change email" %} - {% else %} - {% trans "Save your email address" %} - {% endif %} - </div> - <p class="message"> - {% if user.email %} - {% blocktrans %}change {{email}} info{% endblocktrans %} - {% else %} - {% blocktrans %}here is why email is required, see {{gravatar_faq_url}}{% endblocktrans %} - {% endif %} - </p> - {% if msg %} - <p class="error">{{ msg }}</p> - {% endif %} - - <div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - {% if next %} - <input type="hidden" name="next" value="{{next}}"/> - {% endif %} - <div class="form-row-vertical"> - <label for="id_email">{% if user.email %}{% trans "Your new Email" %}{% else %}{% trans "Your Email" %}{% endif %}</label> - {% if form.email.errors %} - <p class="error">{{form.email.errors|join:", "}}</p> - {% endif %} - {{ form.email }} - </div> - <div class="submit-row"> - <input class="submit" type="submit" name="change_email" value="{% if user.email %}{% trans "Change email" %}{% else %}{% trans "Save Email" %}{% endif %}"> - {% if user.email %} - <input class="submit" type="submit" name="cancel" value="{% trans "Cancel" %}"> - {% endif %} - </div> - - </form> - </div> -{% endifequal %} -{% ifequal action_type "validate" %} - <div id="main-bar" class="headNormal"> - {% trans "Validate email" %} - </div> - <p class="message"> - {% blocktrans %}validate {{email}} info or go to {{change_email_url}}{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "keep" %} - <div id="main-bar" class="headNormal"> - {% trans "Email not changed" %} - </div> - <p class="message"> - {% blocktrans %}old {{email}} kept, if you like go to {{change_email_url}}{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "done_novalidate" %} - <div id="main-bar" class="headNormal"> - {% trans "Email changed" %} - </div> - <p class="message"> - {% blocktrans %}your current {{email}} can be used for this{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "validation_complete" %} - <div id="main-bar" class="headNormal"> - {% trans "Email verified" %} - </div> - <p class="message"> - {% trans "thanks for verifying email" %} - </p> -{% endifequal %} -{% ifequal action_type "key_not_sent" %} - <div id="main-bar" class="headNormal"> - {% trans "email key not sent" %} - </div> - <p class="message"> - {% blocktrans %}email key not sent {{email}} change email here {{change_link}}{% endblocktrans %} - </p> -{% endifequal %} -{% endblock %} -<!-- end changeemail.html --> diff --git a/forum/skins/default/templates/authopenid/changeopenid.html b/forum/skins/default/templates/authopenid/changeopenid.html deleted file mode 100644 index d01788fb..00000000 --- a/forum/skins/default/templates/authopenid/changeopenid.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "base.html" %} -<!-- changeopenid.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Change OpenID" %}{% endspaceless %}{% endblock %} -{% block content %} -<div id="main-bar" class=""> - <h3> - {% trans "Account: change OpenID URL" %} - </h3> -</div> - -<p>{% blocktrans %}This is where you can change your OpenID URL. Make sure you remember it!{% endblocktrans %}</p> -{% if form.errors %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - {% if form.openid_url.errors %} - <span class="error">{{ form.openid_url.errors|join:", " }}</span> - {% endif %} - - -</p> -{% endif %} -{% if msg %} - <p class="errors">{{ msg }}</p> -{% endif %} - -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - - <div id="form-row"><label for="id_openid_url">{% trans "OpenID URL:" %}</label>{{ form.openid_url }}</div> - <p><input type="submit" value="{% trans "Change OpenID" %}"></p> - - </form> - </div> -{% endblock %} -<!-- end changeopenid.html --> diff --git a/forum/skins/default/templates/authopenid/changepw.html b/forum/skins/default/templates/authopenid/changepw.html deleted file mode 100644 index 8b059544..00000000 --- a/forum/skins/default/templates/authopenid/changepw.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} -<!-- changepw.html --> -{% load i18n %} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans "Change password" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal">{% trans "Account: change password" %}</div> -<p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p> -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - <ul id="changepw-form" class="form-horizontal-rows"> - {{form.as_ul}} - </ul> - <div class="submit-row"><input type="submit" class="submit" value="{% trans "Change password" %}" /></div> - </form> - </div> -{% endblock %} -<!-- end changepw.html --> diff --git a/forum/skins/default/templates/authopenid/complete.html b/forum/skins/default/templates/authopenid/complete.html deleted file mode 100644 index 62970e38..00000000 --- a/forum/skins/default/templates/authopenid/complete.html +++ /dev/null @@ -1,130 +0,0 @@ -{% extends "base_content.html" %} -<!-- complete.html --> -{% comment %} -views calling this template: -* django_authopenid.views.register with login_type='openid' -* django_authopenid.views.signin - with login_type='legacy' - -parameters: -* provider -* login_type openid|legacy -* username (same as screen name or username in the models, and nickname in openid sreg) -* form1 - OpenidRegisterForm -* form2 - OpenidVerifyForm not clear what this form is supposed to do, not used for legacy -* email_feeds_form forum.forms.SimpleEmailSubscribeForm -* openid_username_exists -{% endcomment %} -{% load i18n %} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %} -{% block content %} - <div id="main-bar" class="headNormal"> - {% trans "Connect your OpenID with your account on this site" %} - </div> - <div id="completetxt" > - <div class="message"> - {% ifequal login_type 'openid' %} - {% blocktrans %}register new {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% else %} - {% ifequal login_type 'legacy' %} - {% if external_login_name_is_taken %} - {% blocktrans %}{{username}} already exists, choose another name for - {{provider}}. Email is required too, see {{gravatar_faq_url}} - {% endblocktrans %} - {% else %} - {% blocktrans %}register new external {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% endif %} - {% else %} - {% blocktrans %}register new Facebook connect account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% endifequal %} - {% endifequal %} - </div> - <p style="display:none">{% trans "This account already exists, please use another." %}</p> - </div> - - {% if form1.errors %} - <ul class="errorlist"> - {% if form1.non_field_errors %} - {% for error in form1.non_field_errors %} - <li>{{error}}</li> - {% endfor %} - {% endif %} - </ul> - {% endif %} - {% comment %} - {% if form2.errors %}<!--form2 is dysfunctional so commented out --> - <div class="errors"> - <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br/> - <ul class="error-list"> - {% if form2.username.errors %} - <li><span class="error">{{ form2.username.errors|join:", " }}</span></li> - {% endif %} - {% if form2.password.errors %} - <li><span class="error">{{ form2.password.errors|join:", " }}</span></li> - {% endif %} - </ul> - </div> - {% endif %} - {% endcomment %} - - <div class="login"> - {% ifequal login_type 'openid' %} - <form name="fregister" action="{% url user_register %}" method="POST"> - {% else %} - {% ifequal login_type 'facebook' %} - <form name="fregister" action="" method="POST"> - {% else %} - <form name="fregister" action="{% url user_signin %}" method="POST"> - {% endifequal %} - {% endifequal %} - {{ form1.next }} - <div class="form-row-vertical"> - <label for="id_username">{% trans "Screen name label" %}</label> - {% if form1.username.errors %} - <p class="error">{{ form1.username.errors|join:", " }}</p> - {% endif %} - {{ form1.username }} - </div> - <div class="form-row-vertical margin-bottom"> - <label for="id_email">{% trans "Email address label" %}</label> - {% if form1.email.errors %} - <p class="error">{{ form1.email.errors|join:", " }}</p> - {% endif %} - {{ form1.email }} - </div> - <p>{% trans "receive updates motivational blurb" %}</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - {% if email_feeds_form.errors %} - <p class="error">{% trans "please select one of the options above" %}</p> - {% endif %} - </div> - <p class='space-above'>{% trans "Tag filter tool will be your right panel, once you log in." %}</p> - <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"/></div> - </form> - </div> - {% comment %}<!-- this form associates openID with an existing password-protected account, not yet functional --> - {% if form2 %} - <div class="login" style="display:none"> - <form name="fverify" action="{% url user_register %}" method="POST"> - {{ form2.next }} - <fieldset style="padding:10px"> - <legend class="big">{% trans "Existing account" %}</legend> - <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br/>{{ form2.username }}</div> - <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br/>{{ form2.password }}</div> - <p><span class='big strong'>(Optional) receive updates by email</span> - only sent when there are any.</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - </div> - <!--todo double check translation from chinese 确认 = "Register" --> - <div class="submit-row"> - <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"/> - <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a> - </div> - </fieldset> - </form> - </div> - {% endif %} - {% endcomment %} -{% endblock %} -<!-- end complete.html --> diff --git a/forum/skins/default/templates/authopenid/confirm_email.txt b/forum/skins/default/templates/authopenid/confirm_email.txt deleted file mode 100644 index 3a01f146..00000000 --- a/forum/skins/default/templates/authopenid/confirm_email.txt +++ /dev/null @@ -1,13 +0,0 @@ -{% load i18n %} -{% trans "Thank you for registering at our Q&A forum!" %} - -{% trans "Your account details are:" %} - -{% trans "Username:" %} {{ username }} -{% trans "Password:" %} {{ password }} - -{% trans "Please sign in here:" %} -{{signup_url}} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/delete.html b/forum/skins/default/templates/authopenid/delete.html deleted file mode 100644 index 0f9f1c60..00000000 --- a/forum/skins/default/templates/authopenid/delete.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends "base.html" %} -<!-- delete.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Delete account" %}{% endspaceless %}{% endblock %} -{% block content %} -<div id="main-bar" class=""> - <h3> - {% trans "Account: delete account" %} - </h3> -</div> - -<p class="settings-descr">{% blocktrans %}Note: After deleting your account, anyone will be able to register this username.{% endblocktrans %}</p> -{% if form.errors %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - {% if form.confirm.errors %} - <span class="error">{% trans "Check confirm box, if you want delete your account." %}</span><br /> - {% endif %} - {% if form.password.errors %} - <span class="error">{% trans "Password:" %} {{ form.password.errors|join:", " }}</span> - {% endif %} -</p> -{% endif %} -{% if msg %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - <span class="error">{{ msg }}</span> - </p> -{% endif %} -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - - <div id="form-row"> {{ form.confirm }} {% trans "I am sure I want to delete my account." %}</div> - <div id="form-row"><label for="id_password">{% trans "Password/OpenID URL" %}</label>{{ form.password }} {% trans "(required for your security)" %}</div> - - <p><input type="submit" value="{% trans "Delete account permanently" %}"></p> - - </form> - </div> -{% endblock %} -<!-- end delete.html --> diff --git a/forum/skins/default/templates/authopenid/email_validation.txt b/forum/skins/default/templates/authopenid/email_validation.txt deleted file mode 100644 index 5b166a9b..00000000 --- a/forum/skins/default/templates/authopenid/email_validation.txt +++ /dev/null @@ -1,15 +0,0 @@ -{% load i18n %} -{% trans "Greetings from the Q&A forum" %}, - -{% trans "To make use of the Forum, please follow the link below:" %} - -{{validation_link}} - -{% trans "Following the link above will help us verify your email address." %} - -{% blocktrans %}If you beleive that this message was sent in mistake - -no further action is needed. Just ingore this email, we apologize -for any inconvenience{% endblocktrans %} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/external_legacy_login_info.html b/forum/skins/default/templates/authopenid/external_legacy_login_info.html deleted file mode 100644 index 3318499c..00000000 --- a/forum/skins/default/templates/authopenid/external_legacy_login_info.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base_content.html" %} -<!--customize this template--> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Traditional login information" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal"> - {% trans "Traditional login information" %} -</div> -{% spaceless %} -<div class="message"> -<!--add info about your external login site here--> -{% blocktrans %}how to login with password through external login website or use {{feedback_url}}{% endblocktrans %} -</div> -{% endspaceless %} -{% endblock %} diff --git a/forum/skins/default/templates/authopenid/failure.html b/forum/skins/default/templates/authopenid/failure.html deleted file mode 100644 index d075d6b0..00000000 --- a/forum/skins/default/templates/authopenid/failure.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd"> -<!-- failure.html --> -<html> -<head> - <title>OpenID failed</title> -</head> -<body> -<h1>OpenID failed</h1> - -<p>{{ message|escape }}</p> - -</body> -</html><!-- end failure.html --> diff --git a/forum/skins/default/templates/authopenid/sendpw.html b/forum/skins/default/templates/authopenid/sendpw.html deleted file mode 100644 index 6241c811..00000000 --- a/forum/skins/default/templates/authopenid/sendpw.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base.html" %} -<!-- sendpw.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Send new password" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal"> - {% trans "Send new password" %} -</div> -<p class="message"> -{% trans "password recovery information" %} -</p> -{% if msg %} - <p class="action-status"><span>{{msg}}</span><p> -{% endif %} - -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - <ul id="emailpw-form" class="form-horizontal-rows"> - {{form.as_ul}} - </ul> - <p style="padding-top:10px"><input type="submit" class="submit" value="{% trans "Reset password" %}" /> - <a href="{% url user_signin %}"><span class="strong">{% trans "return to login" %}</span></a></p> - </form> -</div> -{% endblock %} -<!-- end sendpw.html --> diff --git a/forum/skins/default/templates/authopenid/sendpw_email.txt b/forum/skins/default/templates/authopenid/sendpw_email.txt deleted file mode 100644 index f044ca45..00000000 --- a/forum/skins/default/templates/authopenid/sendpw_email.txt +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -{% blocktrans%}Someone has requested to reset your password on {{site_url}}. -If it were not you, it is safe to ignore this email.{% endblocktrans %} - -{% blocktrans %}email explanation how to use new {{password}} for {{username}} -with the {{key_link}}{% endblocktrans %} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/settings.html b/forum/skins/default/templates/authopenid/settings.html deleted file mode 100644 index 66ea5953..00000000 --- a/forum/skins/default/templates/authopenid/settings.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base_content.html" %} -<!-- settings.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Account functions" %}{% endspaceless %}{% endblock %} -{% block head %} -<style type="text/css" media="screen"> - h4 {font-size:12pt;} - dt, dd { padding:0 0 0.35em 0; } - dt { float: left; width: 21ex; } - dd { margin-left: 23ex; } - - #settings-options, #settings-intro { padding: 4em 1.5em;} - #settings-options { min-height: 300px; border-left: 1px solid #333;} - - #settings-options h5 { font-weight: bold;} -</style> -{% endblock %} - -{% block content %} -<div id="main-bar"> - <h3><strong>{{ request.user.username }} {% trans "Profile" %}</strong></h3> -</div> -<div id="settings-options"> - {% if msg %} - <p class="error">{{ msg }}</p> - {% endif %} - - <dl class="list-item"> - <dt>» <a href="{% url user_changepw %}">{% trans "Change password" %}</a></dt> - <dd>{% trans "Give your account a new password." %}</dd> - <dt>» <a href="{% url user_changeemail %}">{% trans "Change email " %}</a></dt> - <dd>{% trans "Add or update the email address associated with your account." %}</dd> - {% if is_openid %} - <dt>» <a href="{% url user_changeopenid %}">{% trans "Change OpenID" %}</a></dt> - <dd>{% trans "Change openid associated to your account" %}</dd> - {% endif %} - - <dt>» <a href="{% url user_delete %}">{% trans "Delete account" %}</a></dt> - <dd>{% trans "Erase your username and all your data from website" %}</dd> - </dl> -</div> -{% endblock %} -<!-- end settings.html --> diff --git a/forum/skins/default/templates/authopenid/signin.html b/forum/skins/default/templates/authopenid/signin.html deleted file mode 100755 index 4e060d0f..00000000 --- a/forum/skins/default/templates/authopenid/signin.html +++ /dev/null @@ -1,186 +0,0 @@ -{% extends "base.html" %}
-<!-- signin.html -->
-{% load i18n %}
-{% load extra_tags %}
-{% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %}
-{% block forejs %}
- <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
-
- <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/jquery-openid/openid.css" %}"/>
- <script type="text/javascript" src="{% media "/media/jquery-openid/jquery.openid.js" %}"></script>
- <script type="text/javascript"> $().ready( function() { $("form.openid:eq(0)").openid(); })</script>
- <!--<script type="text/javascript">
- $().ready(function(){
- openid.init('id_openid_url');
- setupFormValidation("#openid_form", {bsignin:{required: true}});
- });
- </script>-->
-{% endblock %}
-{% block content %}
-<div class="headNormal">
- {% trans "User login" %}
-</div>
- {% if msg %}
- <p class="warning">{{ msg }}</p>
- {% endif %}
- {% if answer %}
- <div class="message">
- {% blocktrans with answer.question.title as title and answer.summary as summary %}
- Your answer to {{title}} {{summary}} will be posted once you log in
- {% endblocktrans %}
- </div>
- {% endif %}
- {% if question %}
- <div class="message">
- {% blocktrans with question.title as title and question.summary as summary %}Your question
- {{title}} {{summary}} will be posted once you log in
- {% endblocktrans %}
- </div>
- {% endif %}
- <form id="openid_form" name="openid_form" class="openid" method="post" action="{% url user_signin %}">
- <div style="width:600px;float:left;margin-bottom:5px;">
- {% trans "Click to sign in through any of these services." %}
- </div>
- <ul class="providers">
- <li class="local" title="Local login">
- <div class="logo_box local_login_box">
- <img src="{% media "/media/jquery-openid/images/local-login.png" %}" alt="your icon here" />
- </div>
- <span></span>
- </li>
- <li class="direct" title="Google">
- <div class="logo_box google_box">
- <img src="{% media "/media/jquery-openid/images/google.gif" %}" alt="icon" /><span>https://www.google.com/accounts/o8/id</span>
- </div>
- </li>
- <li class="direct" title="Yahoo">
- <div class="logo_box yahoo_box">
- <img src="{% media "/media/jquery-openid/images/yahoo.gif" %}" alt="icon" /><span>http://yahoo.com/</span>
- </div>
- </li>
- <li class="username" title="AOL screen name">
- <div class="logo_box aol_box">
- <img src="{% media "/media/jquery-openid/images/aol.gif" %}" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span>
- </div>
- </li>
- </ul>
- <ul id="openid_small_providers" class="providers">
- <!--<li class="openid" title="OpenID">
- <div class="logo_box openid_box">
- <img src="/media/jquery-openid/images/openid.gif" alt="icon" />
- </div>
- <span><strong>http://{your-openid-url}</strong></span>
- </li>-->
- <li class="first_tiny_li facebook" title="Facebook Connect">
- {% if question %}
- <fb:login-button onlogin="window.location = '{% url fb_signin_new_question %}'"></fb:login-button>
- {% else %}
- {% if answer %}
- <fb:login-button onlogin="window.location = '{% url fb_signin_new_answer %}'"></fb:login-button>
- {% else %}
- <fb:login-button onlogin="window.location = '{% url fb_signin %}'"></fb:login-button>
- {% endif %}
- {% endif %}
- </li>
- <li class="openid" title="OpenID URL">
- <img src="{% media "/media/jquery-openid/images/openidico16.png" %}" alt="icon" />
- <span>http://{your-openid-url}</span>
- </li>
- <li class="username" title="MyOpenID user name">
- <img src="{% media "/media/jquery-openid/images/myopenid-2.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.myopenid.com/</span>
- </li>
- <li class="username" title="Flickr user name">
- <img src="{% media "/media/jquery-openid/images/flickr.png" %}" alt="icon" />
- <span>http://flickr.com/<strong>username</strong>/</span>
- </li>
- <li class="username" title="Technorati user name">
- <img src="{% media "/media/jquery-openid/images/technorati-1.png" %}" alt="icon" />
- <span>http://technorati.com/people/technorati/<strong>username</strong>/</span>
- </li>
- <li class="username" title="Wordpress blog name">
- <img src="{% media "/media/jquery-openid/images/wordpress.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.wordpress.com</span>
- </li>
- <li class="username" title="Blogger blog name">
- <img src="{% media "/media/jquery-openid/images/blogger-1.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.blogspot.com/</span>
- </li>
- <li class="username" title="LiveJournal blog name">
- <img src="{% media "/media/jquery-openid/images/livejournal-1.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.livejournal.com</span>
- </li>
- <li class="username" title="ClaimID user name">
- <img src="{% media "/media/jquery-openid/images/claimid-0.png" %}" alt="icon" />
- <span>http://claimid.com/<strong>username</strong></span>
- </li>
- <li class="username" title="Vidoop user name">
- <img src="{% media "/media/jquery-openid/images/vidoop.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.myvidoop.com/</span>
- </li>
- <li class="username" title="Verisign user name">
- <img src="{% media "/media/jquery-openid/images/verisign-2.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.pip.verisignlabs.com/</span>
- </li>
- </ul>
- {{ form2.next }}
- <fieldset>
- <p id="provider_name_slot">{% trans 'Enter your <span id="enter_your_what">Provider user name</span>' %}</p>
- <div><p><span></span>
- <input id="openid_username" type="text" name="openid_username" /><span></span>
- <input type="submit" value="Login" />
- </p></div>
- </fieldset>
- <fieldset>
- <p>{% trans 'Enter your <a class="openid_logo" href="http://openid.net">OpenID</a> web address' %}</p>
- <div><p><input id="openid_url" type="text" value="http://" name="openid_url" />
- <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" /></p></div>
- </fieldset>
- <fieldset id='local_login_fs'>
- <p>{% trans 'Enter your login name and password' %}</p>
- {% if form1.errors %}
- {{form1.non_field_errors.as_ul}}
- {% endif %}
- <div><p class="login"><label for="id_username">{% trans "Login name" %}</label>
- {{form1.username}}</p>
- <p class="login"><label for="id_password">{% trans "Password" %}</label>
- {{form1.password}}</p>
- <p id="local_login_buttons">
- <input id="blogin" name="blogin" type="submit" value="{% trans "Login" %}" />
- <a href="{% url user_signup %}">{% trans "Create account" %}</a><br/>
- <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a>
- </p>
- </div>
- </fieldset>
- </form>
-{% endblock %}
-
-{% block sidebar %}
-<div class="boxC">
- <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
- <ul class="list-item">
- <li>
- {% trans "with openid it is easier" %}
- </li>
- <li>
- {% trans "reuse openid" %}
- </li>
- <li>
- {% trans "openid is widely adopted" %}
- </li>
- <li>
- {% trans "openid is supported open standard" %}
- </li>
-
- </ul>
- <p class="info-box-follow-up-links">
- <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} »</a><br/>
- <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} »</a>
- </p>
-</div>
-<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></script>
-<script type="text/javascript"> FB.init("{{ fb_api_key }}","{% url xd_receiver %}");</script>
-{% endblock%}
-
- <script type="text/javascript"> $( function() { $("form.openid:eq(0)").openid(); })</script>
-<!-- end signin.html -->
diff --git a/forum/skins/default/templates/authopenid/signup.html b/forum/skins/default/templates/authopenid/signup.html deleted file mode 100644 index fdb236c2..00000000 --- a/forum/skins/default/templates/authopenid/signup.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "base_content.html" %} -<!--signup.html--> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %} - -{% block content %} -<div class="headNormal"> - {% trans "Create login name and password" %} -</div> -<p class="message">{% trans "Traditional signup info" %}</p> -<form action="{% url user_signup %}" method="post" accept-charset="utf-8"> - <ul class="form-horizontal-rows"> - <li><label for="usename_id">{{form.username.label}}</label>{{form.username}}{{form.username.errors}}</li> - <li><label for="email_id">{{form.email.label}}</label>{{form.email}}{{form.email.errors}}</li> - <li><label for="password1_id">{{form.password1.label}}</label>{{form.password1}}{{form.password1.errors}}</li> - <li><label for="password2_id">{{form.password2.label}}</label>{{form.password2}}{{form.password2.errors}}</li> - </ul> - <p class="margin-top">{% trans "receive updates motivational blurb" %}</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - {% if email_feeds_form.errors %} - <p class="error">{% trans "please select one of the options above" %}</p> - {% endif %} - </div> - <p class="signup_p">{% trans "Please read and type in the two words below to help us prevent automated account creation." %}</p> - {{form.recaptcha}} - <div class="submit-row"><input type="submit" class="submit" value="{% trans "Create Account" %}" /> - <strong>{% trans "or" %} - <a href="{% url user_signin %}">{% trans "return to OpenID login" %}</a></strong></div> -</form> -{% endblock %} -<!--end signup.html--> diff --git a/forum/skins/default/templates/authopenid/yadis.xrdf b/forum/skins/default/templates/authopenid/yadis.xrdf deleted file mode 100644 index a9ed44fe..00000000 --- a/forum/skins/default/templates/authopenid/yadis.xrdf +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<xrds:XRDS - xmlns:xrds='xri://$xrds' - xmlns:openid='http://openid.net/xmlns/1.0' - xmlns='xri://$xrd*($v*2.0)'> - <XRD> - <Service> - <Type>http://specs.openid.net/auth/2.0/return_to</Type> - {% for uri in return_to %} - <URI>{{ uri }}</URI> - {% endfor %} - </Service> - </XRD> -</xrds:XRDS>
\ No newline at end of file diff --git a/forum/skins/default/templates/index.html b/forum/skins/default/templates/index.html index eb4dc224..61a5e6b3 100755 --- a/forum/skins/default/templates/index.html +++ b/forum/skins/default/templates/index.html @@ -71,7 +71,7 @@ {% for award in awards %}
<li>
<a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
- <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a> {% trans "given to" %}
+ <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a>
<a href="/users/{{ award.user_id }}/{{ award.user_name|slugify }}/">{{ award.user_name }}</a>
</li>
{% endfor %}
diff --git a/forum/views/auth.py b/forum/views/auth.py index 1b57853a..72b0af29 100644 --- a/forum/views/auth.py +++ b/forum/views/auth.py @@ -271,6 +271,7 @@ def auth_settings(request): request.user.message_set.create(message=_("Your password was changed")) else: request.user.message_set.create(message=_("New password set")) + form = ChangePasswordForm(user=user_) user_.set_password(form.cleaned_data['password1']) user_.save() diff --git a/forum_modules/facebookauth/views.py b/forum_modules/facebookauth/views.py index d1d72c5d..f77c6282 100755 --- a/forum_modules/facebookauth/views.py +++ b/forum_modules/facebookauth/views.py @@ -4,7 +4,7 @@ from django.http import HttpResponse def user_is_registered(request): try: fb_uid = request.POST['fb_uid'] - print fb_uid + #print fb_uid AuthKeyUserAssociation.objects.get(key=fb_uid) return HttpResponse('yes') except: diff --git a/settings.py b/settings.py index f9357877..a84ba4a6 100644 --- a/settings.py +++ b/settings.py @@ -5,7 +5,7 @@ import sys SITE_ID = 1 -ADMIN_MEDIA_PREFIX = '/forum/admin/media/' +ADMIN_MEDIA_PREFIX = '/admin_media/' SECRET_KEY = '$oo^&_m&qwbib=(_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( @@ -69,6 +69,7 @@ INSTALLED_APPS = [ 'django.contrib.humanize', 'django.contrib.sitemaps', 'debug_toolbar', + #'django_evolution', 'forum', ] diff --git a/settings_local.py.dist b/settings_local.py.dist index a27946af..5651fec7 100755 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -42,6 +42,9 @@ DATABASE_PORT = '' #CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/') CACHE_BACKEND = 'dummy://' +#If you use memcache you may want to uncomment the following line to enable memcached based sessions +#SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db' + #email server settings SERVER_EMAIL = '' DEFAULT_FROM_EMAIL = '' |