[Answered ]-Large functionality change based on variables

2👍

The most pythonic way would be to use classes for your views and then use inheritance to override specific parts of each view. In your description you describe something which sounds exactly like inheritance.

There are two relevant SO questions you might want to look at class views in django and django class view with decorator and sessions

Inheritance will give you the tools to do this fine grained overloading that you want to do I think.

This would of course require a bit of API change, but it is better to do it now than wait until the project is twice the size!

Leave a comment