From ba1f5209de5f262c13dd17fa59a4aaa094bd82e8 Mon Sep 17 00:00:00 2001 From: Ion Scerbatiuc Date: Fri, 17 Apr 2015 10:03:40 -0700 Subject: [PATCH 1/6] Freeze Coffin version to <2.0 --- askbot_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot_requirements.txt b/askbot_requirements.txt index 3b9fde6e22..05ca2d44f7 100644 --- a/askbot_requirements.txt +++ b/askbot_requirements.txt @@ -1,7 +1,7 @@ akismet django>=1.3.1,<1.6 Jinja2 -Coffin>=0.3 +Coffin>=0.3,<2.0 South>=0.7.1 oauth2 Lamson From c6dbec47b955f07cf1b0b524a600035a6e2d62fe Mon Sep 17 00:00:00 2001 From: Ion Scerbatiuc Date: Fri, 17 Apr 2015 10:33:27 -0700 Subject: [PATCH 2/6] Did the same thing in the `_dev` requirements file --- askbot_requirements_dev.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/askbot_requirements_dev.txt b/askbot_requirements_dev.txt index 476ed66ffa..1814f1430a 100644 --- a/askbot_requirements_dev.txt +++ b/askbot_requirements_dev.txt @@ -1,9 +1,8 @@ akismet django>=1.3.1,<1.6 Jinja2 -Coffin>=0.3 +Coffin>=0.3,<2.0 South>=0.7.1 -#-e git+https://github.com/matthiask/south.git#egg=south oauth2 Lamson markdown2 From 49a364bd9d60593cd2735e65c45c9c71a82f50c9 Mon Sep 17 00:00:00 2001 From: Ion Scerbatiuc Date: Fri, 17 Apr 2015 10:43:18 -0700 Subject: [PATCH 3/6] Revert "Freeze Coffin version to <2.0" --- askbot_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot_requirements.txt b/askbot_requirements.txt index 05ca2d44f7..3b9fde6e22 100644 --- a/askbot_requirements.txt +++ b/askbot_requirements.txt @@ -1,7 +1,7 @@ akismet django>=1.3.1,<1.6 Jinja2 -Coffin>=0.3,<2.0 +Coffin>=0.3 South>=0.7.1 oauth2 Lamson From 33e848a841285a9ec0e4aceff49c96e02e6cf9c5 Mon Sep 17 00:00:00 2001 From: Ion Scerbatiuc Date: Fri, 17 Apr 2015 10:43:38 -0700 Subject: [PATCH 4/6] Revert "Did the same thing in the `_dev` requirements file" --- askbot_requirements_dev.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/askbot_requirements_dev.txt b/askbot_requirements_dev.txt index 1814f1430a..476ed66ffa 100644 --- a/askbot_requirements_dev.txt +++ b/askbot_requirements_dev.txt @@ -1,8 +1,9 @@ akismet django>=1.3.1,<1.6 Jinja2 -Coffin>=0.3,<2.0 +Coffin>=0.3 South>=0.7.1 +#-e git+https://github.com/matthiask/south.git#egg=south oauth2 Lamson markdown2 From fb7c3771ada41f671e6c795f760685ee3e5856ab Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Thu, 26 Sep 2019 16:10:11 -0700 Subject: [PATCH 5/6] dont flush session before posting anonymous, and ensure session key exists --- askbot/views/writers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) From d7208c50ff4ea452176aa01b3e0aadcfa1000bc6 Mon Sep 17 00:00:00 2001 From: Julie Zhang Date: Thu, 21 Nov 2019 15:21:14 -0800 Subject: [PATCH 6/6] Remove intranet related stuff and USE_LOCAL_FONTS --- askbot/context.py | 9 ++------- askbot/templates/meta/fonts.html | 18 +++--------------- 2 files changed, 5 insertions(+), 22 deletions(-) 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 #} + +