The switch code example in django?

Guys, hi.

Read a couple of articles from the developers of mailru and classmates.
And there was such a term "switch code". That is, they can include a certain code for different users or different versions of mobile devices and a bunch of different options.

That is, purely theoretical, it's all clear, I need to check the condition and enable or disable desired code.

But there are a couple of questions.
For example I write in django and that would enable or disable some code do not write me a bunch of conditions in templates in the manual? There is probably some better solution? For example if I want to disable/enable functionality not handles do I have to change the rules in the templates, and for example to have a certain place control it all.

Who already faced with this interesting problem and how you solve it? Or all the "handles" of prescription?
March 19th 20 at 08:27
1 answer
March 19th 20 at 08:29
The group will help users of you, young Padawan
And parmesani

Find more questions by tags Django