title: TemplateSyntaxError at /admin/ Caught SyntaxError while rendering: invalid syntax
body: <p>I have an app names blogspot and when ever I add the urls related to this app, into the project urls.py file I get the above given error. The code for the urls.py file for the blogspot app is</p>
  
  <pre><code>from django.conf.urls.defaults import *
  from blogspot.models import UserBlog
  from tagging.views import tagged_object_list
  from hitcount.views import update_hit_count_ajax
  
  info_dict =
  {
      'queryset': UserBlog.objects.filter(status=1),
      'date_field': 'pub_date',
  }
  
  urlpatterns = patterns('',                      
      url(r'^new/$', 'blogspot.views.blog_form' , name = 'blog_new'),
      url(r'^edit/(?P&lt;blog_id&gt;\d+)/$', 'blogspot.views.blog_form',  name = 'blog_edit'),
      url(r'^delete/(?P&lt;blog_id&gt;\d+)/$', 'blogspot.views.blog_delete', name = 'blog_delete'),                       
      url(r'^all/$', 'blogspot.views.all_blogs', name =  'blog_all'),
      url(r'^view/(?P&lt;blog_id&gt;\d+)/$', 'blogspot.views.blog_view', name = 'blog_view'),
      url(r'^ajax/hit/$',update_hit_count_ajax,name='hitcount_update_ajax'), 
  )
  
  urlpatterns += patterns('django.views.generic.date_based',
  
      url(r'(?P&lt;year&gt;d{4})/(?P&lt;month&gt;[a-z]{3})/(?P&lt;day&gt;w{1,2})/(?P&lt;slug&gt;[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blogspot/detail.html')),
      url(r'^(?P&lt;year&gt;d{4})/(?P&lt;month&gt;[a-z]{3})/(?P&lt;day&gt;w{1,2})/(?P&lt;slug&gt;[-w]+)/$', 'object_detail', dict(info_dict, template_name='blogspot/list.html')),
      url(r'^(?P&lt;year&gt;d{4})/(?P&lt;month&gt;[a-z]{3})/(?P&lt;day&gt;w{1,2})/$','archive_day',dict(info_dict,template_name='blogspot/list.html')),
      url(r'^(?P&lt;year&gt;d{4})/(?P&lt;month&gt;[a-z]{3})/$','archive_month', dict(info_dict, template_name='blogspot/list.html')),
      url(r'^(?P&lt;year&gt;d{4})/$','archive_year', dict(info_dict, template_name='blogspot/list.html')),
      url(r'^$','archive_index', dict(info_dict, template_name='blogspot/list.html')),
  )
  </code></pre>
  
  <p>I don't understand, how adding this url file is messing up with the admin urls as well.</p>
  
  <p><strong>Update</strong></p>
  
  <p>When I remove all the lines from urls.py file, then everything is running fine. However even if I add one line the whole thing goes rogue. I don't understand there is no syntax error even then it is not working.</p>
  
  <p><strong>More Update</strong></p>
  
  <p>I think this problem maybe because of the views.py file of the app because, each other py file has it's .pyc file but not the views.py file. Syntactically there is no error in the urls.py file.</p>