From c62d2869362a88e9405f268f2e8a085047681b76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Aguirre?= Date: Tue, 21 Jun 2011 04:23:19 -0300 Subject: [PATCH] Add import note to warn about recursive import case --- README.rst | 5 +++++ doc/miscellaneous.rst | 4 ++++ 2 files changed, 9 insertions(+) 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/ -- 2.39.5