Viicos/django-autotyping

Django PostGIS models don't seem to have a `models_module` available

Viicos opened this issue · 0 comments

model._meta.app_config.models_module seems to be None for these models, making the following code failing:

def model_imports(self) -> list[ImportItem]:
"""A list of `ImportItem` instances.
Can be used to easily import all models in a stub file.
"""
return [
ImportItem(
module_name=model._meta.app_config.models_module.__name__,