On 04/04/2012, at 4:31 AM, Carl Meyer wrote: > > By the way, I took the liberty of removing from the wiki page the > references to models/settings circular dependencies, because AFAIK the > statements made about it on the wiki page were simply incorrect. > Importing settings does _not_ immediately loop through INSTALLED_APPS > and load every models file (that only happens if you run a management > command that performs model validation, and even then it happens only > after settings are fully loaded). And "from django.db import models" > itself imports settings, so if there were such a circular dependency > problem, every models.py in existence would already be suffering from > it. I frequently refer to settings in models.py and it does not cause a > problem. If anyone can provide sample code demonstrating that this is > actually a problem, feel free to correct me!
Those comments were my doing. I swear that at some point in Django's past, importing settings in models was a source of problems. However, the fact that django.db.models clearly imports settings indicates that regardless of whether this problem existed in the past, it certainly isn't the case any more. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.