summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/feed.py26
-rw-r--r--askbot/skins/default/templates/main_page/tab_bar.html4
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 %}
<a class="rss"
{% if feed_url %}
- href="{{settings.APP_URL}}{{feed_url}}"
+ href="{{feed_url}}"
{% else %}
- href="{{settings.APP_URL}}/feeds/rss/"
+ href="/feeds/rss/"
{% endif %}
title="{% trans %}subscribe to the questions feed{% endtrans %}"
>{% trans %}RSS{% endtrans %}