#2438: django.db.models get_apps() return different results according to the
server used
-------------------------------------------------+--------------------------
Reporter: kilian <[EMAIL PROTECTED]> | Owner: nobody
Status: reopened | Component: Admin
interface
Version: SVN | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------------------------------+--------------------------
Comment (by Aidas Bendoraitis aka Archatas):
I experienced this bug/feature as well. After analyzing the core code of
django I found out a workaround for the problem.
If you need to assign some limit_choices_to or default value which is
related to the instances of other models, you can create a function which
returns the necessary value and assign the function (not called) to the
limit_choices_to or default attributes. It won't be called at the load
time, so the modules will be loaded correctly, but the function will be
called at run time, for instance, when the administration is loaded.
--
Ticket URL: <http://code.djangoproject.com/ticket/2438#comment:12>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---