Commits

Anonymous committed cddfe58 Merge

branch merge

  • Participants
  • Parent commits eb90284, 01d205b
  • Branches django15mine

Comments (0)

Files changed (6)

File registration/backends/simple/views.py

 from registration import signals
 from registration.views import RegistrationView as BaseRegistrationView
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class RegistrationView(BaseRegistrationView):
     """

File registration/forms.py

 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class RegistrationForm(forms.Form):
     """

File registration/tests/default_backend.py

 from registration.backends.default.views import RegistrationView
 from registration.models import RegistrationProfile
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class DefaultBackendViewTests(TestCase):
     """

File registration/tests/forms.py

 
 from registration import forms
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class RegistrationFormTests(TestCase):
     """

File registration/tests/models.py

 
 from registration.models import RegistrationProfile
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class RegistrationModelTests(TestCase):
     """

File registration/tests/simple_backend.py

 
 from registration.forms import RegistrationForm
 
+try:
+    from django.contrib.auth import get_user_model
+    User = get_user_model()
+except ImportError:
+    from django.contrib.auth.models import User
+
 
 class SimpleBackendViewTests(TestCase):
     urls = 'registration.backends.simple.urls'