3 ms·
Thats what I ended up doing most of the time. Still ended up with a lot of if then code in the html template. Making it more verbose than it would have been, ha
by dukeofdoom 6y ago
Thats what I ended up doing most of the time. Still ended up with a lot of if then code in the html template. Making it more verbose than it would have been, had I just generated the html page inside a function.
- DangitBobby 6y agoYou can often generate a structure such as nested dicts and lists of dicts to pass via the template context to achieve your desired layout. This lets you avoid complex logic via template tags but still have the benefits of the templating system.
- viraptor 6y ago> I just generated the html page inside a function. But that's also a template - just your own kind rather than framework's. I guess it's hard to really understand the tradeoffs here without concrete examples... which is not great for HN either.