1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Add new repo_file_get file and clean settings.py.

This commit is contained in:
xiez
2012-07-19 11:30:12 +08:00
parent 6eddec46ae
commit ea1b664541
8 changed files with 43 additions and 66 deletions

View File

@@ -15,10 +15,16 @@ from django.core.cache import cache
from seaserv import seafserv_rpc, ccnet_threaded_rpc, seafserv_threaded_rpc, \
get_repo, get_commits, get_group_repoids
import settings
from settings import PREVIEW_FILEEXT
EMPTY_SHA1 = '0000000000000000000000000000000000000000'
PREVIEW_FILEEXT = {
'Document': ('ac', 'am', 'bat', 'c', 'cc', 'cmake', 'cpp', 'css', 'diff', 'h', 'htm', 'html', 'xhtml', 'java', 'js', 'json', 'less', 'make', 'php', 'properties', 'py', 'rb', 'scala', 'script', 'sh', 'sql', 'txt','text', 'vi', 'vim', 'xml'),
'Image': ('gif', 'jpeg', 'jpg', 'png'),
'SVG':('svg',),
}
def go_permission_error(request, msg=None):
"""
Return permisson error page.