views.py to get real user
This commit is contained in:
parent
bb89200e8b
commit
b8326c5388
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue
Block a user