OK, I'm a total newbie. I ran through the tutorial on the django site,
and decided to extend the poll system a bit just to learn more.  I
figured quite a bit out, but on this one I'm stuck.

I want to provide a page at polls/new to add a new poll.  I'm trying
to use the generic.create_update.create_object generic view to provide
the form, which works, but when I submit the post, it doesn't follow
the post_save_redirect I specify.  I think I know why, but first,
here's my urlconf:

     (r'^new/$', 'django.views.generic.create_update.create_object',
dict({'model': Poll}, post_save_redirect="../")),

I've no idea if that is right, but I stopped getting errors with it,
and my template will display.  Here's the template I'm using:

     <form method="post" action=".">
     <p><label for="id_newpoll">New Poll:</label> {{ form.question }}
     <input type="submit" />

This generates the expected form. When I click submit, I get returned
to the same page, no errors.  I'm pretty sure this is happening
because I have NOT NULL in the pub_date field, and I'm trying to
insert a new record without a date.  Makes sense to me, but how do I
get there?  Like I said, I'm a total newbie to this - bash me if you
want. ;)

So, what am I doing wrong, and more important to the long term, how
the heck do I debug something like this? I'm getting no errors.

TIA
schwim

--~--~---------~--~----~------------~-------~--~----~
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