Re: CRUD generic views do not work on model with foreign key

2006-10-24 Thread doubtintom
Yep, that did it. Thanks. Actually, my urls.py was OK, it was decoupled into the application directory. But that darn template got imported into the project sort of late at night, and foxed me into misinterpreting the symptoms. I have seen some template errors caught by django. Some but not all,

Re: CRUD generic views do not work on model with foreign key

2006-10-23 Thread Russell Keith-Magee
Ok; there are a few problems 1) in urls.py, new_dict pushes post_save_redirects to "/invoices/". However, no URL handler is set up for that url. However, you haven't hit this problem yet - the main problem is... 2) ticket_form.html doesn't contain a form.theater element. As a result, submitting

Re: CRUD generic views do not work on model with foreign key

2006-10-23 Thread doubtintom
Russell, thanks for looking into this! See comments & code below. Tom Russell Keith-Magee wrote: > > - Are you sure that the database has been synced to match the 'with > foreign key' version of the model? Drop the db and recreate to be > sure. Yes, I had done that. > - What does the developmen

Re: CRUD generic views do not work on model with foreign key

2006-10-23 Thread Russell Keith-Magee
On 10/24/06, doubtintom <[EMAIL PROTECTED]> wrote: > > Similarly for django.views.generic.create_update.update_object. They > work fine on the cheetsheet model, but when a foreign key is added to > the Theater model that I made up for testing, changes do not take, > browser does not forward. > > I

Re: CRUD generic views do not work on model with foreign key

2006-10-23 Thread doubtintom
Sure, Russ, I'll be more explicit, hopefully less Zen-like. The cheetsheet model as-is works just as expected with django.views.generic.create_update.create_object, i.e. 1. url kicks off generic view add to template with empty fields as expected 2. I enter data, click save 3. I get whisked back t

Re: CRUD generic views do not work on model with foreign key

2006-10-23 Thread Russell Keith-Magee
On 10/24/06, doubtintom <[EMAIL PROTECTED]> wrote: > However, nearly the same model with a foreign key to another model in > the same app (or project, I've tried it both ways) does not: Help us help you. What does "does not work" mean? What success did you have with the cheatsheet model? What pro