title: Caught VariableDoesNotExist while rendering: Failed lookup for key [time_filter] in u'[{},
body: <p>views.py</p>
  
  <pre><code>def when(request):
      user = request.user
      report = Report.objects.get(user=request.user)
      reportform = ReportForm(instance=report)   
      settings = Settings.objects.get(user=request.user)
      settingsForm = SettingsForm(instance=settings) 
      settings=Settings.objects.get(user=2)
      if settings.date_format == '0':
          date_filter = 'd/m/Y'
      else:
          date_filter = 'm/d/Y'
      if settings.time_format == '0':
          time_filter = 'I:Mp'
      else:
          time_filter = 'H:M'
      if request.method == 'POST':            
          reportform = ReportForm(instance=report,data=request.POST)
          if reportform.is_valid():
              report = reportform.save(commit=False) 
              report.user = request.user
              report.save()
              return redirect('/member/media/')
  
      return render_to_response('incident/when.html',{
                    'newreport_menu': True, 
                    'form': reportform,
                    },
                     context_instance=RequestContext(request))
  </code></pre>
  
  <p>template is</p>
  
  <pre><code>{{ form.manual_time|date:time_filter }}
  {{ form.manual_date|date:date_filter }}
  </code></pre>
  
  <p>Giving error in date_filter and time_filter in template,the error is "Caught VariableDoesNotExist while rendering: Failed lookup for key [time_filter] in u'[{},"</p>