On Sat, Dec 21, 2013 at 7:29 PM, <[email protected]> wrote:

> So I solved the problem. Even I don't know how. :/
> I used 
> this<https://docs.djangoproject.com/en/dev/topics/auth/customizing/#a-full-example>as
>  a template and added my own models and requirements on top of it.
>
> Slightly off topic but I needed this setup because I want to grant users
> object level permissions. 
> django-guardian<https://github.com/lukaszb/django-guardian>looked like a 
> match but I'm having trouble making it work with custom user
> models. The developer of guardian has a 
> warning<http://django-guardian.readthedocs.org/en/latest/userguide/custom-user-model.html>for
>  custom users.
>
> Since the template I used to create my custom user had
> admin.site.unregister(Group) included in the admin.py file, guardian throws:
>
> 'MyUser' has no attribute 'groups' error. Allowing groups to register shows 
> the same error. Do we need to implement custom groups when we use custom 
> users? As of now, I don't need the group functionality - so it'd be great if 
> there is a work around.
>
> As indicated in the custom user docs -- no, you don't *have* to implement
groups. However, if you're using any functionality that depends on groups,
you will need to at least provide a null implementation. If you're using an
app that integrates with object-level permissions, then it sounds like
you're going to need to provide at least *some* interface.

Beyond that, I can't be much help - I don't know anything about
django-guardian, and can't comment on whether it's been upgraded to support
custom Users (there are plenty of apps out there that haven't been). It
sounds like you need to take this problem up with the maintainers of
django-guardian.

Yours,
Russ Magee %-)

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAJxq849xVZi8DwSnge0wj9hnkLSA88TYwmOQ6TU76NF3T1NRXA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to