syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-10 Thread physicsnick
Hello, I'm trying to use ForeignKey on a specific indexed column using the to_field attribute. Unfortunately syncdb seems to be outputting the ADD CONSTRAINT statement before the CREATE INDEX on the to_field, so mysql refuses to add the constraint and syncdb quits with an exception. Here's a sim

Re: syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-11 Thread physicsnick
yncdb is not creating the tables properly; we have to manually create them all by re-ordering the sql. Nick On Aug 10, 8:49 pm, Karen Tracey wrote: > On Mon, Aug 10, 2009 at 3:52 PM, physicsnick wrote: > > > Hello, > > > I'm trying to use ForeignKey on a speci

Re: syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-12 Thread physicsnick
gnKey. :/ Thanks, Nick On Aug 11, 10:00 pm, Malcolm Tredinnick wrote: > On Tue, 2009-08-11 at 12:00 -0700, physicsnick wrote: > > Actually they don't need to be unique (and I don't want them to be > > unique). MySQL does not require that foreign keys be unique; only that > &

Re: admin running in dev mode (manage.py runserver) ignores MEDIA_URL

2009-08-14 Thread physicsnick
You have to use the --adminmedia option to runserver; there's no other way. Even if you serve the media yourself, the admin media overrides your urls.py. The developers seem to have stopped listening to complaints about fixing this: http://code.djangoproject.com/ticket/8336 On Aug 14, 5:16 am,