Re: Nullable User email
On 7-8-2012 17:08, Demian Brecht wrote:
> 1. Copy/paste the entire model, changing the attribute of the one field.
> 2. User._meta.fields[4].null = true
3. Override the __new__ method in your subclassed model and remove the
email field definition from the class attributes to the meta class
before you call super(). This does involve a bit of a copying from
db/models/ModelBase.__new__ but it's cleaner as __new__ is meant exactly
for this purpose.
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home