loading...

re: Refactoring an Overgrown Notifications Class in Django VIEW POST

FULL DISCUSSION
 

Is there a reason for SendNotificationMixin to be a class or a mixin? It's methods do not use 'self' at all (except self.send_email, and that should just be a function call). Classes which do not have any state, and do not use self, are just namespaces for functions, except they are harder to use (e.g. you have to instantiate them or inherit from them etc.). Python normally uses modules for namespaces, not classes. youtube.com/watch?v=o9pEzgHorH0

Code of Conduct Report abuse