iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
718 stars 47 forks source link

Better error message if iommi is not in INSTALLED_APPS #395

Closed boxed closed 1 year ago

boxed commented 1 year ago

From Bery on Discord:

when I dont have "iommi" in INSTALLED_APPS, this is what I get

Exception at ...

No registered iommi style bootstrap5. Register a style with register_style().

Available styles:

Request Method: GET Request URL: ... Django Version: 4.2 Exception Type: Exception Exception Value:

No registered iommi style bootstrap5. Register a style with register_style().

Available styles:

maybe a better text would be helpful 🫣

berycz commented 1 year ago

Similar problem: I had

class AlbumsTable(Table):
    name = Column()
    artist = Column()
    year = Column()

def index(request):
    return AlbumsTable(
        title='Albums',
        rows=Album.objects.all(),
    )

then in urlpatterns path("", views.index) and I got 'AlbumsTable' object has no attribute 'get' I suppose that was missing iommi.middleware in settings.MIDDLEWARE

boxed commented 1 year ago

The missing middleware one is a bit trickier since you can actually use iommi without the middleware and that's used quite a lot :/