﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16156	"Django overrides user-defined ""User"" model with its own"	dloewenherz@…	nobody	"I'm getting some very weird results when I name my model ""User"".

Here's the definition.


{{{
from django.db import models

class User(models.Model):
    email = models.EmailField()
    password = models.CharField(max_length=51)
    birthday = models.DateField()
    gender = models.BooleanField() # True => Male
}}}

Here's the ModelForm:


{{{
from django import forms

class RegistrationForm(forms.ModelForm):
    class Meta():
        model = User
        fields = ['email', 'password']
        widgets = {
                'email': forms.TextInput(attrs={'autocomplete': 'off'}),
                'password': forms.PasswordInput(attrs={'autocomplete': 'off'}) }
}}}

When I render this form in my template with ""{{ form.as_p }}"" I see the following help text for the password input: ""Use '[algo]$[salt]$[hexdigest]' or use the change password form."".

Seems as though there is some weird override of the Django-defined User model and mine.
"	Bug	closed	contrib.auth	1.3	Normal	invalid			Unreviewed	0	0	0	0	0	0
