Without having the full module path of a Django model, is it possible to do something like:
model = 'User' [in Django namespace]
model.objects.all()
...as opposed to:
User.objects.all().
EDIT: I am trying to make this call based on command-line input. Is it possible to avoid the import statement, e.g.,
model = django.authx.models.User
Without Django returning the error:
"global name django is not defined."
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…