From 40b8cfc59cfa9dea6343a97ed752e80c9a13dde0 Mon Sep 17 00:00:00 2001 From: Steven Cummings Date: Sat, 7 Jul 2012 22:27:33 -0500 Subject: [PATCH] Document the new SOCIAL_AUTH_MODELS setting --- doc/configuration.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/configuration.rst b/doc/configuration.rst index a751aa2..f33810f 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -308,6 +308,27 @@ uppercase and replace ``-`` with ``_``), here's the supported settings so far:: SOCIAL_AUTH_LOGIN_REDIRECT_URL SOCIAL_AUTH_INACTIVE_USER_URL +- The ORM models can be replaced by providing the name of an alternate module + for the ``SOCIAL_AUTH_MODELS`` setting. The default is + ``'social_auth.django_models'``, which defines the Django ORM models that + were originally defined to implement Social Auth's storage. Social auth + provides an example alternate based on `MongoEngine`_. You can use it by + setting:: + + SOCIAL_AUTH_MODELS = 'social_auth.mongoengine_models' + + Make sure you've followed the instructions for + `MongoEngine Django integration`_, as you're now utilizing that user model. + + The MongoEngine backing was developed and tested with version 0.6.10 of + MongoEngine. + + Alternate storage models implementations currently follow a tight pattern of + models that behave near or identical to Django ORM models. It is currently + not decoupled from this pattern by any abstraction layer. If you would like + to implement your own alternate, please see the + ``social_auth.django_models`` and ``social_auth.mongoengine_models`` modules + for guidance. .. _Model Manager: http://docs.djangoproject.com/en/dev/topics/db/managers/#managers .. _Login URL: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#login-url @@ -318,3 +339,5 @@ uppercase and replace ``-`` with ``_``), here's the supported settings so far:: .. _login_required: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/decorators.py#L39 .. _User Profiles: http://www.djangobook.com/en/1.0/chapter12/#cn222 .. _OAuth: http://oauth.net/ +.. _MongoEngine: http://mongoengine.org +.. _MongoEngine Django integration: http://mongoengine-odm.readthedocs.org/en/latest/django.html -- 2.39.5