This commit is contained in:
2017-12-08 01:53:10 +03:00
parent 91954feb54
commit 3a72250fd5

View File

@ -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)