In html:

<input type="email" name="email" autocomplete="off">

Um django you need to create a form for your model and set a field to
username. In this field, set a widget like this:

username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete':
'off'}))


Now you set a form on your model admin, like this example

https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#adding-custom-validation-to-the-admin


On Thu, Nov 12, 2015 at 8:46 AM, Erik Cederstrand <erik+li...@cederstrand.dk
> wrote:

> Hello,
>
> I have a model with a CharField named "username". When I edit a model
> instance in the admin, my browser likes to autocomplete the contents of the
> "username" field with my username for the Django site, regardless of what
> was entered previously.
>
> Is there anything I can do to disable this behaviour, except for renaming
> the field to "username_PLEASE_DONT_AUTOCOMPLETE_SAFARI_IM_LOOKING_AT_YOU"?
>
> Thanks,
> Erik
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/DFF8D42F-D4F1-4686-942E-A906F919488B%40cederstrand.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Ezequiel Bertti
E-Mail: eber...@gmail.com
Cel: (21) 99188-4860

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACrQMYrb9aDDD1L%2BFvOtn90M6YDEuaVODoO-JWPqF0E5YiS9UA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to