> 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
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
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
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
4 matches
Mail list logo