1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Add previewd file extention and type to cache. And clean code.

This commit is contained in:
xiez
2012-07-19 17:18:40 +08:00
parent 32f65f5ae9
commit 5e64e4b503
3 changed files with 28 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ from seahub.views import root, peers, myhome, \
from seahub.notifications.views import notification_list
from seahub.share.views import share_admin
from seahub.group.views import group_list
from seahub.utils import set_file_ext_cache
# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
@@ -108,3 +109,7 @@ if settings.DEBUG:
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)
# Set file extension cache at django startup, this function should be
# called only once.
set_file_ext_cache()