AppConfig.get_model in Django
AppConfig.get_model:
AppConfig.get_model(model_name, require_ready=True)
- This method returns the Model with the given model_name.
- Here model_name is case-insensitive.
- It raises LookupError if no such model exists in this application.
- It requires the app registry to be fully populated unless the require_ready argument is set to False.
- require_ready behaves exactly as in apps.get_model().
Comments
Post a Comment