mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
Using urllib to quote repo_name instead of using django
This commit is contained in:
6
views.py
6
views.py
@@ -8,7 +8,6 @@ from auth.models import User
|
||||
from django.views.decorators.csrf import csrf_protect
|
||||
from auth.forms import AuthenticationForm, PasswordResetForm, SetPasswordForm, PasswordChangeForm
|
||||
from auth.tokens import default_token_generator
|
||||
from django.utils.http import urlquote
|
||||
|
||||
from seaserv import cclient, ccnet_rpc, get_groups, get_users, get_repos, \
|
||||
get_repo, get_commits, get_branches, \
|
||||
@@ -18,6 +17,7 @@ from seahub.share.models import GroupShare, UserShare
|
||||
from seahub.share.forms import GroupAddRepoForm
|
||||
from seahub.base.accounts import CcnetUser
|
||||
from forms import AddUserForm
|
||||
from urllib import quote
|
||||
|
||||
import stat
|
||||
import time
|
||||
@@ -393,12 +393,12 @@ def repo_list_share(request):
|
||||
def repo_download(request, repo_id):
|
||||
relay_id = cclient.props.id
|
||||
repo_name = request.GET.get('repo_name')
|
||||
quote_repo_name = urlquote(repo_name)
|
||||
quote_repo_name = quote(repo_name)
|
||||
encrypted = request.GET.get('enc')
|
||||
enc = '1'
|
||||
if cmp(encrypted,'False') == 0:
|
||||
enc = ''
|
||||
|
||||
assert False
|
||||
ccnet_applet_root = get_ccnetapplet_root()
|
||||
redirect_url = "%s/repo/download/?repo_id=%s&relay_id=%s&repo_name=%s&encrypted=%s" % (
|
||||
ccnet_applet_root, repo_id, relay_id, quote_repo_name, enc)
|
||||
|
Reference in New Issue
Block a user