from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import RedirectView
from django.views.generic import TemplateView
from django.contrib.sitemaps.views import sitemap
from django.conf import settings

from blog.sitemaps import ArticleSitemap

urlpatterns = [
    url(r'^admin/', admin.site.urls),

    url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': {'blog': ArticleSitemap}}, name='sitemap'),

    url(r'^', include('blog.urls')),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]

[((11, 4, 11, 36), 'django.conf.urls.url', 'url', ({(11, 8, 11, 18): '"""^admin/"""', (11, 20, 11, 35): 'admin.site.urls'}, {}), "('^admin/', admin.site.urls)", False, 'from django.conf.urls import url, include\n'), ((14, 4, 14, 91), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url, include\n'), ((13, 26, 13, 101), 'django.views.generic.TemplateView.as_view', 'TemplateView.as_view', (), '', False, 'from django.views.generic import TemplateView\n'), ((16, 14, 16, 34), 'django.conf.urls.include', 'include', ({(16, 22, 16, 33): '"""blog.urls"""'}, {}), "('blog.urls')", False, 'from django.conf.urls import url, include\n'), ((22, 28, 22, 55), 'django.conf.urls.include', 'include', ({(22, 36, 22, 54): 'debug_toolbar.urls'}, {}), '(debug_toolbar.urls)', False, 'from django.conf.urls import url, include\n')]