File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44
55class ProfileForm (forms .ModelForm ):
6- class Meta :
7- model = Profile
8- fields = ['city' , 'contact_no' ]
9- exclude = ['user' ,]
6+ class Meta :
7+ model = Profile
8+ fields = ['city' , 'contact_no' , ]
9+ exclude = ['user' ,]
Original file line number Diff line number Diff line change 33
44# Third Party Stuff
55from django .contrib .auth .decorators import login_required
6- from django .shortcuts import render , get_object_or_404 , redirect
6+ from django .shortcuts import render , get_object_or_404
77from django .views .decorators .http import require_http_methods
88from django .http import HttpResponseRedirect
99from django .core .urlresolvers import reverse
@@ -49,6 +49,6 @@ def profile(request):
4949 user = get_object_or_404 (User , pk = username .id )
5050 detail = get_object_or_404 (Profile , user = user )
5151 if detail :
52- return render (request , 'profiles/userprofile.html' , {'detail' :detail })
52+ return render (request , 'profiles/userprofile.html' , {'detail' : detail })
5353 else :
5454 return render (request , 'profiles/userprofile.html' )
You can’t perform that action at this time.
0 commit comments