1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 21:07:17 +00:00

improved set_profile

This commit is contained in:
llj
2012-06-22 11:51:26 +08:00
parent d8c5604687
commit 9a7fa79a17
4 changed files with 25 additions and 18 deletions

View File

@@ -40,9 +40,10 @@ def edit_profile(request):
profile = Profile.objects.filter(user=request.user.username)[0]
if request.method == 'GET':
pass
modified = False
if request.method == 'POST':
modified = True
new_nickname = request.POST.get('nickname', '')
new_intro = request.POST.get('intro', '')
@@ -57,6 +58,7 @@ def edit_profile(request):
return render_to_response('profile/set_profile.html', {
'nickname':profile.nickname,
'intro':profile.intro,
'modified':modified,
},
context_instance=RequestContext(request))