On 29 mar, 12:16, vamsy krishna <badguitar...@gmail.com> wrote:

> thnx jonas...i figured datz wat i mite do...

Totally OT, but talking "datz way" won't make you looks "kewl" here.

> so django has a limitation
> on imports like in da case i mentioned?
>

It's not a django limitation, it's a Python one.

Technical point : almost everything happens at runtime in Python. the
'def', 'class' and 'import' statements are executable statements, and
the first import of a given module imply the execution of all top-
level statements in this module. So, if modA has a top-level import
statement referencing modB (directly or indirectly FWIW) and modB
itself has a top-level import statement referencing modA, it just
cannot work, period.

Now this "limitation" is a GoodThing(tm) from a design POV - such
cyclic dependencies are something you want to avoid even in languages
that allow it, because they make for very unmananageable code.

HTH

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to