Re: Post tutorial help needed - generic.create_update.create_object

2008-12-22 Thread Greg Schwimer
OK, that makes sense then. Thank you! On Mon, Dec 22, 2008 at 5:11 PM, Malcolm Tredinnick < malc...@pointy-stick.com> wrote: > > On Mon, 2008-12-22 at 15:32 -0700, Greg Schwimer wrote: > [...] > > > > > I suspect I've now moved on to a problem in a new area. The thing I > > don't quite get is wh

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-22 Thread Malcolm Tredinnick
On Mon, 2008-12-22 at 15:32 -0700, Greg Schwimer wrote: [...] > > I suspect I've now moved on to a problem in a new area. The thing I > don't quite get is why adding auto_now_add to the pub_date field in > the model broke this. Any ideas? Because auto_now_add fields are not editable. They ar

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-22 Thread Greg Schwimer
OK, that definitely fixed it, but it created another problem. Here's how it looks now: *pub_date = models.DateTimeField('date published', auto_now_add=True)* Exactly as you'd suggested. However, I'm now getting the following error on all pages I hit: *ImproperlyConfigured at /polls/new/ 'PollA

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Daniel Roseman
On Dec 22, 4:49 am, "Greg Schwimer" wrote: > On Sun, Dec 21, 2008 at 1:47 PM, Daniel Roseman < > > roseman.dan...@googlemail.com> wrote: > > > You won't see errors because you haven't included them in your > > template. Either render the whole form with {{ form.as_p }} - which > > will render the

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Malcolm Tredinnick
On Sun, 2008-12-21 at 21:46 -0700, Greg Schwimer wrote: > OK, that was very helpful, thank you. Yes, my problem is because I am > not setting the date. Thinking it through, I don't want the user > changing this, so it would be helpful to use the auto_now_add idea you > suggested. However, I ca

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Greg Schwimer
On Sun, Dec 21, 2008 at 1:47 PM, Daniel Roseman < roseman.dan...@googlemail.com> wrote: > > > You won't see errors because you haven't included them in your > template. Either render the whole form with {{ form.as_p }} - which > will render the errors as well - or for each field include a referenc

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Greg Schwimer
OK, that was very helpful, thank you. Yes, my problem is because I am not setting the date. Thinking it through, I don't want the user changing this, so it would be helpful to use the auto_now_add idea you suggested. However, I can't get that working. Here's my mode; definition for pub_date:

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Daniel Roseman
On Dec 21, 7:02 am, schwim wrote: > 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 t

Re: Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread Fridrik Mar Jonsson
Hi schwim, Welcome to Django! Glad to have you. ;-) You probably receive the same page again because there were errors in the form, most probably because you didn't include all the fields required (as you suspect). To see specifically what errors there were, please refer to: http://docs.djang

Post tutorial help needed - generic.create_update.create_object

2008-12-21 Thread schwim
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.creat