whoops, inlines

This commit is contained in:
Sanj 2012-07-19 23:40:15 +05:30
parent f1cd2638a9
commit 2666e99a59

View File

@ -22,7 +22,7 @@ def person_form(request):
def edit_profile(request):
user = request.user
person = Person.objects.get(user=user)
inlines = [inline(instance=person) for inline in form.inlines]
#person = Person.objects.all()[0]
if request.POST:
form = PersonForm(request.POST, request.FILES, instance=person)
@ -36,7 +36,8 @@ def edit_profile(request):
else:
form = PersonForm(instance=person)
inlines = [inline(instance=person) for inline in form.inlines]
context = RequestContext(request, {
'form': form,
'inlines': inlines