1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

Add authentication and registration to seahub

This commit is contained in:
plt
2011-04-30 13:18:32 +08:00
parent 8b357aedae
commit e8d2300473
128 changed files with 4893 additions and 6 deletions

View File

@@ -62,6 +62,8 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
@@ -94,9 +96,32 @@ INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'seahub.basic',
'django.contrib.admin',
'registration',
'avatar',
'seahub.base',
'seahub.profile',
)
AUTHENTICATION_BACKENDS = (
'seahub.base.accounts.EmailOrUsernameModelBackend',
'django.contrib.auth.backends.ModelBackend'
)
ACCOUNT_ACTIVATION_DAYS = 7
#avatar
AVATAR_STORAGE_DIR = 'avatars'
AVATAR_GRAVATAR_BACKUP = False
AVATAR_DEFAULT_URL = MEDIA_URL + '/avatars/default.png'
LOGIN_URL = SITE_ROOT + 'accounts/login'
# profile
AUTH_PROFILE_MODULE = "profile.UserProfile"
try:
import local_settings
except ImportError: