diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-04-18 08:58:18 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-04-18 08:58:18 -0600 |
commit | 2246d8fce96057d7cdcbf99e86b88b5e85550c52 (patch) | |
tree | c69e25c80d580399b191b22e661da4f203ffa68c | |
parent | f47638af6b47bbd4ba9cd9ec014f6c5592b58a13 (diff) | |
parent | 9afb01123e38666fac4a3bd8664bffa349c0eb9b (diff) | |
download | askbot-2246d8fce96057d7cdcbf99e86b88b5e85550c52.tar.gz askbot-2246d8fce96057d7cdcbf99e86b88b5e85550c52.tar.bz2 askbot-2246d8fce96057d7cdcbf99e86b88b5e85550c52.zip |
Merge branch 'master' of github.com:ASKBOT/askbot-devel
-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`` |