2👍
By overriding dispatch
and calling get_context_data
directly, you’ve short-circuited the normal view process. self.object
isn’t actually defined until the get
method is called.
I doubt you actually need to override dispatch
at all. Can you explain what your logic is that needs to go there?
Source:stackexchange.com