title: Django: Should I have complex template variable names or complex views
body: <p>In django, which should I generally prefer, and why?</p>
  
  <ul>
  <li><p>long template variable names, passing as few "root objects" (e.g. request) as possible:</p>
  
  <p><code>{% if request.current_page.get_children.0.get_absolute_url %}</code></p></li>
  <li><p>or pass a hell lot of different "root objects" and keep the template variable name simple:</p>
  
  <p><code>{% if first_child_url %}</code></p></li>
  <li><p>somewhere in the middle, e.g. passing <code>children</code></p>
  
  <p><code>{% if children.0.get_absolute_url %}</code></p>
  
  <p>or passing <code>first_child</code></p>
  
  <p><code>{% if first_child.get_absolute_url %}</code></p></li>
  </ul>
  
  <p>the advantage of the first approach is looser coupling, since I won't need to change the view every time I need to use another variable; the advantage of the second approach is that the template is simpler and much cleaner.</p>
  
  <p>If I'm using generic views (or third party views) which does not allow me to add additional context variables (therefore the only way to add context variables is by writing middleware or context processors), would that change anything?</p>