Django script - ImportError: "unable to import name widgets"

I am resurrecting a script that worked (a few months ago). This is a command line script that uses Django ORM. The first time I refer to the Django class, I get a stack trace from the depth of Django (django / contrib / admin / options.py), telling me: "ImportError: cannot import name widgets"

Has anyone seen anything like this before? I don’t think this is due to the paths, but maybe this is circular imports? (And how can something in my code cause circular import in Django code?)

+3
source share

Source: https://habr.com/ru/post/1780484/


All Articles