[Fixed]-Django accessing context data inside get_success_url

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.

Leave a comment