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?).
Thank you.
This is how I ended up doing this:
https://medium.com/@RStein/extending-third-party-django-app-without-touching-its-code-d35fb136c08f
It's a bit hacky but its the best I could find.