1👍
✅
get_context_data
won’t even be called if the form is valid, because a redirect needs no context. You should put that calculation somewhere else, perhaps into a separate method which could be called both from get_context_data
and form_valid
.
Source:stackexchange.com