#18907: Documentation regarding population of backrefs is incorrect --------------------------------+------------------------------------- Reporter: simonpercivall | Owner: aaugustin Type: Bug | Status: assigned Component: Documentation | Version: 1.4 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------+-------------------------------------
Comment (by aaugustin): Tim, here's a proposal to replace the third paragraph of "How are the backward relationships possible?". If you can improve the wording and commit it, that's perfect. Thank you! {{{ The answer lies in the app registry. When Django starts, it imports each application listed in :setting:`INSTALLED_APPS`, and then the ``models`` module inside each application. Whenever a new model class is created, Django adds backward-relationships to related models. If the related models haven't been imported yet, Django keeps tracks of the relationships and adds them when the related models eventually are imported. For this reason, it's particularly important that all the models you're using be defined in applications listed in :setting:`INSTALLED_APPS`. Otherwise, backwards relations may not work properly. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/18907#comment:7> Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.32dc737ad4ce1d9a4bedb37a54c57a1b%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.