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

Show file size on repo page

This commit is contained in:
xiez
2012-05-18 17:48:58 +08:00
parent 0b81dbf0ff
commit 609b1befee
2 changed files with 8 additions and 1 deletions

View File

@@ -143,6 +143,10 @@ def repo(request, repo_id):
dirent.is_dir = True
else:
dirent.is_dir = False
try:
dirent.file_size = seafserv_rpc.get_file_size(dirent.obj_id)
except:
dirent.file_size = 0
# generate path and link
paths = []