diff options
-rw-r--r-- | askbot/setup_templates/settings.py | 2 | ||||
-rw-r--r-- | askbot/setup_templates/settings.py.mustache | 2 | ||||
-rw-r--r-- | askbot/urls.py | 23 |
3 files changed, 18 insertions, 9 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index 94df6f29..11fbefb6 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -144,7 +144,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'askbot.context.application_settings', #'django.core.context_processors.i18n', 'askbot.user_messages.context_processors.user_messages',#must be before auth - 'django.core.context_processors.auth', #this is required for admin + 'django.contrib.auth.context_processors.auth', #this is required for admin 'django.core.context_processors.csrf', #necessary for csrf protection ) diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache index eb1fc173..00612858 100644 --- a/askbot/setup_templates/settings.py.mustache +++ b/askbot/setup_templates/settings.py.mustache @@ -147,7 +147,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'askbot.context.application_settings', #'django.core.context_processors.i18n', 'askbot.user_messages.context_processors.user_messages',#must be before auth - 'django.core.context_processors.auth', #this is required for admin + 'django.contrib.auth.context_processors.auth', #this is required for admin 'django.core.context_processors.csrf', #necessary for csrf protection ) diff --git a/askbot/urls.py b/askbot/urls.py index 362a16ee..1d11e3e8 100644 --- a/askbot/urls.py +++ b/askbot/urls.py @@ -2,6 +2,7 @@ askbot askbot url configuraion file """ import os.path +import django from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.defaults import handler500, handler404 @@ -473,16 +474,9 @@ urlpatterns = patterns('', views.widgets.question_widget, name = 'question_widget' ), - url( - r'^feeds/(?P<url>.*)/$', - 'django.contrib.syndication.views.feed', - {'feed_dict': feeds}, - name='feeds' - ), #upload url is ajax only url( r'^%s$' % _('upload/'), views.writers.upload, name='upload'), url(r'^%s$' % _('feedback/'), views.meta.feedback, name='feedback'), - #url(r'^feeds/rss/$', RssLastestQuestionsFeed, name="latest_questions_feed"), url( r'^doc/(?P<path>.*)$', 'django.views.static.serve', @@ -558,3 +552,18 @@ if 'avatar' in settings.INSTALLED_APPS: name='avatar_render_primary' ), ) + +if django.get_version() <= '1.3.1': + urlpatterns += ( + url( + r'^feeds/(?P<url>.*)/$', + 'django.contrib.syndication.views.feed', + {'feed_dict': feeds}, + name='feeds' + ), + ) +else: + urlpatterns += ( + url(r'^feeds/rss/$', RssLastestQuestionsFeed, name="latest_questions_feed"), + url(r'^feeds/question/$', RssIndividualQuestionFeed, name="individual_question_feed"), + ) |