Re: Django won't create foreign keys

2008-01-27 Thread Matti Haavikko
Hi, I experienced the same problem. I found an earlier ticket on this same error and reopened it. See http://code.djangoproject.com/ticket/2130 The fix you suggested fixes the problem for me. I've added it to the comments of the ticket. - Haavikko apramanik wrote: > Anyone? I still haven't

Re: settings.py gets imported twice

2007-11-05 Thread Matti Haavikko
Thomas Guettler wrote: > A found this solution. > > # file logconfig.py > import logging > if not hasattr(logging, "set_up_done"): > logging.set_up_done=False > > def set_up(myhome): > if logging.set_up_done: > return > logging.set_up_done=True > Here's an alternative

Re: Problem with __setattr__ and __getattribute__

2007-08-06 Thread Matti Haavikko
Hi, I asked the same question earlier. When ID is set to None and object is saved, the M2M fields are not copied. They must be copied separately. Caveats: the code below uses django internals and is very lightly tested. def copy_m2m_fields(src, dst): for m2m_field in

Re: MySQL and InnoDB

2007-08-06 Thread Matti Haavikko
Hi, Can you get the same result with "default-storage-engine=InnoDB" in your my.cnf? - Haavikko Rob Hudson wrote: > Hi Django Users, > > I'm using MySQL with Django but I dislike MySQL's default MyISAM > tables because there is no referential integrity. So I googled how to > force Django to

Making a copy of an object

2007-05-16 Thread Matti Haavikko
to - Save the object My question is, is it advisable to copy objects this way? Would there be problems with e.g. foreign keys and generic relations? Thanks, - Matti Haavikko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group