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

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 src._meta.many_to_many:

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 g

Making a copy of an object

2007-05-16 Thread Matti Haavikko
d 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

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 soluti

Re: Time.sleep & HttpResponse

2007-12-23 Thread Matti Haavikko
Malcolm Tredinnick wrote > Based on your later, slightly cryptic reply in this thread, I gather you > are hoping that HttpResponse is acting as a streamable pipe back to the > browser. This isn't correct. You create an HttpResponse instance and > when you return from your view, Django will send al

Re: Making a front end administration

2007-12-25 Thread Matti Haavikko
tjunning wrote: > I was wondering is there a way to use the django administration > interface as the main app? and plug the rest of the app as part of it? > It depends on what kind of application are you creating, e.g. do you trust your users? See http://www.djangobook.com/en/1.0/chapter17/