]> git.parisson.com Git - django-social-auth.git/commitdiff
Document the new SOCIAL_AUTH_MODELS setting
authorSteven Cummings <estebistec@gmail.com>
Sun, 8 Jul 2012 03:27:33 +0000 (22:27 -0500)
committerSteven Cummings <estebistec@gmail.com>
Sun, 8 Jul 2012 03:27:33 +0000 (22:27 -0500)
doc/configuration.rst

index a751aa218e365e6249979d8a5906fe8276f631be..f33810f947424c80884eac2ffe0b767235a07fc1 100644 (file)
@@ -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