View
=========

def detail(request, event_id):
    event = get_object_or_404(Event, pk = event_id)

    if request.POST :
        purchaseForm = PurchaseForm(request.POST)
        #...
    else:
        purchaseForm = PurchaseForm()

    return render_to_response('events/detail.html', {'event': event,
'form' : purchaseForm})

Template:
=========

<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>

=========

Do I have to add the new fields also in Template or they will be shown
automatically?

On Feb 11, 7:06 pm, Shawn Milochik <sh...@milochik.com> wrote:
> You could be missing something, but I don't have enough to go on. Did
> you add the field to your template? What do your view and template
> look like?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to