Why Template Tags Instead of Python?

Ken, I really appreciate this response. Thank you for providing a complete rational based on first hand experience. I cannot tell you how frustrating it has been over the years to be lectured at by people who are parroting a litany based on what they had told to them, without grounding the explanation in the brass tacks that are reality we work with. I have read countless times about the virtues of separating code from html, but never has the accompanying explanation made sense, especially considering the insanity built into a lot of templating solutions promoted in those lectures. The result is I never could understand the real reason for having a template language that is different from the server side scripting language. In contrast, the Django templates I have seen so far align with the explanation of why a separate template language is used.

Now, I am struggling to implement in Django a job currently running in a php script/hack of mine. The script loads a file/directory list from the server’s file system, then displays the list as hyerlinks for navigating, with controls on what is shown and which files and directories have links. The final result looks like this:


A live example is available at this link.

I don’t yet understand how to break up this process with Django to clean it up and learn how to develop in Django. I have another thread started on this question.