[Answer]-Python syntax error using django

1👍

You have your parenthesis mixed up. It should be:

urlpatterns = patterns('',
    url(r'^', ListView.as_view(
            queryset = Post.objects.all().order_by("-date")[:10],
            template_name = "blog.html")),
    # more url patterns
)

The ListView.as_view() result should be the second argument to the url() call.

Leave a comment