I'm pretty new when it comes to python classes / django CBVs. I'm trying to have a method (print_test) from my child class override my parent class, but I can't get it to work. What am I doing wrong?
Below is my parent:
This is my child:
I've tried a bunch of things but can't see to get it to work :/
Appreciate all help!
CodePudding user response:
I realized my folly...
The print_test() in the parent is tucked under the Post() method, but the print_test() method in the child class is not. So the scopes don't match up and thus it doesn't get overwritten.
When I moved the print_test() method in the parent class outside of the post(), it was overwritten!