#26445: Can't set password on User during migration that depends on contrib.auth ---------------------------------+-------------------- Reporter: giuliettamasina | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 1.9 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+-------------------- I have an app with migrations that depend on the `contrib.auth` migrations. In one of my own migrations I want to create User objects and set their password. When trying to set a password for User object either through `.set_password()` or directly on creation through e.g. `.create_superuser()` I get this error: {{{ AttributeError: 'User' object has no attribute 'set_password' }}} Attached is a test project. Create a virtual env with Django 1.9 and run `./manage.py migrate` in it to see the error.
It seems like the password related methods are not available on the User object, only in the default manager, which I gather is not available in migrations. Is this intentional? -- Ticket URL: <https://code.djangoproject.com/ticket/26445> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/058.e61766f33bbcf1fffa283acbb4c3030a%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.