From 92219b5ba61488726fd14c088b31573d0e2f3768 Mon Sep 17 00:00:00 2001
From: Adolfo Fitoria
Date: Thu, 19 Jan 2012 12:02:37 -0300
Subject: fixed feed issues with cache.
---
askbot/feed.py | 26 +++++++++++-----------
.../skins/default/templates/main_page/tab_bar.html | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/askbot/feed.py b/askbot/feed.py
index 7f41fd4f..dff8973c 100644
--- a/askbot/feed.py
+++ b/askbot/feed.py
@@ -24,7 +24,7 @@ class RssIndividualQuestionFeed(Feed):
"""rss feed class for particular questions
"""
title = askbot_settings.APP_TITLE + _(' - ')+ _('Individual question feed')
- link = askbot_settings.APP_URL
+ #link = askbot_settings.APP_URL
description = askbot_settings.APP_DESCRIPTION
copyright = askbot_settings.APP_COPYRIGHT
@@ -32,11 +32,11 @@ class RssIndividualQuestionFeed(Feed):
if len(bits) != 1:
raise ObjectDoesNotExist
return Question.objects.get(id__exact = bits[0])
-
+
def item_link(self, item):
"""get full url to the item
"""
- return self.link + item.get_absolute_url()
+ return askbot_settings.APP_URL + item.get_absolute_url()
def item_pubdate(self, item):
"""get date of creation for the item
@@ -58,7 +58,7 @@ class RssIndividualQuestionFeed(Feed):
content_type = ContentType.objects.get_for_model(Question)
)
)
-
+
answer_content_type = ContentType.objects.get_for_model(Answer)
answers = Answer.objects.filter(question = item.id)
for answer in answers:
@@ -71,7 +71,7 @@ class RssIndividualQuestionFeed(Feed):
)
return itertools.chain(*chain_elements)
-
+
def item_title(self, item):
"""returns the title for the item
"""
@@ -83,7 +83,7 @@ class RssIndividualQuestionFeed(Feed):
elif item.post_type == "comment":
title = "Comment by %s for %s" % (item.user, self.title)
return title
-
+
def item_description(self, item):
"""returns the description for the item
"""
@@ -98,7 +98,7 @@ class RssLastestQuestionsFeed(Feed):
"""rss feed class for the latest questions
"""
title = askbot_settings.APP_TITLE + _(' - ')+ _('latest questions')
- link = askbot_settings.APP_URL
+ #link = askbot_settings.APP_URL
description = askbot_settings.APP_DESCRIPTION
#ttl = 10
copyright = askbot_settings.APP_COPYRIGHT
@@ -106,7 +106,7 @@ class RssLastestQuestionsFeed(Feed):
def item_link(self, item):
"""get full url to the item
"""
- return self.link + item.get_absolute_url()
+ return askbot_settings.APP_URL + item.get_absolute_url()
def item_author_name(self, item):
"""get name of author
@@ -127,8 +127,8 @@ class RssLastestQuestionsFeed(Feed):
"""returns url without the slug
because the slug can change
"""
- return self.link + item.get_absolute_url(no_slug = True)
-
+ return askbot_settings.APP_URL + item.get_absolute_url(no_slug = True)
+
def item_description(self, item):
"""returns the desciption for the item
"""
@@ -152,12 +152,12 @@ class RssLastestQuestionsFeed(Feed):
if tags:
#if there are tags in GET, filter the
#questions additionally
- for tag in tags:
+ for tag in tags:
qs = qs.filter(tags__name = tag)
-
+
return qs.order_by('-last_activity_at')[:30]
-
+
def main():
"""main function for use as a script
diff --git a/askbot/skins/default/templates/main_page/tab_bar.html b/askbot/skins/default/templates/main_page/tab_bar.html
index 5ed6e5b5..420f7053 100644
--- a/askbot/skins/default/templates/main_page/tab_bar.html
+++ b/askbot/skins/default/templates/main_page/tab_bar.html
@@ -2,9 +2,9 @@
{% cache 0 "scope_sort_tabs" search_tags request.user scope sort query context.page context.page_size language_code %}
- {% trans %}Gold badge is the highest award in this community. To obtain it have to show
+ {% trans %}Gold badge is the highest award in this community. To obtain it you have to show
profound knowledge and ability in addition to your active participation.{% endtrans %}
@@ -48,7 +48,7 @@ profound knowledge and ability in addition to your active participation.{% endtr
class="medal">● {% trans %}silver{% endtrans %}
- {% trans %}msgid "silver badge: occasionally awarded for the very high quality contributions{% endtrans %}
+ {% trans %}silver badge: occasionally awarded for the very high quality contributions{% endtrans %}
--
cgit v1.2.3-1-g7c22
From 8777bb3355d7d4cbdbadff00413d045c1de85fbc Mon Sep 17 00:00:00 2001
From: Jim Tittsler
Date: Fri, 27 Apr 2012 17:36:59 +1200
Subject: remove duplicate label for subscribe (once you log in) checkbox
---
askbot/skins/default/templates/question/subscribe_by_email_prompt.html | 1 -
1 file changed, 1 deletion(-)
diff --git a/askbot/skins/default/templates/question/subscribe_by_email_prompt.html b/askbot/skins/default/templates/question/subscribe_by_email_prompt.html
index a9158143..6a77601c 100644
--- a/askbot/skins/default/templates/question/subscribe_by_email_prompt.html
+++ b/askbot/skins/default/templates/question/subscribe_by_email_prompt.html
@@ -8,7 +8,6 @@
{% else %}
{{ answer.email_notify }}
- {% trans %}once you sign in you will be able to subscribe for any updates here{% endtrans %}
{% trans %}Here (once you log in) you will be able to sign up for the periodic email updates about this question.{% endtrans %}
{% endif %}
--
cgit v1.2.3-1-g7c22
From 9beae392a36e9e9acd8e0b3cefb13680a57c727f Mon Sep 17 00:00:00 2001
From: Jim Tittsler
Date: Fri, 27 Apr 2012 23:33:33 +1200
Subject: correct path to manage.py
---
askbot/cron/askbot_cron_job | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/askbot/cron/askbot_cron_job b/askbot/cron/askbot_cron_job
index 38bf0337..04ba2303 100644
--- a/askbot/cron/askbot_cron_job
+++ b/askbot/cron/askbot_cron_job
@@ -9,7 +9,7 @@ PROJECT_PARENT_DIR=/path/to/dir_containing_askbot_site
PROJECT_DIR_NAME=askbot_site
export PYTHONPATH=$PROJECT_PARENT_DIR:$PYTHONPATH
-PROJECT_ROOT=$PYTHONPATH/$PROJECT_NAME
+PROJECT_ROOT=$PROJECT_DIR_NAME/$PROJECT_NAME
#these are actual commands that are to be run
python $PROJECT_ROOT/manage.py send_email_alerts
--
cgit v1.2.3-1-g7c22
From 07735f865ae6be6c525f4dcaf2e52d8280f21ce0 Mon Sep 17 00:00:00 2001
From: Jim Tittsler
Date: Sat, 28 Apr 2012 00:08:59 +1200
Subject: fix HREF= for "adjust" frequency of the email updates
---
askbot/management/commands/send_email_alerts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/askbot/management/commands/send_email_alerts.py b/askbot/management/commands/send_email_alerts.py
index 8cb71859..8002ecbf 100644
--- a/askbot/management/commands/send_email_alerts.py
+++ b/askbot/management/commands/send_email_alerts.py
@@ -472,7 +472,7 @@ class Command(NoArgsCommand):
text += _(
'Please remember that you can always adjust frequency of the email updates or '
+ 'href="%(email_settings_link)s">adjust
frequency of the email updates or '
'turn them off entirely. If you believe that this message was sent in an '
'error, please email about it the forum administrator at %(admin_email)s.'
'p>
Sincerely,
Your friendly %(sitename)s server.
'
--
cgit v1.2.3-1-g7c22
From 555118bf6059c0187a2329ec827ab0425830ebf9 Mon Sep 17 00:00:00 2001
From: Jim Tittsler
Date: Tue, 1 May 2012 14:34:26 +1200
Subject: typo/spelling; plural
---
askbot/conf/site_modes.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/askbot/conf/site_modes.py b/askbot/conf/site_modes.py
index a88103b4..efbbcca0 100644
--- a/askbot/conf/site_modes.py
+++ b/askbot/conf/site_modes.py
@@ -76,9 +76,9 @@ settings.register(
"Bootstrap mode lowers reputation and certain badge "
"thresholds, to values, more suitable "
"for the smaller communities, "
- "WARNING: your current value for "
+ "WARNING: your current values for "
"Minimum reputation, "
- "Bagde Settings and "
+ "Badge Settings and "
"Vote Rules will "
"be changed after you modify this setting."
),
--
cgit v1.2.3-1-g7c22
From 91e2e7f7b871f0860e06379f76bf7e09ae0acad5 Mon Sep 17 00:00:00 2001
From: Adolfo Fitoria
Date: Wed, 2 May 2012 13:29:19 -0600
Subject: error in merge
---
askbot/startup_procedures.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py
index 618f1ed7..a5b0c940 100644
--- a/askbot/startup_procedures.py
+++ b/askbot/startup_procedures.py
@@ -496,11 +496,7 @@ def run_startup_tests():
test_celery()
#test_csrf_cookie_domain()
test_staticfiles()
-<<<<<<< HEAD
- test_mysql_south_bug()
-=======
test_avatar()
->>>>>>> 64ab1ac2d8cfe57e524aca3341abc852b861e512
settings_tester = SettingsTester({
'CACHE_MIDDLEWARE_ANONYMOUS_ONLY': {
'value': True,
--
cgit v1.2.3-1-g7c22
From 05d4e5d810642102e27d199f3ce8c145654ac8dd Mon Sep 17 00:00:00 2001
From: Adolfo Fitoria
Date: Thu, 19 Jan 2012 12:02:37 -0300
Subject: fixed feed issues with cache.
---
askbot/feed.py | 25 +++++++++++-----------
.../skins/default/templates/main_page/tab_bar.html | 4 ++--
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/askbot/feed.py b/askbot/feed.py
index c1933afe..6df9b8aa 100644
--- a/askbot/feed.py
+++ b/askbot/feed.py
@@ -26,7 +26,7 @@ class RssIndividualQuestionFeed(Feed):
"""rss feed class for particular questions
"""
title = askbot_settings.APP_TITLE + _(' - ')+ _('Individual question feed')
- link = askbot_settings.APP_URL
+ #link = askbot_settings.APP_URL
description = askbot_settings.APP_DESCRIPTION
copyright = askbot_settings.APP_COPYRIGHT
@@ -34,11 +34,11 @@ class RssIndividualQuestionFeed(Feed):
if len(bits) != 1:
raise ObjectDoesNotExist
return Post.objects.get_questions().get(id__exact = bits[0])
-
+
def item_link(self, item):
"""get full url to the item
"""
- return self.link + item.get_absolute_url()
+ return askbot_settings.APP_URL + item.get_absolute_url()
def item_pubdate(self, item):
"""get date of creation for the item
@@ -56,7 +56,6 @@ class RssIndividualQuestionFeed(Feed):
chain_elements.append(
Post.objects.get_comments().filter(parent=item)
)
-
answers = Post.objects.get_answers().filter(thread = item.thread)
for answer in answers:
chain_elements.append([answer,])
@@ -65,7 +64,7 @@ class RssIndividualQuestionFeed(Feed):
)
return itertools.chain(*chain_elements)
-
+
def item_title(self, item):
"""returns the title for the item
"""
@@ -77,7 +76,7 @@ class RssIndividualQuestionFeed(Feed):
elif item.post_type == "comment":
title = "Comment by %s for %s" % (item.author, self.title)
return title
-
+
def item_description(self, item):
"""returns the description for the item
"""
@@ -88,7 +87,7 @@ class RssLastestQuestionsFeed(Feed):
"""rss feed class for the latest questions
"""
title = askbot_settings.APP_TITLE + _(' - ')+ _('latest questions')
- link = askbot_settings.APP_URL
+ #link = askbot_settings.APP_URL
description = askbot_settings.APP_DESCRIPTION
#ttl = 10
copyright = askbot_settings.APP_COPYRIGHT
@@ -96,7 +95,7 @@ class RssLastestQuestionsFeed(Feed):
def item_link(self, item):
"""get full url to the item
"""
- return self.link + item.get_absolute_url()
+ return askbot_settings.APP_URL + item.get_absolute_url()
def item_author_name(self, item):
"""get name of author
@@ -117,8 +116,8 @@ class RssLastestQuestionsFeed(Feed):
"""returns url without the slug
because the slug can change
"""
- return self.link + item.get_absolute_url(no_slug = True)
-
+ return askbot_settings.APP_URL + item.get_absolute_url(no_slug = True)
+
def item_description(self, item):
"""returns the desciption for the item
"""
@@ -142,12 +141,12 @@ class RssLastestQuestionsFeed(Feed):
if tags:
#if there are tags in GET, filter the
#questions additionally
- for tag in tags:
+ for tag in tags:
qs = qs.filter(thread__tags__name = tag)
-
+
return qs.order_by('-thread__last_activity_at')[:30]
-
+
def main():
"""main function for use as a script
diff --git a/askbot/skins/default/templates/main_page/tab_bar.html b/askbot/skins/default/templates/main_page/tab_bar.html
index 8b666155..17ab810e 100644
--- a/askbot/skins/default/templates/main_page/tab_bar.html
+++ b/askbot/skins/default/templates/main_page/tab_bar.html
@@ -3,9 +3,9 @@
{% cache 0 "scope_sort_tabs" search_tags request.user author_name scope sort query context.page language_code %}