Hi,
I'm not experienced with mongoengine, probably somebody else can answer your
question in a better way. By inspecting your settings this didn't make sense to
me, why is there a 'app.models.CustomUser' in your AUTHENTICATION_BACKENDS
setting? Also, showing your custom user model will help.
Thanks,
Matías
Excerpts from Shrikrishna Holla's message of 2013-04-16 08:48:15 -0300:
> Thank you Matías, I did as you suggested. But I'm finding that the profiles
> are still being stored in mongoengine.django.auth.User and not my
> CustomUser, though I have set SOCIAL_AUTH_USER_MODEL appropriately. Why is
> this so?
>
> If that helps, my settings is
http://paste.kde.org/725552/ . This is a huge
> problem because, when I try to save extra details to my custom user through
> the pipeline, I find that the user is actually a mongoengine.django.auth.User
> and hence try to save all details again in CustomUser and this leads to NotUniqueError
> because the subclass's (CustomUser) object clashes with the parent's (
> mongoengine.django.auth.User) object and it finds an attempt at creation of
> duplicates
>
> On Monday, 15 April 2013 23:24:25 UTC+5:30, Matías Aguirre wrote:
> >
> > UserSocialAuth is not a user model, it's used to keep track of accounts
> > association.
> >
> > Mongoengine has its own User model[1] and I guess you can inherit from it.
> >
> > [1]:
> >
https://github.com/MongoEngine/mongoengine/blob/master/mongoengine/django/auth.py#L39
> >
> > Excerpts from Shrikrishna Holla's message of 2013-04-15 03:32:40 -0300:
> > > I would be grateful if you guys could clarify have a small doubt that I
> > > have regarding custom user models
> > >
> > > When I create a custom user class, can I subclass UserSocialAuth? Or do
> > I *
> > > have* to inherit from orm's user model? Or is it better to go native and
> > > inherit from the base model and define everything (username etc)
> > manually?
> > >
> > > I'm asking because I only want fields in addition to the
> > > ones UserSocialAuth already provides
> > >
> > > If it's helpful, I'm using Django 1.4.4 with mongoengine 0.7.9 sessions
> > and
> > > models and social_auth v0.7.22
> > >
> > --
> > Matías Aguirre (
matias...@gmail.com <javascript:>)
> >
>
--
Matías Aguirre (
matias...@gmail.com)