whoops, inlines
This commit is contained in:
parent
f1cd2638a9
commit
2666e99a59
|
@ -22,7 +22,7 @@ def person_form(request):
|
||||||
def edit_profile(request):
|
def edit_profile(request):
|
||||||
user = request.user
|
user = request.user
|
||||||
person = Person.objects.get(user=user)
|
person = Person.objects.get(user=user)
|
||||||
inlines = [inline(instance=person) for inline in form.inlines]
|
|
||||||
#person = Person.objects.all()[0]
|
#person = Person.objects.all()[0]
|
||||||
if request.POST:
|
if request.POST:
|
||||||
form = PersonForm(request.POST, request.FILES, instance=person)
|
form = PersonForm(request.POST, request.FILES, instance=person)
|
||||||
|
@ -36,7 +36,8 @@ def edit_profile(request):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
form = PersonForm(instance=person)
|
form = PersonForm(instance=person)
|
||||||
|
inlines = [inline(instance=person) for inline in form.inlines]
|
||||||
|
|
||||||
context = RequestContext(request, {
|
context = RequestContext(request, {
|
||||||
'form': form,
|
'form': form,
|
||||||
'inlines': inlines
|
'inlines': inlines
|
||||||
|
|
Loading…
Reference in New Issue
Block a user