Hello Curtis, 2015-12-21 14:52 GMT+01:00 Curtis <[email protected]>:
> So aside from the obvious "preventing circular imports", what other > benefits do people see? > I'm afraid this is an example of "worse is better". String references to other models in FK definitions are one of the remnants of "Django string magic". Such magic has steadily been removed from Django. I believe the last significant step was to remove the ability to describe views as strings in URLconfs. I find it best to have a tree of models with as few circular relations as possible. Only relations that "jump back up the tree" should be declared with a string reference to make importing possible. They will usually be nullable (otherwise you could never create such an instance) and also a pain to manage ;-) I found that this principle helps with the relational design. -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CANE-7mUAZOiY7ktxCExAnVw1VD1CJ4Octdy7FKdnHu3fgCFcBw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
