Commit bb75078f by liuyingying

去除作者多余空格

parent 271f7c23
......@@ -401,7 +401,7 @@ def add_publication(request):
Publications.objects.create(pubID=pubID, title=title,link=link, messages='kidding', authors = authors,journalname=journalname,uploadByUser=uploadby,date=date,)
except ProgrammingError as e:
return JsonResponse({"message": 0})
authorArr = authors.split(',')
authorArr = authors.split(',').strip()
print(authorArr)
for author in authorArr:
users_list = User.objects.all().values('name')
......@@ -484,7 +484,7 @@ def profile_submit(request):
pwd=request.POST["pwd"]
mail=request.POST["mail"]
website=request.POST["website"]
if len(str(pwd).strip()) >0:
if len(str(pwd).strip()) > 0:
try:
User.objects.filter(userID=userID).update(name_hanzi=name_hanzi, name_eng=name_eng, pwd=pwd, mailAddress= mail, personal_website=website)
return JsonResponse({'message':1})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment