This is how you're supposed to include the admin urls:
url(r'^admin/', include(admin.site.urls)),
The documentation shows this.
The error that you're getting is coming straight from the re
python module, complaining about this part of a url:
?P[
The URLs you've posted in your comment beneath show this:
url(r'^(?P[-a-zA-Z0-9]+)/?$', 'myapp.views.getPost')
Try changing that url by giving the match group a name:
url(r'^(?P<slug>[-a-zA-Z0-9]+)/?$', 'myapp.views.getPost')
And in your getPost
view, include a slug
argument.