Custom django user - how to update cms models

78 views
Skip to first unread message

Esben Bugge

unread,
Jan 18, 2016, 1:24:50 PM1/18/16
to django CMS developers
Hi!

As I have described here, I want to use a custom user model in my django-cms solution, but as I am in the middle of my project, I am unsure how to update the references from my existing django-cms models to the new user model. Please see the description in the link. Any good ideas?

Best regards,
Esben

Iacopo Spalletti

unread,
Jan 18, 2016, 4:02:44 PM1/18/16
to django-cms...@googlegroups.com, Esben Bugge
-- Inviato dal mio cellulare Android con K-9 Mail.

Esben Bugge

unread,
Jan 18, 2016, 4:15:38 PM1/18/16
to Iacopo Spalletti, django-cms...@googlegroups.com
Hi, I have a link to this documentation in my SO post, so I already know of it. The custom user model I am using should fulfill the listed requirements. What I am asking is, what I can do to introduce a custom user model in the middle of the project. The documentation says that it is advisable to use the custom user model from the beginning, but it does not exclude the possiblity of switching to a custom user model in the middle of a project, so I was hoping for tips on how to do that.

Iacopo Spalletti

unread,
Jan 21, 2016, 1:17:39 PM1/21/16
to django-cms...@googlegroups.com
Il 18/01/2016 22:14, Esben Bugge ha scritto:
> Hi, I have a link to this documentation in my SO post, so I already know
> of it. The custom user model I am using should fulfill the listed
> requirements. What I am asking is, what I can do to introduce a custom
> user model in the middle of the project. The documentation says that it
> is advisable to use the custom user model from the beginning, but it
> does not exclude the possiblity of switching to a custom user model in
> the middle of a project, so I was hoping for tips on how to do that.

Sorry to the list, I think I only answered to Esben: I answered on SO:
http://stackoverflow.com/questions/34844208/using-django-custom-user-in-existing-django-cms-project?answertab=active#tab-top

It's just a code draft, but the general idea should work

>
> 2016-01-18 22:02 GMT+01:00 Iacopo Spalletti <i.spa...@nephila.it
> <mailto:i.spa...@nephila.it>>:
>
> Hi, have a look at the relevant documentation:
> http://django-cms.readthedocs.org/en/develop/reference/configuration.html#custom-user-requirements
>
> On 18 January 2016 19:24:50 CET, Esben Bugge <esben...@gmail.com
> <mailto:esben...@gmail.com>> wrote:
>
> Hi!
>
> As I have described here
> <http://stackoverflow.com/questions/34844208/using-django-custom-user-in-existing-django-cms-project>,
> I want to use a custom user model in my django-cms solution, but
> as I am in the middle of my project, I am unsure how to update
> the references from my existing django-cms models to the new
> user model. Please see the description in the link. Any good ideas?
>
> Best regards,
> Esben
>
>
> -- Inviato dal mio cellulare Android con K-9 Mail.
>
>
> --
> Message URL:
> https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
> Unsubscribe: send a message to
> django-cms-devel...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-cms-devel...@googlegroups.com
> <mailto:django-cms-devel...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/django-cms-developers/CAB%2BwiCa3k7sq6L%2BXhUcGOUthnYa7EC7wjBJtnvNHz%3DgiV2Or6Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-cms-developers/CAB%2BwiCa3k7sq6L%2BXhUcGOUthnYa7EC7wjBJtnvNHz%3DgiV2Or6Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Saluti

Iacopo Spalletti

Tim Graham

unread,
Jan 22, 2016, 4:40:04 PM1/22/16
to django CMS developers
There is also a Django documentation ticket about this (documenting the steps to migrate from a built-in User to a custom user model after starting a project):
https://code.djangoproject.com/ticket/25313

Basically, you have to throw away all your migration history and start over.
> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send

Esben Bugge

unread,
Jan 24, 2016, 6:37:59 AM1/24/16
to django-cms...@googlegroups.com
Thanks for the link, that did the trick. I have updated my SO with an answer: http://stackoverflow.com/questions/34844208/using-django-custom-user-in-existing-django-cms-project/34975209#34975209

> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send

--
Message URL: https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
Unsubscribe: send a message to django-cms-devel...@googlegroups.com
---
You received this message because you are subscribed to a topic in the Google Groups "django CMS developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-cms-developers/uoJVqR-fduw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-cms-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-cms-developers/cffc7d53-374b-421f-8a5f-25b850fd3da7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages