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)),
    ]

[((313, 344), 'django.conf.urls.url', 'url', (['"""^admin/"""', 'admin.site.urls'], {}), "('^admin/', admin.site.urls)\n", (316, 344), False, 'from django.conf.urls import url, include\n'), ((456, 547), 'django.conf.urls.url', 'url', (['"""^sitemap\\\\.xml$"""', 'sitemap', "{'sitemaps': {'blog': ArticleSitemap}}"], {'name': '"""sitemap"""'}), "('^sitemap\\\\.xml$', sitemap, {'sitemaps': {'blog': ArticleSitemap}},\n    name='sitemap')\n", (459, 547), False, 'from django.conf.urls import url, include\n'), ((374, 449), 'django.views.generic.TemplateView.as_view', 'TemplateView.as_view', ([], {'template_name': '"""robots.txt"""', 'content_type': '"""text/plain"""'}), "(template_name='robots.txt', content_type='text/plain')\n", (394, 449), False, 'from django.views.generic import TemplateView\n'), ((560, 580), 'django.conf.urls.include', 'include', (['"""blog.urls"""'], {}), "('blog.urls')\n", (567, 580), False, 'from django.conf.urls import url, include\n'), ((679, 706), 'django.conf.urls.include', 'include', (['debug_toolbar.urls'], {}), '(debug_toolbar.urls)\n', (686, 706), False, 'from django.conf.urls import url, include\n')]