Re: Noobie question about getting form data to save to the database

2009-06-05 Thread Daniel Roseman
> On Jun 4, 7:47 pm, Streamweaver wrote: > > > You need to call form.save() after you validate the form. > On Jun 5, 8:08 am, Andy Dietler wrote: > When I add that line I get the following error: > > 'AddShow' object has no attribute 'save' Because you've used a plain Form, not a ModelForm. I

Re: Noobie question about getting form data to save to the database

2009-06-05 Thread Andy Dietler
When I add that line I get the following error: 'AddShow' object has no attribute 'save' On Jun 4, 7:47 pm, Streamweaver wrote: > You need to call form.save() after you validate the form. > > As below: > > def add(request): >     if request.method == 'POST': >         form = AddShow(request.POS

Re: Noobie question about getting form data to save to the database

2009-06-04 Thread Streamweaver
You need to call form.save() after you validate the form. As below: def add(request): if request.method == 'POST': form = AddShow(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/shows/#success') return HttpResponseRedire

Noobie question about getting form data to save to the database

2009-06-04 Thread Andy Dietler
I'm pretty new to Django and Python and I've had some success from reading some books and guides playing around so far but I'm having trouble figuring out how to get data I submit from a form to save into the database. I've simplified down my code to just the basics and I can get the form to submi