From: Matías Aguirre Date: Tue, 21 Jun 2011 07:23:19 +0000 (-0300) Subject: Add import note to warn about recursive import case X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c62d2869362a88e9405f268f2e8a085047681b76;p=django-social-auth.git Add import note to warn about recursive import case --- diff --git a/README.rst b/README.rst index c08f2af..f68b6b5 100644 --- a/README.rst +++ b/README.rst @@ -553,6 +553,11 @@ South_ users should add this rule to enable migrations:: pass +If defining a custom user model, do not import social_auth from any models.py +that would finally import from the models.py that defines your User class or it +will make your project fail with a recursive import because social_auth uses +get_model() to retrieve your User. + ---- Bugs ---- diff --git a/doc/miscellaneous.rst b/doc/miscellaneous.rst index c07a569..9a366fc 100644 --- a/doc/miscellaneous.rst +++ b/doc/miscellaneous.rst @@ -14,6 +14,10 @@ South_ users should add this rule to enable migrations:: except: pass +If defining a custom user model, do not import social_auth from any models.py +that would finally import from the models.py that defines your User class or it +will make your project fail with a recursive import because social_auth uses +get_model() to retrieve your User. .. _South: http://south.aeracode.org/ .. _django-social-auth: https://convore.com/django-social-auth/