diff --git a/mysite/urls.py b/mysite/urls.py index ab24cf5..47a7235 100644 --- a/mysite/urls.py +++ b/mysite/urls.py @@ -13,12 +13,12 @@ Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import url, include, patterns +from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from django.views.generic.base import TemplateView -urlpatterns = patterns('', +urlpatterns = ['', url(r'^admin/', admin.site.urls), url(r'^', include('blog.urls')), -) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)