diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-04-17 18:26:40 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-04-17 18:26:40 -0400 |
commit | 9f9b81b3077bc0dad4809d38a0cc314a3c607340 (patch) | |
tree | 9983cf04f6990be9c64670b8b3e1c132a5766bbe | |
parent | d6ee95a99cc174db4cba09f407caabb0fb67c853 (diff) | |
download | askbot-9f9b81b3077bc0dad4809d38a0cc314a3c607340.tar.gz askbot-9f9b81b3077bc0dad4809d38a0cc314a3c607340.tar.bz2 askbot-9f9b81b3077bc0dad4809d38a0cc314a3c607340.zip |
fixed html formatting in the "embedding videos" setting description and removed exceptions upon some incorrect url visits
-rw-r--r-- | askbot/conf/forum_data_rules.py | 6 | ||||
-rw-r--r-- | 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. ' - '<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/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`` |