Skip to content

Commit

Permalink
Add docs about monkey patch change.
Browse files Browse the repository at this point in the history
  • Loading branch information
emperorcezar committed May 29, 2014
1 parent 2da51bc commit f511124
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/userguide/custom-user-model.rst
Expand Up @@ -11,6 +11,13 @@ very powerful, it must be done with caution, though. Basically, if we subclass
``AbstractUser`` or define many-to-many relation with ``auth.Group`` (and give
reverse relate name **groups**) we should be fine.

By default django-guardian monkey patches the user model to add some needed
functionality. This can result in errors if guardian is imported into the models.py
of the same app where the custom user model lives.

To fix this, it is recommended to add the setting ``GUARDIAN_MONKEY_PATCH = FALSE``
in your settings.py and add the ``GuardianUserMixin`` to your custom user model.

.. important::
``django-guardian`` relies **heavily** on the ``auth.User`` model.
Specifically it was build from the ground-up with relation beteen
Expand Down

0 comments on commit f511124

Please sign in to comment.