title: Determine which templates are used by which views/ URLs in django
body: <p>I have a fairly large django project consisting of several individual apps. I am farming out some of the front-end work (CSS, HTML tweaks) to people who aren't over-familiar with django. To that end I'd like to generate a list of templates for each URL pattern any given engineer is working on. This will save much time that would otherwise be spent manually tracking down the templates used during a view's render phase.</p>
  
  <p>For example, if Bob is working on URLs beginning with <code>/accounts/</code> then I'd like to generate a list of all the templates used by any view that handles requests to those URLs.</p>
  
  <p>My initial thought is to use something in the test framework since that has access to the templates rendered during a request. However, I can't guarantee that all URLs or views will be exercised (sadly I don't have 100% test coverage), and a missed template is unlikely to be noticed. I don't mind writing a set of tests that simply exercise each view, but don't want to duplicate existing efforts. Also certain views require POSTed data or authentication to function correctly - although I suspect that's an issue I'll have to face no matter what approach is used.</p>
  
  <p>Are there any utilities or snippets that will do what I need?</p>