title: django invalid syntax(urls.py line 7
body: <p>this is the mysite/urls.py from a tutorial in making a website with python and django
  mysiteurls.py</p>
  
  <pre><code>from django.conf.urls import patterns, include, url
  
  from django.contrib import admin
  admin.autodiscover() 
  urlpatterns = patterns('',
     url(r'^admin/', include(admin.site.urls)),
     url(r'^blog/', include('blog.urls')),
  )
  </code></pre>
  
  <p>When I try to hit my url I get invalid syntax. What's it not liking?</p>
  
  <p>Essentially I want the view to populate a template XML file I built.
  please help am creating a website and came across this error in my urls
  here is my code</p>
  
  <pre><code>blog/urls.py
  
  from django.conf.urls import patterns,url
  from django.views.generic import ListView
  from blog.models import Post
  </code></pre>
  
  <p>i get an invalid syntax error on my code when i call it on my localbrowser</p>
  
  <pre><code>urlpatterns = patterns('',
  url(r'^',ListView.as_view(
    queryset=Post.objects.all()order_by("-date")[:10],
    template_name="blog.html")),
  )
  </code></pre>
  
  <p>please help am new to the program</p>