W开发者_开发知识库hile rendering a template is there a way to make Django log something when unused tag libraries are loaded?
I guess you could fold in your own load method into the django template language and add in a logmethod using Django logging, just out of curiosity, is it the complexity of the template variety that a logger makes it more conveinient to keep the helicopter view?
Here is what I would do, although this may not be the best solution.
Write a script that goes through all of your urls.py files and builds up a tree of all the urls that exist in your project (I know there is a third-party django plugin to list all urls, but I cant seem to remember what it is)
Build a unittest that takes the list generated in (1), using the Client() to hit every url, and then query the response objects for the templates which were rendered.
Perform a logical AND with the list of total HTML files in your template directory and the list generated from this unit test.
精彩评论