mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Tweak markdown
This commit is contained in:
parent
1ce68370cc
commit
660f41b92f
1 changed files with 5 additions and 5 deletions
10
README.rst
10
README.rst
|
|
@ -172,20 +172,20 @@ Using a captcha
|
|||
|
||||
Using https://github.com/mbi/django-simple-captcha you do the following:
|
||||
|
||||
1. Change axes lockout url in ``settings.py``
|
||||
1. Change axes lockout url in ``settings.py``::
|
||||
|
||||
AXES_LOCKOUT_URL = '/locked'
|
||||
|
||||
2. Add the url in ``urls.py``
|
||||
2. Add the url in ``urls.py``::
|
||||
|
||||
url(r'^locked/$', locked_out, name='locked_out'),
|
||||
|
||||
3. Create a captcha form
|
||||
3. Create a captcha form::
|
||||
|
||||
class AxesCaptchaForm(forms.Form):
|
||||
captcha = CaptchaField()
|
||||
|
||||
4. Create a captcha view for the above url that resets on captcha success and redirects.
|
||||
4. Create a captcha view for the above url that resets on captcha success and redirects::
|
||||
|
||||
def locked_out(request):
|
||||
if request.POST:
|
||||
|
|
@ -199,7 +199,7 @@ Using https://github.com/mbi/django-simple-captcha you do the following:
|
|||
|
||||
return render_to_response('locked_out.html', dict(form=form), context_instance=RequestContext(request))
|
||||
|
||||
5. Add a captcha template
|
||||
5. Add a captcha template::
|
||||
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue