title: How to do a Django Template dictionary lookup when key has special characters?
body: <p>In the django documentation it says that . notation will do a lookup in the following order</p>
  
  <pre><code>#Dictionary lookup. Example: 
  foo["bar"]
  #Attribute lookup. Example: 
  foo.bar
  #List-index lookup. Example: 
  foo[bar]
  </code></pre>
  
  <p>In my project I have a dictionary:</p>
  
  <pre><code>foo = {'ba-r':'...}
  </code></pre>
  
  <p>But using . notation causes an error, which appears to be because the entire 'foo.ba-r' is a variable as described in the documentation <a href="https://docs.djangoproject.com/en/1.9/ref/templates/api/#variables-and-lookups" rel="nofollow">here</a>.</p>
  
  <pre><code>foo.ba-r
  </code></pre>
  
  <p>Is there any way to properly access the 'ba-r' key of my dictionary?</p>