2012-05-03 10:52:43 +08:00
|
|
|
"""
|
|
|
|
A set of request processors that return dictionaries to be merged into a
|
|
|
|
template context. Each function takes the request object as its only parameter
|
|
|
|
and returns a dictionary to add to the context.
|
|
|
|
|
|
|
|
These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by
|
|
|
|
RequestContext.
|
|
|
|
"""
|
2012-08-01 17:42:28 +08:00
|
|
|
from settings import SEAFILE_VERSION
|
|
|
|
from settings import SEAHUB_TITLE
|
2012-05-03 10:52:43 +08:00
|
|
|
|
2012-05-30 22:42:21 +08:00
|
|
|
def base(request):
|
2012-05-03 10:52:43 +08:00
|
|
|
"""
|
2012-05-30 22:42:21 +08:00
|
|
|
Add seahub base configure to the context.
|
2012-05-03 10:52:43 +08:00
|
|
|
|
|
|
|
"""
|
2012-05-30 22:42:21 +08:00
|
|
|
return {
|
2012-08-01 17:42:28 +08:00
|
|
|
'seafile_version': SEAFILE_VERSION,
|
|
|
|
'seahub_title': SEAHUB_TITLE,
|
2012-08-01 22:34:35 +08:00
|
|
|
'cloud_mode': request.cloud_mode,
|
2012-08-01 11:08:56 +08:00
|
|
|
# 'account_type': settings.ACCOUNT_TYPE,
|
2012-05-30 22:42:21 +08:00
|
|
|
}
|
2012-07-26 17:08:31 +08:00
|
|
|
|