title: How to get the request.path in django 1.5?
body: <p>I need the request.path in my template tag. But the problem is, my django version is 1.5.1 and I dont have the <code>TEMPLATE_CONTEXT_PROCESSORS</code>, so there's no <code>django.core.context_processors.request</code>. Now, its giving me the error:</p>
  
  <pre><code>Exception Type: AttributeError
  Exception Value:'str' object has no attribute 'path'
  Exception Location:C:\Users\Nanyoo\web\pics\album\templatetags\active_tags.py in active, line 8
  </code></pre>
  
  <p>Is there any other way to get the desired path in the template?</p>
  
  <p>views.py:</p>
  
  <pre><code>def home(request):
      photos = Photo.objects.all()
      return render(request,"index.html", {'photos':photos})
  </code></pre>
  
  <p>active_tags.py:</p>
  
  <pre><code>from django import template
  
  register = template.Library()
  
  @register.simple_tag
  def active(request, pattern):
      import re
      if re.search(pattern, request.path):
          return 'active'
      return ''  
  </code></pre>