Im wanting to add functionality to a Django-Notifications view. I guess the best way to do this is to override the class, add my custom logic, then pass the class to super:
from notifications import AllNotificationsList class CustomAllNotificationsList(AllNotificationsList): def get_queryset(self): # my custom logic return super(CustomAllNotificationsList, self).get_queryset(self)
I know of this guide for overriding Django Admin, but I cant find how to do this for other third party packages.
My questions are:
I dont know where to put this overridden class (in my project tree).
I dont know how to tell Django that it has been overridden (settings.py?).
This is how I ended up doing this:
It’s a bit hacky but its the best I could find.