Hello, I hope this is the right place to post this query; I haven't had much to do with projects as big as django in the past, and I had little response on #django.
I spent a bit of time looking through django's source code, to work out how to optimally structure my own app, and I noticed something slightly curious. When get_template is called, it ultimately loads not only the named template in question, but also those explicitly referenced through the 'include' tag. This makes sense, as it allows templates to be cached in memory for use throughout the life of the process they're run in, and not re-parsed for every page request. However the 'extends' tag does not seem to have the same effect (correct me if I'm wrong - see django/template/loader_tags.py > class ExtendsNode) - instead it waits for render() to be called before it loads the template in question. Unless I am wrong, this should only be necessary when the extended template is a variable - otherwise it would make sense to load the extended templates when the class is instantiated. I changed a few lines around in the class to modify this behaviour, and thus-far template loading seems to work exactly as before. I've only been learning to use django for a few days, so I'm unfamiliar with most of the design decisions, but am I correct in believing the present behaviour is sub-optimal? Thanks, Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
