On Dec 18, 1:44 am, Łukasz Rekucki <[email protected]> wrote: >[...]The problem with putting signal handlers > in __init__, is that it isn't the place you would really expect Model > related code to live (like post_save). It can also lead to non-obvious > cyclic imports, 'cause your handler code will most likely need some > models, etc.
Cyclic imports is exactly the problem I've run into. I do currently keep the signal handler registration code in __init__.py because that the only place as far as I can tell is guaranteed to be executed at Django's initialization. But because of cyclic dependencies, I had to move all other code out of __init__.py. Sounds like Django needs an init.py for every app that will be executed after all imports are done. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

