1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

Merge pull request #891 from haiwen/update-indentation

update indentation
This commit is contained in:
xiez
2015-11-09 13:34:15 +08:00

View File

@@ -246,10 +246,10 @@ def render_repo(request, repo):
for f in file_list: for f in file_list:
file_path = posixpath.join(path, f.obj_name) file_path = posixpath.join(path, f.obj_name)
if allow_generate_thumbnail(request, repo.id, file_path): if allow_generate_thumbnail(request, repo.id, file_path):
f.allow_generate_thumbnail = True f.allow_generate_thumbnail = True
if os.path.exists(os.path.join(THUMBNAIL_ROOT, str(THUMBNAIL_DEFAULT_SIZE), f.obj_id)): if os.path.exists(os.path.join(THUMBNAIL_ROOT, str(THUMBNAIL_DEFAULT_SIZE), f.obj_id)):
src = get_thumbnail_src(repo.id, THUMBNAIL_DEFAULT_SIZE, file_path) src = get_thumbnail_src(repo.id, THUMBNAIL_DEFAULT_SIZE, file_path)
f.encoded_thumbnail_src = urlquote(src) f.encoded_thumbnail_src = urlquote(src)
return render_to_response('repo.html', { return render_to_response('repo.html', {
'repo': repo, 'repo': repo,
@@ -488,11 +488,11 @@ def view_shared_dir(request, token):
real_image_path = posixpath.join(real_path, f.obj_name) real_image_path = posixpath.join(real_path, f.obj_name)
if allow_generate_thumbnail(request, repo_id, real_image_path): if allow_generate_thumbnail(request, repo_id, real_image_path):
f.allow_generate_thumbnail = True f.allow_generate_thumbnail = True
if os.path.exists(os.path.join(THUMBNAIL_ROOT, str(THUMBNAIL_DEFAULT_SIZE), f.obj_id)): if os.path.exists(os.path.join(THUMBNAIL_ROOT, str(THUMBNAIL_DEFAULT_SIZE), f.obj_id)):
req_image_path = posixpath.join(req_path, f.obj_name) req_image_path = posixpath.join(req_path, f.obj_name)
src = get_share_link_thumbnail_src(token, THUMBNAIL_DEFAULT_SIZE, req_image_path) src = get_share_link_thumbnail_src(token, THUMBNAIL_DEFAULT_SIZE, req_image_path)
f.encoded_thumbnail_src = urlquote(src) f.encoded_thumbnail_src = urlquote(src)
return render_to_response('view_shared_dir.html', { return render_to_response('view_shared_dir.html', {
'repo': repo, 'repo': repo,