From 9f9b81b3077bc0dad4809d38a0cc314a3c607340 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 17 Apr 2012 18:26:40 -0400 Subject: fixed html formatting in the "embedding videos" setting description and removed exceptions upon some incorrect url visits --- askbot/conf/forum_data_rules.py | 6 +++--- askbot/views/commands.py | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/askbot/conf/forum_data_rules.py b/askbot/conf/forum_data_rules.py index 7b35fb44..be23eab7 100644 --- a/askbot/conf/forum_data_rules.py +++ b/askbot/conf/forum_data_rules.py @@ -18,9 +18,9 @@ settings.register( FORUM_DATA_RULES, 'ENABLE_VIDEO_EMBEDDING', default = False, - description = _( - 'Enable embedding videos. ' - 'Note: please read read this first.' ) % {'url': const.DEPENDENCY_URLS['embedding-video']} ) ) diff --git a/askbot/views/commands.py b/askbot/views/commands.py index 5d86d1a1..9ed88225 100644 --- a/askbot/views/commands.py +++ b/askbot/views/commands.py @@ -377,6 +377,7 @@ def vote(request, id): #internally grouped views - used by the tagging system @csrf.csrf_exempt +@decorators.post_only @decorators.ajax_login_required def mark_tag(request, **kwargs):#tagging system action = kwargs['action'] @@ -417,9 +418,11 @@ def get_tags_by_wildcard(request): """returns an json encoded array of tag names in the response to a wildcard tag name """ - matching_tags = models.Tag.objects.get_by_wildcards( - [request.GET['wildcard'],] - ) + wildcard = request.GET.get('wildcard', None) + if wildcard is None: + raise Http404 + + matching_tags = models.Tag.objects.get_by_wildcards( [wildcard,] ) count = matching_tags.count() names = matching_tags.values_list('name', flat = True)[:20] re_data = simplejson.dumps({'tag_count': count, 'tag_names': list(names)}) @@ -495,6 +498,7 @@ def api_get_questions(request): @csrf.csrf_exempt +@decorators.post_only @decorators.ajax_login_required def set_tag_filter_strategy(request): """saves data in the ``User.display_tag_filter_strategy`` -- cgit v1.2.3-1-g7c22 From 9afb01123e38666fac4a3bd8664bffa349c0eb9b Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 17 Apr 2012 22:08:35 -0400 Subject: fixed broken links on the revision pages --- askbot/skins/default/templates/revisions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/skins/default/templates/revisions.html b/askbot/skins/default/templates/revisions.html index fd7dbf0c..aa1996a9 100644 --- a/askbot/skins/default/templates/revisions.html +++ b/askbot/skins/default/templates/revisions.html @@ -50,7 +50,7 @@ {% set contributor_type = "last_updater" %} {% endif %} {{ macros.post_contributor_info( - revision, + revision.post, contributor_type, False, 0 -- cgit v1.2.3-1-g7c22