diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2014-05-29 15:55:24 -0300 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2014-05-29 15:55:24 -0300 |
commit | 6a680af2ca128d5e69af90e25c933cb3bc7d70cd (patch) | |
tree | 0e5600e1205097ef87ac1713b179e391efefc0ee | |
parent | f800a58eed8ab7c97813b5eb0ff34d7b01481f72 (diff) | |
download | askbot-6a680af2ca128d5e69af90e25c933cb3bc7d70cd.tar.gz askbot-6a680af2ca128d5e69af90e25c933cb3bc7d70cd.tar.bz2 askbot-6a680af2ca128d5e69af90e25c933cb3bc7d70cd.zip |
added recaptcha remote ip decorators to the recaptcha protected views
-rw-r--r-- | askbot/deps/django_authopenid/views.py | 1 | ||||
-rw-r--r-- | askbot/views/writers.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py index 4ac42733..ac106777 100644 --- a/askbot/deps/django_authopenid/views.py +++ b/askbot/deps/django_authopenid/views.py @@ -996,6 +996,7 @@ def finalize_generic_signin( @not_authenticated @csrf.csrf_protect +@fix_recaptcha_remote_ip def register(request, login_provider_name=None, user_identifier=None): """ this function is used via it's own url with request.method=POST diff --git a/askbot/views/writers.py b/askbot/views/writers.py index 04103d50..f8de0f3e 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -46,6 +46,7 @@ from askbot.views import context from askbot.templatetags import extra_filters_jinja as template_filters from askbot.importers.stackexchange import management as stackexchange#todo: may change from askbot.utils.slug import slugify +from recaptcha_works.decorators import fix_recaptcha_remote_ip # used in index page INDEX_PAGE_SIZE = 20 @@ -207,6 +208,7 @@ def import_data(request): @csrf.csrf_protect @decorators.check_authorization_to_post(ugettext_lazy('Please log in to make posts')) @decorators.check_spam('text') +@fix_recaptcha_remote_ip def ask(request):#view used to ask a new question """a view to ask a new question gives space for q title, body, tags and checkbox for to post as wiki @@ -383,6 +385,7 @@ def retag_question(request, id): @login_required @csrf.csrf_protect @decorators.check_spam('text') +@fix_recaptcha_remote_ip def edit_question(request, id): """edit question view """ @@ -493,6 +496,7 @@ def edit_question(request, id): @login_required @csrf.csrf_protect @decorators.check_spam('text') +@fix_recaptcha_remote_ip def edit_answer(request, id): answer = get_object_or_404(models.Post, id=id) @@ -588,6 +592,7 @@ def edit_answer(request, id): #todo: rename this function to post_new_answer @decorators.check_authorization_to_post(ugettext_lazy('Please log in to make posts')) @decorators.check_spam('text') +@fix_recaptcha_remote_ip def answer(request, id, form_class=forms.AnswerForm):#process a new answer """view that posts new answer |