asifpy / django-crudbuilder

Generic CRUD implementation in Django
https://django-crudbuilder.readthedocs.org/en/latest/index.html
Apache License 2.0
193 stars 67 forks source link

Fix ImportError when an INSTALLED_APP is a dotted path to an AppConfig #19

Closed wadevries closed 8 years ago

wadevries commented 8 years ago

I have an INSTALLED_APPS setting which contains a dotted path to an AppConfig, like so:

INSTALLED_APPS = [
    # some normal apps...,
    'myproject.myapp.MyAppConfig',
    # some more apps...,
]

Somehow the import_module inside the import_crud will raise an ImportError, even though Django manages to import it as an app. If we catch the ImportError here, crudbuilder will function as normal.

Django docs on INSTALLED_APPS

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 78.748% when pulling ebc64a0d193e510344c8478d57f0a9e6a09a0ab4 on wadevries:dotted-app-import into b38c3235ff07edcce191166b56231be4683400bb on asifpy:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 78.748% when pulling ebc64a0d193e510344c8478d57f0a9e6a09a0ab4 on wadevries:dotted-app-import into b38c3235ff07edcce191166b56231be4683400bb on asifpy:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 78.748% when pulling ebc64a0d193e510344c8478d57f0a9e6a09a0ab4 on wadevries:dotted-app-import into b38c3235ff07edcce191166b56231be4683400bb on asifpy:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 78.748% when pulling 07aecfba8271999082edaf69461d3f972eb980bb on wadevries:dotted-app-import into b38c3235ff07edcce191166b56231be4683400bb on asifpy:master.