views.py to get real user

This commit is contained in:
Sanj 2012-07-17 19:53:59 +05:30
parent bb89200e8b
commit b8326c5388

View File

@ -21,8 +21,8 @@ def person_form(request):
@login_required
def edit_profile(request):
user = request.user
#person = Person.objects.get(user=user)
person = Person.objects.all()[0]
person = Person.objects.get(user=user)
#person = Person.objects.all()[0]
if request.POST:
form = PersonForm(request.POST, request.FILES, instance=person)
if form.is_valid():