diff --git a/askbot/context.py b/askbot/context.py index b0855b0b5e..8d9fc2d05a 100644 --- a/askbot/context.py +++ b/askbot/context.py @@ -43,11 +43,6 @@ def application_settings(request): 'ASKBOT_CSS_DEVEL', False ) - my_settings['USE_LOCAL_FONTS'] = getattr( - settings, - 'ASKBOT_USE_LOCAL_FONTS', - False - ) my_settings['CSRF_COOKIE_NAME'] = settings.CSRF_COOKIE_NAME my_settings['DEBUG'] = settings.DEBUG my_settings['USING_RUNSERVER'] = 'runserver' in sys.argv @@ -64,7 +59,7 @@ def application_settings(request): my_settings['LOGOUT_REDIRECT_URL'] = url_utils.get_logout_redirect_url() my_settings['USE_ASKBOT_LOGIN_SYSTEM'] = 'askbot.deps.django_authopenid' \ in settings.INSTALLED_APPS - + current_language = get_language() #for some languages we will start searching for shorter words @@ -72,7 +67,7 @@ def application_settings(request): #we need to open the search box and show info message about #the japanese lang search min_search_word_length = 1 - else: + else: min_search_word_length = my_settings['MIN_SEARCH_WORD_LENGTH'] context = { diff --git a/askbot/templates/meta/fonts.html b/askbot/templates/meta/fonts.html index 4332e1a684..9a04fd56e1 100644 --- a/askbot/templates/meta/fonts.html +++ b/askbot/templates/meta/fonts.html @@ -1,15 +1,3 @@ -{% if settings.USE_LOCAL_FONTS %} - {# this version is for serving fonts locally - e.g. for intranet sites #} - -{% else %} - {# note: for IE8 we ask for fonts separately #} - - -{% endif %} +{# note: for IE8 we ask for fonts separately #} + + diff --git a/askbot/views/writers.py b/askbot/views/writers.py index 973bc544a3..1edf043a19 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -273,8 +273,11 @@ def ask(request):#view used to ask a new question return HttpResponseRedirect(reverse('index')) else: - request.session.flush() session_key=request.session.session_key + + if not session_key: + session_key = request.session.create() + models.AnonymousQuestion.objects.create( session_key=session_key, title=title, @@ -285,7 +288,7 @@ def ask(request):#view used to ask a new question added_at=timestamp, ip_addr=request.META.get('REMOTE_ADDR'), ) - return HttpResponseRedirect(url_utils.get_login_url()) + return HttpResponseRedirect(settings.ROVER_LOGIN_URL) if request.method == 'GET': form = forms.AskForm(user=request.user)