MongoEngine/mongoengine — pull request #284 by ncortot (2013-04-18 12:34:50+00:00)
Title: Support Django 1.5 swappable user models

Hello,

A first try at using Django's swappable user models to use MongoEngine for authentication, re MongoEngine#147

The main difference with using a custom authentication backend is that other features expecting a Model object might also work. For example, you can use the "createsuperuser" management command.

Also, it seems to me we are reusing more of the `django.contrib.auth` code, e.g. most of the `UserManager`.

Apart from that, I'm not sure this is actually better than using a custom authentication backend. Should I continue in this direction?

The Django app is named `mongo_auth` because we also need the `auth` app from `django.contrib` (https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-INSTALLED_APPS states that "App names must be unique").

Should this end up in django-mongoengine instead of mongoengine?