1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

Add sending log message in file_view

This commit is contained in:
plt
2013-03-11 15:23:05 +08:00
parent ec17ad70df
commit d30731cf0e

View File

@@ -20,7 +20,7 @@ from django.utils.hashcompat import md5_constructor
from django.utils.translation import ugettext as _
from seaserv import list_dir_by_path, get_repo, web_get_access_token, \
get_commits, is_passwd_set, check_permission, get_shared_groups_by_repo,\
is_group_user, get_file_id_by_path, get_commit
is_group_user, get_file_id_by_path, get_commit, send_message
from pysearpc import SearpcError
from base.decorators import ctx_switch_required, repo_passwd_set_required
@@ -331,6 +331,9 @@ def view_file(request, repo_id):
org_id = request.user.org['org_id']
is_starred = is_file_starred(username, repo.id, path.encode('utf-8'), org_id)
# send logging message
send_message('seahub.stats', 'view-file\t%s\t%s' % (repo.id, obj_id))
template = 'view_file_%s.html' % ret_dict['filetype'].lower()
return render_to_response(template, {
'repo': repo,