|
|
|
|
|
by kissgyorgy
820 days ago
|
|
> In some of the examples given, you even have database access in the same line that is generating the HTML document. Python template engines have the exact same problem, just way less obvious. It doesn't have to be that way. Make all the queries up-front and pass the result the same way as you would pass context to templates. This way, all your components are pure. The difference is explicitness. Much easier to spot where side-effects happen than in templates. |
|