Tuesday, August 25, 2015

Re: Migrating old users into custom user model

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJV3OUoAAoJEC0ft5FqUuEhPbUQAIBps9IwkuUy6LfSY/jVcBWy
4OeCWMnp0OIUu8b/XQHTl2BVOHSVturoPwmBRY4vpFEjASs0HjyZr408SfCY6Uvo
VHN+MyG1nU+V5OMjJjqogi2YzbS+LPs3WFaO/RvlsPI71Pua6noOPS0HYm7Ku+VL
LQf0SehPIKVtpO/62z6SpfM//95Uj56eplsYI92fB4WFVBNA/i5iE5W9NIxDskg4
/EZU6+udnQYuYW/ParlQ2rQdHoAsoVPQDpa0C5ZFEcuaJ0poTNAFskgqjzvQgrA/
FdHQmXRtT+4GR5Wa7CFGYq7UQ9FpQwrK6H4Hws0mEuSrj1F+A5nHGpRl12lboB1p
vgjeuX8ZnToxNWU6ldRai4yp/3rop7/xT9lBQRosL/G27zZBeTsgZnWlxjKDpdmt
J73XIDr0EXTrbBv4VsWyEkkhEftRd29OzWQWMl8ddPSihNIPsaRacM0b036jR6OC
xh+xQmlm7yhzlQQtztGevIQgiojpX8ta3Eut5TP72u3q+jukYOmlfIQgzqcPUl3u
etW49eEDs5277kV2QAGBZts86Z1H07aB50cBAJjUthkSEZK9WJQlO6HyYskv3cSV
2NGHsfoQxLhHfALqMKPNW3bPEhvDqNXI/lt7jDXhFzETlvoLHh/lB2OLMRBooyyp
UK57rjwuNs8ATEl34Xf7
=Hb2p
-----END PGP SIGNATURE-----
Hi Ben,

On 08/25/2015 03:33 PM, Ben Wattie wrote:
> I have an existing project with migrations, datamigrations and I need a
> custom user model now, not just 1-1 profile so I created one.

Unfortunately, while this is technically possible (I haven't done it
myself, but I know at least one person who says they have), it's very
complex and requires a fair amount of familiarity with the migrations
system and use of the advanced SeparateDatabaseAndState operation. And
nobody, AFAIK, has written documentation on how to do it.

I don't believe this is really an acceptable state of affairs, so I've
filed https://code.djangoproject.com/ticket/25313 to at least clearly
acknowledge that it _ought_ to be fixed. I don't know when I'll get a
chance to work on it myself (not real likely unless I revisit an old
project, because nowadays I _always_ start every project with a custom
User model, to avoid this problem). Maybe the ideal scenario here is
that you figure it out and then write the docs on how it's done :-)

Sorry I can't give you a better answer,

Carl

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/55DCE528.5060605%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment