divio/django-cms — pull request #1916 by stefanfoulis (2013-06-06 06:52:37+00:00)
Title: WIP: AUTH_USER_MODEL support

This is still Work In Progress.

* currently we run the whole testsuite with a custom user model, because that is more likely to fail than with the default user model. see todo for an alternative approach.
* this works with django-1.5. django-1.6 will likely need an extra fix to support the changed default reverse relationship between ``User`` and ``Group``.

Todo:

- [ ] test admin interface of ``PageUser`` (a ``User`` subclass) that is used for hierarchical user permissions
- [ ] docs: add warning that in most cases this is not what you want to do (a custom profile model with a OneToOne relation is usually enough).
- [ ] docs: add warning that swapping out a user model on an existing db is a lot of hassle (the model should be swapped out from the very beginning of the project).
- [ ] docs: only works if the custom user model is also called ``User`` (because of reverse relation naming with other models, e.g ``Group``)
- [ ] testsuite: we could run the testsuite multiple times on travis: http://stackoverflow.com/questions/15369987/testing-with-a-custom-user-model-as-a-foreignkey-in-django-1-5
- [ ] update all the existing migrations to with https://gist.github.com/benjaoming/5605160

related Issue: #1798