ojengwa / django-simple-captcha

Automatically exported from code.google.com/p/django-simple-captcha
MIT License
1 stars 0 forks source link

Autocomplete attribute for text input should be off #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When entering the value for captcha text input field, the browser uses 
autocomplete feature to 'help' user choose the correct value.

The problem is that in 99% it is not correct one.

In CaptchaField class constructor there is widget_kwargs definition, that sets 
output_format. It should be enhanced to include attrs as well:

widget_kwargs = dict(
  output_format = kwargs.get('output_format',None) or settings.CAPTCHA_OUTPUT_FORMAT,
  attrs = {'autocomplete':'off'}
)

Tested on django-simple-captcha-0.3.0.

Original issue reported on code.google.com by j.ho...@gmail.com on 24 Aug 2011 at 8:36