I found my mistake i made ___init__ function instead of __init__ :)
On Feb 11, 7:06 pm, Shawn Milochik 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 be
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': eve
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
I tried to make this small example form
from django import forms
class PurchaseForm(forms.Form):
email = forms.EmailField()
#agree = forms.BooleanField()
def ___init__(self, *args, **kwargs):
super(PurchaseForm, self).__init__(*args, **kwargs)
self.fields['agree'] = f
This is pretty easy. Instead of thinking about making dynamic forms,
think about making dynamic fields.
You'll have one form. When you initialize it, you'll pass it
information about the tickets available. In the __init__ of your form
you will dynamically add field objects to the form by appending
Hello
I want to make an form for purchasing tickets. The problem is that for
every event there can be diferent types of ticket with diferent price.
For every kind of ticket I will have to create an edit box where user
can select how much tickets he wants.
Then in view class I will just display t
6 matches
Mail list logo