title: How to inject template context variable only if it doesn't exist
body: <p>I have a <code>base_template.html</code> that uses a context variable <code>my_context_var</code>. All of my other templates extends this base template. Can you help me answer one of these questions? (They are just different ways to look at the same underlying problem)</p>
  
  <ol>
  <li><p>How can I make <code>my_context_var</code> available to all the derived templates but allow a way to override <code>my_context_var</code> for specific views.</p></li>
  <li><p>How can I inject <code>my_context_var</code> into the template context only if that variable is not already there.</p></li>
  </ol>
  
  <p>Essentially, I'm looking for a setdefaults() functionality for context variables. If it helps, <code>my_context_var</code> is basically a blank search form that is available in most pages of my site. I need to override it for one page that displays both the form and the result. The current problem is that I keep getting the blank form even for that result page.</p>