Overriding an abstractmodel field

10 views
Skip to first unread message

João Oliveira

unread,
Dec 19, 2013, 11:00:40 AM12/19/13
to django...@googlegroups.com
Hey there guys

While trying to override the email field, extending the AbstractUser class i looked for ways to do that, eventually sticking with the one this user suggested on stackoverflow 

CustomUser._meta.get_field_by_name('email')[0]._unique=True
Although this is not elegant, it seemed to me the best way to do so. Do you guys have any better solution?
I was also looking (as the user who posted this on stackoverflow) for a "official" or recommended way to do this

Thanks!

João
Reply all
Reply to author
Forward
0 new messages