On Sun, Oct 20, 2013, Harry Percival <[email protected]> wrote:
>I'm trying to create a minimal custom user model. The only thing I care >about is email. But it seems Django really wants me to set a last_login >field. Can I avoid it somehow? > >I don't care about last_login! Can this be circumvented? Should that >signal be optional, or gracefully handle the case where the user model has >no last_login field? Should I log this as a bug? I can reproduce this. I can't think of a good reason why a User absolutely must have a last_login, so please raise a ticket. You're probably aware already, but the User model as provided here also breaks the superuser creating process called by syncdb. It doesn't ask for a username, and goes straight to asking for an email address, at which point it raises an error: AttributeError: 'Manager' object has no attribute 'get_by_natural_key'. I don't know if you were expecting that. The full traceback is <https://dpaste.de/K6JE>. Daniele -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/20131020224826.2047120542%40smtp.modern-world.net. For more options, visit https://groups.google.com/groups/opt_out.
