Whilst I'm awake... a pull request I made to a 3rd party project included replacing explicit model imports for relation fields with lazy binding -- ForeignKey('contenttypes.ContentType') in this case.

The author pointed out this didn't play well with their IDEs refactoring tool, and asked if there was a general discussion on why lazy references were better.

So aside from the obvious "preventing circular imports", what other benefits do people see?

I'm quite sure I was driven to that PR because importing ContentTypes was causing lots of pain with AppState not being ready.

--
Curtis

--
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/56780406.2030801%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to