summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhrcerqueira <hrcerqueira@gmail.com>2010-03-04 21:40:08 +0000
committerhrcerqueira <hrcerqueira@gmail.com>2010-03-04 21:40:08 +0000
commit0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05 (patch)
tree461c96999ee24b5dcb42b5efa649dcea5f4a2cdf
parentf582a06a4dcd03c180dfcc52c5bfcdbb900e4623 (diff)
downloadaskbot-0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05.tar.gz
askbot-0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05.tar.bz2
askbot-0d1d1ef3a3416b5bcd4eb867356484b28f0c7f05.zip
Started implementing cache.
Added placeholders in log folder, and the new cache folder so git wont ignore them.
-rw-r--r--.gitignore1
-rwxr-xr-x.idea/workspace.xml241
-rwxr-xr-xcache/README.TXT1
-rwxr-xr-xforum/models/question.py28
-rwxr-xr-xforum/skins/default/templates/footer.html2
-rwxr-xr-xforum/skins/default/templates/index.html41
-rwxr-xr-xforum/skins/default/templates/question.html18
-rwxr-xr-xforum/skins/default/templates/question_list.html42
-rwxr-xr-xforum/skins/default/templates/questions.html47
-rwxr-xr-xforum/utils/lists.py4
-rw-r--r--forum/views/readers.py1
-rwxr-xr-xforum_modules/robotstxt/DISABLED0
-rwxr-xr-xlog/README.TXT1
-rwxr-xr-xsettings_local.py.dist6
14 files changed, 208 insertions, 225 deletions
diff --git a/.gitignore b/.gitignore
index 70910647..49cba440 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*.pyc
*.swp
*.log
+cache/??
osqa.wsgi
nbproject
settings_local.py
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a17f2c4c..0fe5d429 100755
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -29,8 +29,8 @@
<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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/email_base.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/email_base.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/feedback_email.txt" afterPath="$PROJECT_DIR$/forum/skins/default/templates/feedback_email.txt" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/osqa.iml" afterPath="$PROJECT_DIR$/osqa.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/books/views.py" afterPath="$PROJECT_DIR$/forum_modules/books/views.py" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/osqa.iml" afterPath="$PROJECT_DIR$/osqa.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/tags.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/tags.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/models/tag.py" afterPath="$PROJECT_DIR$/forum/models/tag.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/pgfulltext/__init__.py" afterPath="$PROJECT_DIR$/forum_modules/pgfulltext/__init__.py" />
@@ -85,6 +85,7 @@
<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" />
@@ -176,14 +177,15 @@
<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$/forum/skins/default/templates/auth/temp_login_request.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/auth/temp_login_request.html" />
<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="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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/openidauth/authentication.py" afterPath="$PROJECT_DIR$/forum_modules/openidauth/authentication.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/authentication/forms.py" afterPath="$PROJECT_DIR$/forum/authentication/forms.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/close-small-hover.png" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/close-small-hover.png" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/robotstxt/templates/robots.txt" afterPath="$PROJECT_DIR$/forum_modules/robotstxt/templates/robots.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/views/writers.py" afterPath="$PROJECT_DIR$/forum/views/writers.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py" afterPath="$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/books/__init__.py" afterPath="$PROJECT_DIR$/forum_modules/books/__init__.py" />
@@ -225,8 +227,8 @@
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/yuicompressor-2.4.2.jar" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/yuicompressor-2.4.2.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/blogger.ico" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/blogger.ico" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.i18n.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/jquery.i18n.js" />
- <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_modules/sphinxfulltext/handlers.py" afterPath="$PROJECT_DIR$/forum_modules/sphinxfulltext/handlers.py" />
+ <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" />
@@ -249,6 +251,7 @@
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum_modules/localauth/forms.py" afterPath="$PROJECT_DIR$/forum_modules/localauth/forms.py" />
<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="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/images/openid/facebook.gif" afterPath="$PROJECT_DIR$/forum/skins/default/media/images/openid/facebook.gif" />
@@ -312,7 +315,9 @@
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/auth/auth_settings.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/auth/auth_settings.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/templates/user_info.html" afterPath="$PROJECT_DIR$/forum/skins/default/templates/user_info.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/forum/skins/default/media/js/com.cnprog.editor.js" afterPath="$PROJECT_DIR$/forum/skins/default/media/js/com.cnprog.editor.js" />
+ <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="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" />
@@ -379,46 +384,82 @@
<component name="FileColors" enabled="true" enabledForTabs="true" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="pg_once_award_badges.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py">
+ <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="349" column="28" selection-start="13856" selection-end="13856" vertical-scroll-proportion="-20.24">
+ <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="__init__.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/__init__.py">
+ <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">
<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="42" column="26" selection-start="1400" selection-end="1400" vertical-scroll-proportion="0.7492212">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/urls.py">
+ <file leaf-file-name="readers.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/forum/views/readers.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="4" column="76" selection-start="203" selection-end="203" vertical-scroll-proportion="0.0">
+ <state line="531" column="42" selection-start="21760" selection-end="21760" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="robots.txt" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/templates/robots.txt">
+ <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="1" column="34" selection-start="26" selection-end="26" vertical-scroll-proportion="0.025796661">
+ <state line="95" column="16" selection-start="3352" selection-end="3373" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/forum_modules/facebookauth/urls.py">
+ <file leaf-file-name="lists.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/forum/utils/lists.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="127" selection-start="169" selection-end="292" vertical-scroll-proportion="0.0">
+ <state line="4" column="28" selection-start="139" selection-end="139" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="settings.py" pinned="false" current="false" current-in-tab="false">
+ <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">
<folding />
</state>
</provider>
@@ -434,22 +475,22 @@
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
- <option value="$PROJECT_DIR$/settings.py" />
- <option value="$PROJECT_DIR$/forum/models/repute.py" />
- <option value="$PROJECT_DIR$/forum/urls.py" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/index.html" />
- <option value="$PROJECT_DIR$/forum/skins/default/templates/user_stats.html" />
- <option value="$PROJECT_DIR$/forum/management/commands/pg_clean_award_badges.py" />
- <option value="$PROJECT_DIR$/forum/management/commands/clean_award_badges.py" />
- <option value="$PROJECT_DIR$/forum/models/__init__.py" />
- <option value="$PROJECT_DIR$/forum/management/commands/pg_base_command.py" />
- <option value="$PROJECT_DIR$/forum/management/commands/pg_multi_award_badges.py" />
- <option value="$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py" />
- <option value="$PROJECT_DIR$/cron/once_award_badges" />
<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/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$/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$/settings_local.py" />
+ <option value="$PROJECT_DIR$/settings_local.py.dist" />
</list>
</option>
</component>
@@ -518,7 +559,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="forum_modules" />
+ <option name="myItemId" value="log" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -535,10 +576,6 @@
<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="facebookauth" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -550,43 +587,11 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="forum" />
- <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="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="views" />
- <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="forum_modules" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="skins" />
+ <option name="myItemId" value="robotstxt" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -603,14 +608,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="skins" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="default" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -626,15 +623,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="skins" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="default" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="media" />
+ <option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -652,7 +641,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="models" />
+ <option name="myItemId" value="utils" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -670,7 +659,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="management" />
+ <option name="myItemId" value="templatetags" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -688,11 +677,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="management" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="commands" />
+ <option name="myItemId" value="models" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -735,9 +720,11 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
+ <recent name="C:\osqadev\100302\osqa\cache" />
<recent name="C:\osqadev\100302\osqa" />
</key>
<key name="MoveFile.RECENT_KEYS">
+ <recent name="C:\osqadev\100302\osqa" />
<recent name="C:\osqadev\100302\osqa\forum" />
<recent name="C:\osqadev\100302\osqa\forum\skins\default\templates\auth" />
</key>
@@ -962,7 +949,7 @@
</component>
<component name="ToolWindowManager">
<frame x="1277" y="-3" width="1286" height="806" extended-state="6" />
- <editor active="false" />
+ <editor active="true" />
<layout>
<window_info id="Archetypes" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
@@ -978,7 +965,7 @@
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26969942" sideWeight="0.659854" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26969942" sideWeight="0.659854" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
@@ -1018,114 +1005,114 @@
<breakpoint-manager />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/forum/management/commands/pg_base_command.py">
+ <entry file="file://$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="27" column="59" selection-start="1022" selection-end="1022" vertical-scroll-proportion="0.0">
+ <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$/forum/management/commands/pg_multi_award_badges.py">
+ <entry file="file://$PROJECT_DIR$/log/README.TXT">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="20" selection-start="810" selection-end="810" vertical-scroll-proportion="-14.96">
+ <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$/forum/management/commands/pg_clean_award_badges.py">
+ <entry file="file://$PROJECT_DIR$/cache/README.TXT">
<provider selected="true" editor-type-id="text-editor">
- <state line="58" column="10" selection-start="1683" selection-end="1683" vertical-scroll-proportion="0.0">
+ <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$/cron/README">
+ <entry file="file://$PROJECT_DIR$/settings.py">
<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="70" column="20" selection-start="2587" selection-end="2587" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/cron/multi_award_badges_virtualenv">
+ <entry file="file://$PROJECT_DIR$/.gitignore">
<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="3" column="8" selection-start="26" selection-end="26" vertical-scroll-proportion="0.077389985">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/cron/multi_award_badges">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/base.html">
<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="0" vertical-scroll-proportion="-0.87741935">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/cron/send_email_alerts">
+ <entry file="file://$PROJECT_DIR$/forum/templatetags/extra_filters.py">
<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="84" column="11" selection-start="2136" selection-end="2137" vertical-scroll-proportion="-24.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/auth/signin.html">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/questions.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="33" column="34" selection-start="1093" selection-end="1093" vertical-scroll-proportion="0.63064516">
+ <state line="90" column="40" selection-start="4269" selection-end="4269" vertical-scroll-proportion="-0.33830845">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/tag_selector.html">
+ <entry file="file://$PROJECT_DIR$/forum/utils/lists.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="79" selection-start="2121" selection-end="2121" vertical-scroll-proportion="0.85714287">
+ <state line="4" column="28" selection-start="139" selection-end="139" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/cron/once_award_badges">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/index.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="7" column="0" selection-start="182" selection-end="560" vertical-scroll-proportion="0.18057664">
+ <state line="34" column="0" selection-start="1648" selection-end="1682" vertical-scroll-proportion="15.833333">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/INSTALL">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question_list.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-5.3726707">
+ <state line="11" column="53" selection-start="288" selection-end="288" vertical-scroll-proportion="-3.8163266">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum/management/commands/pg_once_award_badges.py">
+ <entry file="file://$PROJECT_DIR$/forum/skins/default/templates/question.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="349" column="28" selection-start="13856" selection-end="13856" vertical-scroll-proportion="-20.24">
+ <state line="491" column="39" selection-start="31969" selection-end="31969" vertical-scroll-proportion="-7.632653">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/__init__.py">
+ <entry file="file://$PROJECT_DIR$/forum/models/question.py">
<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="95" column="16" selection-start="3352" selection-end="3373" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum_modules/facebookauth/urls.py">
+ <entry file="file://$PROJECT_DIR$/forum/views/readers.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="127" selection-start="169" selection-end="292" vertical-scroll-proportion="0.0">
+ <state line="531" column="42" selection-start="21760" selection-end="21760" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/urls.py">
+ <entry file="file://$PROJECT_DIR$/settings_local.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="4" column="76" selection-start="203" selection-end="203" vertical-scroll-proportion="0.0">
+ <state line="41" column="17" selection-start="1141" selection-end="1141" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/forum_modules/robotstxt/templates/robots.txt">
+ <entry file="file://$PROJECT_DIR$/settings_local.py.dist">
<provider selected="true" editor-type-id="text-editor">
- <state line="1" column="34" selection-start="26" selection-end="26" vertical-scroll-proportion="0.025796661">
+ <state line="42" column="26" selection-start="1400" selection-end="1400" vertical-scroll-proportion="0.7492212">
<folding />
</state>
</provider>
diff --git a/cache/README.TXT b/cache/README.TXT
new file mode 100755
index 00000000..54247a82
--- /dev/null
+++ b/cache/README.TXT
@@ -0,0 +1 @@
+this file is just a placeholder so the empty directory is not ignored by version control \ No newline at end of file
diff --git a/forum/models/question.py b/forum/models/question.py
index 1c2cf749..f351dff0 100755
--- a/forum/models/question.py
+++ b/forum/models/question.py
@@ -1,6 +1,8 @@
from base import *
from tag import Tag
+from forum.utils.lists import LazyList
+
class QuestionManager(models.Manager):
def create_new(self, title=None,author=None,added_at=None, wiki=False,tagnames=None,summary=None, text=None):
question = Question(
@@ -98,17 +100,25 @@ class QuestionManager(models.Manager):
Questions with the individual tags will be added to list if above questions are not full.
"""
#print datetime.datetime.now()
- questions = list(self.filter(tagnames = question.tagnames, deleted=False).all())
- tags_list = question.tags.all()
- for tag in tags_list:
- extend_questions = self.filter(tags__id = tag.id, deleted=False)[:50]
- for item in extend_questions:
- if item not in questions and len(questions) < 10:
- questions.append(item)
+ manager = self
+
+ def get_data():
+ questions = list(manager.filter(tagnames = question.tagnames, deleted=False).all())
+
+ tags_list = question.tags.all()
+ for tag in tags_list:
+ extend_questions = manager.filter(tags__id = tag.id, deleted=False)[:50]
+ for item in extend_questions:
+ if item not in questions and len(questions) < 10:
+ questions.append(item)
+
+ #print datetime.datetime.now()
+ return questions
+
+ return LazyList(get_data)
+
- #print datetime.datetime.now()
- return questions
class Question(Content, DeletableContent):
title = models.CharField(max_length=300)
diff --git a/forum/skins/default/templates/footer.html b/forum/skins/default/templates/footer.html
index 2f95921d..66ea2bc5 100755
--- a/forum/skins/default/templates/footer.html
+++ b/forum/skins/default/templates/footer.html
@@ -21,7 +21,7 @@
{% endspaceless %}
</div>
<p>
- <a href="http://github.com/cnprog/CNPROG/network" target="_blank">
+ <a href="http://osqa.net" target="_blank">
powered by OSQA
</a>
</p>
diff --git a/forum/skins/default/templates/index.html b/forum/skins/default/templates/index.html
index 42fa175d..eb4dc224 100755
--- a/forum/skins/default/templates/index.html
+++ b/forum/skins/default/templates/index.html
@@ -5,6 +5,7 @@
{% load humanize %}
{% load extra_filters %}
{% load smart_if %}
+{% load cache %}
{% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}
{% block meta %}<meta name="keywords" content="{{ settings.APP_KEYWORDS }}" />
<meta name="description" content="{{ settings.APP_DESCRIPTION }}" />{% endblock %}
@@ -31,41 +32,7 @@
</div>
</div>
<!-- ???? -->
-<div id="listA">
- {% for question in questions.object_list %}
- <div class="short-summary">
- <div class="counts">
- <div class="votes">
- <div class="item-count">{{question.score|intcomma}}</div>
- <div>{% trans "votes" %}</div>
- </div >
- <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
- <div class="item-count">{{question.answer_count|intcomma}}</div>
- <div>{% trans "answers" %}</div>
- </div>
- <div class="views">
- <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
- <div>{% trans "views" %}</div>
- </div>
- </div>
-
- <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
-
- <div class="userinfo">
- <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
- {% if question.last_activity_by %}
- <a href="/users/{{ question.last_activity_by.id }}/{{ question.last_activity_by.username|slugify }}/">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
- {% endif %}
- </div>
-
- <div class="tags">
- {% for tag in question.tagname_list %}
- <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
- {% endfor %}
- </div>
- </div>
- {% endfor %}
-</div>
+{% include "question_list.html" %}
{% endblock %}
{% block sidebar %}
@@ -85,10 +52,12 @@
<h3>{% trans "Recent tags" %}</h3>
<div class="body">
<div class="tags">
+ {% cache 60 recent_tags %}
{% for tag in tags %}
<a rel="tag"
title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url tag_questions tag.name|urlencode %}">{{ tag.name }}</a>
{% endfor %}
+ {% endcache %}
</div>
<div class="more"><a href="{% url tags %}">{% trans "popular tags" %} </a> </div>
</div>
@@ -98,6 +67,7 @@
<h3>{% trans "Recent awards" %}</h3>
<div class="body">
<ul class="badge-list">
+ {% cache 60 recent_awards %}
{% for award in awards %}
<li>
<a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
@@ -105,6 +75,7 @@
<a href="/users/{{ award.user_id }}/{{ award.user_name|slugify }}/">{{ award.user_name }}</a>
</li>
{% endfor %}
+ {% endcache %}
</ul>
<div class="more"><a href="{% url badges %}">{% trans "all awards" %} </a> </div>
</div>
diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html
index 23c24113..3df778dc 100755
--- a/forum/skins/default/templates/question.html
+++ b/forum/skins/default/templates/question.html
@@ -5,6 +5,7 @@
{% load smart_if %}
{% load humanize %}
{% load i18n %}
+{% load cache %}
{% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %}
{% block forejs %}
<meta name="description" content="{{question.summary}}" />
@@ -164,8 +165,8 @@
{% endjoinitems %}
</div>
<div class="post-update-info-container">
- {% post_contributor_info question "original_author" %}
- {% post_contributor_info question "last_updater" %}
+ {% post_contributor_info question "original_author" %}
+ {% post_contributor_info question "last_updater" %}
</div>
<div class="comments-container" id="comments-container-question-{{question.id}}">
{% for comment in question.get_comments|slice:":5" %}
@@ -313,8 +314,8 @@
{% endjoinitems %}
</div>
<div class="post-update-info-container">
- {% post_contributor_info answer "original_author" %}
- {% post_contributor_info answer "last_updater" %}
+ {% post_contributor_info answer "original_author" %}
+ {% post_contributor_info answer "last_updater" %}
</div>
<div class="comments-container" id="comments-container-answer-{{answer.id}}">
{% for comment in answer.get_comments|slice:":5" %}
@@ -468,6 +469,7 @@
{% endblock %}
{% block sidebar %}
+{% cache 600 questions_tags question.id %}
<div class="boxC">
<p>
{% trans "Question tags" %}:
@@ -489,17 +491,21 @@
{% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>
</p>
</div>
-
+{% endcache %}
+{% cache 1800 related_questions question.id %}
<div class="boxC">
<h3 class="subtitle">{% trans "Related questions" %}</h3>
<div class="questions-related">
- {% for question in similar_questions %}
+
+ {% for question in similar_questions.data %}
<p>
<a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>
</p>
{% endfor %}
+
</div>
</div>
+{% endcache %}
{% endblock %}
diff --git a/forum/skins/default/templates/question_list.html b/forum/skins/default/templates/question_list.html
new file mode 100755
index 00000000..cf69d133
--- /dev/null
+++ b/forum/skins/default/templates/question_list.html
@@ -0,0 +1,42 @@
+{% load cache %}
+{% load i18n %}
+{% load humanize %}
+{% load extra_filters %}
+{% load extra_tags %}
+
+<div id="listA">
+ {% for question in questions.object_list %}
+ {% cache 60 question_in_list question.id %}
+ <div class="short-summary">
+ <div class="counts">
+ <div class="votes">
+ <div class="item-count">{{question.score|intcomma}}</div>
+ <div>{% trans "votes" %}</div>
+ </div >
+ <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
+ <div class="item-count">{{question.answer_count|intcomma}}</div>
+ <div>{% trans "answers" %}</div>
+ </div>
+ <div class="views">
+ <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
+ <div>{% trans "views" %}</div>
+ </div>
+ </div>
+
+ <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
+ <div class="userinfo">
+ <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
+ {% if question.last_activity_by %}
+ <a href="/users/{{ question.last_activity_by.id }}/{{ question.last_activity_by.username|slugify }}/">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
+ {% endif %}
+ </div>
+
+ <div class="tags">
+ {% for tag in question.tagname_list %}
+ <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
+ {% endfor %}
+ </div>
+ </div>
+ {% endcache %}
+ {% endfor %}
+</div> \ No newline at end of file
diff --git a/forum/skins/default/templates/questions.html b/forum/skins/default/templates/questions.html
index 58ad4146..de6076ac 100755
--- a/forum/skins/default/templates/questions.html
+++ b/forum/skins/default/templates/questions.html
@@ -50,52 +50,7 @@
<a id="mostvoted" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=mostvoted" class="off" title="{% trans "most voted questions" %}">{% trans "most voted" %}</a>
</div>
</div>
-<div id="listA">
- {% for question in questions.object_list %}
- <div class="short-summary">
- <div class="counts">
- <div class="votes">
- <div class="item-count">{{question.score|intcomma}}</div>
- <div>{% trans "votes" %}</div>
- </div >
- <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
- <div class="item-count">{{question.answer_count|intcomma}}</div>
- <div>{% trans "answers" %}</div>
- </div>
- <div class="views">
- <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
- <div>{% trans "views" %}</div>
- </div>
- </div>
-
- <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
-
- <div class="userinfo">
- <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
- {% if question.last_activity_by %}
- <a href="/users/{{ question.last_activity_by.id }}/{{ question.last_activity_by.username|slugify }}/">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
- {% endif %}
- </div>
-
- <div class="tags">
- {% for tag in question.tagname_list %}
- <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
- {% endfor %}
- </div>
- </div>
- {% endfor %}
- {% if searchtitle %}
- {% if questions_count == 0 %}
- <p class="evenMore" style="padding-top:30px;text-align:center;">
- {% trans "Did not find anything?" %}
- {% else %}
- <p class="evenMore" style="padding-left:9px">
- {% trans "Did not find what you were looking for?" %}
- {% endif %}
- <a href="{% url ask %}">{% trans "Please, post your question!" %}</a>
- </p>
- {% endif %}
-</div>
+{% include "question_list.html" %}
{% endblock %}
{% block tail %}
diff --git a/forum/utils/lists.py b/forum/utils/lists.py
index bbcfae98..f69c8f20 100755
--- a/forum/utils/lists.py
+++ b/forum/utils/lists.py
@@ -1,5 +1,9 @@
"""Utilities for working with lists and sequences."""
+class LazyList(list):
+ def __init__(self, get_data):
+ self.data = get_data
+
def flatten(x):
"""
Returns a single, flat list which contains all elements retrieved
diff --git a/forum/views/readers.py b/forum/views/readers.py
index c4ce5ddf..938fa133 100644
--- a/forum/views/readers.py
+++ b/forum/views/readers.py
@@ -14,6 +14,7 @@ from django.utils.translation import ugettext as _
from django.template.defaultfilters import slugify
from django.core.urlresolvers import reverse
from django.utils.datastructures import SortedDict
+from django.views.decorators.cache import cache_page
from forum.utils.html import sanitize_html
from markdown2 import Markdown
diff --git a/forum_modules/robotstxt/DISABLED b/forum_modules/robotstxt/DISABLED
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/forum_modules/robotstxt/DISABLED
diff --git a/log/README.TXT b/log/README.TXT
new file mode 100755
index 00000000..54247a82
--- /dev/null
+++ b/log/README.TXT
@@ -0,0 +1 @@
+this file is just a placeholder so the empty directory is not ignored by version control \ No newline at end of file
diff --git a/settings_local.py.dist b/settings_local.py.dist
index 3169e940..a27946af 100755
--- a/settings_local.py.dist
+++ b/settings_local.py.dist
@@ -36,7 +36,11 @@ DATABASE_ENGINE = '' #mysql, etc
DATABASE_HOST = ''
DATABASE_PORT = ''
-#Moved from settings.py for better organization. (please check it up to clean up settings.py)
+#set this value to 'dummy://' if you don't want to use cache, or set up your favourite caching mechanism
+#see http://docs.djangoproject.com/en/1.1/topics/cache/ for details
+#example (set local file system cache in a cache folder in the root of the osqa install):
+#CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/')
+CACHE_BACKEND = 'dummy://'
#email server settings
SERVER_EMAIL = ''