Was an error with the API. However, didn't throw back any errors.
1 Answer
As Django Docs suggest, it is better to extend / add custom data to context, rather than re-implementing it:
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['test'] = event_notification(source, event)
return context
Also, as event_notification is callable, you need to resolve it and pass result of the function to template (or template can call callables, but without arguments; or you can use custom template tags).
def get_context_data()method does nothing (because ofpass) and the 3 lines at the bottom of your code snippet are not part of any function so this would crash.kwargs['test']to be a function, not the result of that function. Anyway, what isclientin the first place? What are these "events" you're talking about?