diff options
-rw-r--r-- | askbot/conf/forum_data_rules.py | 6 | ||||
-rw-r--r-- | askbot/skins/default/templates/revisions.html | 2 | ||||
-rw-r--r-- | askbot/views/commands.py | 10 |
3 files changed, 11 insertions, 7 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. ' - '<em>Note: please read <a href="%(url)s>read this</a> first.</em>' + description = _('Enable embedding videos. '), + help_text = _( + '<em>Note: please read <a href="%(url)s">read this</a> first.</em>' ) % {'url': const.DEPENDENCY_URLS['embedding-video']} ) ) 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 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`` |