I'm converting some django views to be class based, and so far loving the flexibility.
Most of my views subclass from a parent view ClubView
. Each subclassed view that needs to handle a post()
method override needs to have access to the corresponding club
value.
This value is in the URL, so the request variable has it. However, is there a way for me to grab this value, and fetch the corresponding club object outside of the post()
method? like a pre-post()
method or something. Mainly because I don't want to copy/paste club = Club.objects.get(...
A more general question -- in what order do all the methods execute in? Django's documentation on this seems lacking.