from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin

from django.views.generic import TemplateView

from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtailcore import urls as wagtail_urls


urlpatterns = []

if settings.DEBUG:
    urlpatterns += [
        url(r'^404/$', TemplateView.as_view(template_name='404.html')),
        url(r'^500/$', TemplateView.as_view(template_name='500.html')),
    ]
​
urlpatterns += [
    # django
    url(r'^django-admin/', admin.site.urls),
​
    # website
    url(r'^blog/$', TemplateView.as_view(template_name='blog/blog_index.html')),
    url(r'^blog-post/$', TemplateView.as_view(template_name='blog/blog_post.html')),
​
    # wagtail
    url(r'^admin/', include(wagtailadmin_urls)),
    url(r'', include(wagtail_urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin

from django.views.generic import TemplateView

from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtailcore import urls as wagtail_urls


urlpatterns = []

if settings.DEBUG:
    urlpatterns += [
        url(r'^404/$', TemplateView.as_view(template_name='404.html')),
        url(r'^500/$', TemplateView.as_view(template_name='500.html')),
    ]

urlpatterns += [
    # django
    url(r'^django-admin/', admin.site.urls),

    # website
    url(r'^blog/$', TemplateView.as_view(template_name='blog/blog_index.html')),
    url(r'^blog-post/$', TemplateView.as_view(template_name='blog/blog_post.html')),

    # wagtail
    url(r'^admin/', include(wagtailadmin_urls)),
    url(r'', include(wagtail_urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
fix urls.py