"selected" for ForeignKey field?

2005-08-31 Thread HBTaylor
I posted this on Djangu Users, but Django Developers may be a better place. I have a model with the following (exerpt): class Team(meta.Model): name = meta.CharField(maxlength=200) venue = meta.CharField(maxlength=200) division = meta.ForeignKey(Division) # snip snip snip class

Re: Ticket #12 Solution

2005-08-31 Thread Brant Harris
On 8/31/05, Brant Harris <[EMAIL PROTECTED]> wrote: > > Erm. Can you create a NOT NULL Column without a default in an ALTER > > Statement? I know you can't in MSSQL. > > It worked fine for me in MySQL... Not sure, although a change in the > code would be trivial. In retrospect it does NOT work.

Re: Ticket #12 Solution

2005-08-31 Thread Brant Harris
> Erm. Can you create a NOT NULL Column without a default in an ALTER > Statement? I know you can't in MSSQL. It worked fine for me in MySQL... Not sure, although a change in the code would be trivial. The other point you make is the sort of versioning of the transition file. I see your point,

Re: Ticket #12 Solution

2005-08-31 Thread Moof
Brant Harris wrote: > I now have a working solution to ticket #12. > > I've added some code to management.py that allows one to run: > >>django-admin.py transition ... >>django-admin.py sqlupdate > > > Now, sqlupdate looks at the "app.transition.py" file, and executes the > changes accordi

_(pre/post)_save relative question

2005-08-31 Thread asrenzo
Hi, I'm sorry to bother you with this question but I posted in the users list and it seems that nobody can answer me. So here is my problem : class Toto(meta.Model): parent = meta.ForeignKey("self") name = meta.CharField(maxlength=255, null=False, default='') class META: adm