mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-15 21:53:37 +00:00
Modified version and clean code
This commit is contained in:
parent
5f0f010227
commit
74d9c353ba
14
settings.py
14
settings.py
@ -69,7 +69,6 @@ MIDDLEWARE_CLASSES = (
|
|||||||
'auth.middleware.AuthenticationMiddleware',
|
'auth.middleware.AuthenticationMiddleware',
|
||||||
'base.middleware.BaseMiddleware',
|
'base.middleware.BaseMiddleware',
|
||||||
'base.middleware.InfobarMiddleware',
|
'base.middleware.InfobarMiddleware',
|
||||||
'seahub.subdomain.middleware.SubdomainMiddleware',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SITE_ROOT_URLCONF = 'seahub.urls'
|
SITE_ROOT_URLCONF = 'seahub.urls'
|
||||||
@ -82,7 +81,7 @@ TEMPLATE_DIRS = (
|
|||||||
# Always use forward slashes, even on Windows.
|
# Always use forward slashes, even on Windows.
|
||||||
# Don't forget to use absolute paths, not relative paths.
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
os.path.join(os.path.dirname(__file__), "templates"),
|
os.path.join(os.path.dirname(__file__), "templates"),
|
||||||
os.path.join(os.path.dirname(__file__),'thirdpart/djangorestframework/templates'),
|
# os.path.join(os.path.dirname(__file__),'thirdpart/djangorestframework/templates'),
|
||||||
)
|
)
|
||||||
|
|
||||||
# This is defined here as a do-nothing function because we can't import
|
# This is defined here as a do-nothing function because we can't import
|
||||||
@ -107,18 +106,14 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
|||||||
'django.core.context_processors.request',
|
'django.core.context_processors.request',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
'seahub.base.context_processors.base',
|
'seahub.base.context_processors.base',
|
||||||
# 'seahub.organizations.context_processors.org',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
# 'django.contrib.sites',
|
|
||||||
# 'django.contrib.admin',
|
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
|
|
||||||
# 'auth',
|
|
||||||
'avatar',
|
'avatar',
|
||||||
'registration',
|
'registration',
|
||||||
|
|
||||||
@ -129,7 +124,6 @@ INSTALLED_APPS = (
|
|||||||
'seahub.organizations',
|
'seahub.organizations',
|
||||||
'seahub.profile',
|
'seahub.profile',
|
||||||
'seahub.share',
|
'seahub.share',
|
||||||
'seahub.subdomain',
|
|
||||||
'seahub.api',
|
'seahub.api',
|
||||||
'api2',
|
'api2',
|
||||||
)
|
)
|
||||||
@ -162,6 +156,7 @@ CACHES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# rest_framwork
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_THROTTLE_CLASSES': (
|
'DEFAULT_THROTTLE_CLASSES': (
|
||||||
'rest_framework.throttling.AnonRateThrottle',
|
'rest_framework.throttling.AnonRateThrottle',
|
||||||
@ -173,6 +168,7 @@ REST_FRAMEWORK = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# file and path
|
||||||
MAX_UPLOAD_FILE_SIZE = 100 * 1024 * 1024 # 100 MB
|
MAX_UPLOAD_FILE_SIZE = 100 * 1024 * 1024 # 100 MB
|
||||||
MAX_UPLOAD_FILE_NAME_LEN = 255
|
MAX_UPLOAD_FILE_NAME_LEN = 255
|
||||||
MAX_FILE_NAME = MAX_UPLOAD_FILE_NAME_LEN
|
MAX_FILE_NAME = MAX_UPLOAD_FILE_NAME_LEN
|
||||||
@ -208,9 +204,7 @@ SERVE_STATIC = True
|
|||||||
ENABLE_SIGNUP = False
|
ENABLE_SIGNUP = False
|
||||||
LOGIN_URL = SITE_ROOT + 'accounts/login'
|
LOGIN_URL = SITE_ROOT + 'accounts/login'
|
||||||
|
|
||||||
SEAFILE_VERSION = '1.3.0'
|
SEAFILE_VERSION = '1.4'
|
||||||
|
|
||||||
USE_SUBDOMAIN = False
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
|
Loading…
Reference in New Issue
Block a user