From b8dfb26a3a92db71538074025a4220b781b75e09 Mon Sep 17 00:00:00 2001 From: Jiajun Liu Date: Tue, 7 Jul 2015 17:44:12 +0800 Subject: [PATCH 1/2] fix error url in host search page --- templates/jasset/host_search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/jasset/host_search.html b/templates/jasset/host_search.html index 38ed8c1ad..2fe6e0449 100644 --- a/templates/jasset/host_search.html +++ b/templates/jasset/host_search.html @@ -35,7 +35,7 @@ {{ post.date_added|date:"Y-m-d H:i:s" }} {{ post.comment }} - 详情 + 详情 {% ifnotequal session_role_id 0 %} 编辑 删除 From f5e57da106a356ecb22c1af6ba575488d4674b10 Mon Sep 17 00:00:00 2001 From: Jiajun Liu Date: Tue, 7 Jul 2015 18:12:25 +0800 Subject: [PATCH 2/2] fix line break bug on add multiple hosts --- jasset/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jasset/views.py b/jasset/views.py index 22c72f8e5..fc2a1225c 100644 --- a/jasset/views.py +++ b/jasset/views.py @@ -232,7 +232,7 @@ def host_add_batch(request): active_types = {'激活': 1, '禁用': 0} dept_id = get_user_dept(request) if request.method == 'POST': - multi_hosts = request.POST.get('j_multi').split('\n') + multi_hosts = request.POST.get('j_multi').splitlines() for host in multi_hosts: if host == '': break @@ -927,4 +927,4 @@ def host_search(request): posts = list(set(post_all) & set(post_perm)) contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request) - return my_render('jasset/host_search.html', locals(), request) \ No newline at end of file + return my_render('jasset/host_search.html', locals(), request)