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

Popular posts from this blog

Messages Framework in Django

Forms in Django(bound, unbound, clean, is_valid, errors)

Advantages to using URLField() over TextField()