kezabelle / django-shouty-orm

An in-progress monkeypatch to make Django error super loudly about ORM access which would normally silently cause additional queries
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Django 4.X compatiblity #5

Open fbinz opened 2 years ago

fbinz commented 2 years ago

I just found out about this cool package and wanted to test it with a current django 4.X project. Unfortunately, it did not work out of the box, because the Shouty(AppConfig) class is not found, when registering the package only via its name shoutyorm (see the AppConfig.create method in django/apps/config.py where it specifically looks for an AppConfig in a submodule called apps - which shoutyorm does not have).

As is described in the documentation, we can be more explicit and use the app config directly in installed apps:

INSTALLED_APPS = [
    ...
    "shoutyorm.Shout",
    ...
]

This is not really an issue, just a heads up for others who might otherwise think that this package was incompatible with current django releases.

Either way: Great package and thanks for releasing it. :heart:

kezabelle commented 2 years ago

Hey, thanks so much for popping by and trying it out. Sorry it didn't work out of the box!

This package has always been somewhat behind, compared to the shouty-templates one because it's a bunch more fragile, so coming back to it and keeping it up to date is ... daunting.

I do have intentions to update it at some point, with some functionality rewritten to better track certain scenarios. It's all currently sitting around in a half-baked local branch which I need to get back to, and that should end up the basis for something which is full compatible with 4.x onwards -- mostly because I need 3.2+ to be well supported for work :)

Anyway. I truly appreciate you coming by and surfacing the issue.