mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Fix circular import bug
This commit is contained in:
@@ -11,7 +11,6 @@ from auth.models import get_hexdigest, check_password
|
|||||||
from auth import authenticate, login
|
from auth import authenticate, login
|
||||||
from registration import signals
|
from registration import signals
|
||||||
#from registration.forms import RegistrationForm
|
#from registration.forms import RegistrationForm
|
||||||
from registration.models import RegistrationProfile
|
|
||||||
from seaserv import ccnet_threaded_rpc
|
from seaserv import ccnet_threaded_rpc
|
||||||
|
|
||||||
class UserManager(object):
|
class UserManager(object):
|
||||||
@@ -206,7 +205,7 @@ class RegistrationBackend(object):
|
|||||||
else:
|
else:
|
||||||
site = RequestSite(request)
|
site = RequestSite(request)
|
||||||
|
|
||||||
|
from registration.models import RegistrationProfile
|
||||||
if settings.ACTIVATE_AFTER_REGISTRATION == True:
|
if settings.ACTIVATE_AFTER_REGISTRATION == True:
|
||||||
# since user will be activated after registration,
|
# since user will be activated after registration,
|
||||||
# so we will not use email sending, just create acitvated user
|
# so we will not use email sending, just create acitvated user
|
||||||
|
@@ -10,6 +10,8 @@ from django.template.loader import render_to_string
|
|||||||
from django.utils.hashcompat import sha_constructor
|
from django.utils.hashcompat import sha_constructor
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from seahub.base.accounts import User
|
||||||
|
|
||||||
|
|
||||||
SHA1_RE = re.compile('^[a-f0-9]{40}$')
|
SHA1_RE = re.compile('^[a-f0-9]{40}$')
|
||||||
|
|
||||||
@@ -289,5 +291,3 @@ class RegistrationProfile(models.Model):
|
|||||||
except User.DoesNotExist:
|
except User.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# We put this import here to prevent circular import
|
|
||||||
from seahub.base.accounts import User
|
|
||||||
|
Reference in New Issue
Block a user