from django.urls import path, re_path, include from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from django.contrib.sitemaps.views import sitemap from django.views.generic import TemplateView from pages.views import page from pages.views import PageDetailView from jrnl.models import BlogSitemap from jrnl.views import HomepageList from locations.models import WritingbyCountrySitemap from locations.views import map_data from photos.models import PhotoGallerySitemap from src.models import SrcSitemap from figments.models import FigmentSitemap from projects.models.base import ProjectSitemap import builder.views import utils.views from utils.views import TagAutocomplete from sightings.views import APAutocomplete from locations.views import MapDataList from income.views import MonthlyInvoiceView, DownloadMonthlyInvoiceView admin.autodiscover() sitemaps = { 'blog': BlogSitemap, 'writingbyloc': WritingbyCountrySitemap, 'photos': PhotoGallerySitemap, 'projects': ProjectSitemap, 'src': SrcSitemap } urlpatterns = [ path(r'tag-autocomplete/', TagAutocomplete.as_view(), name='tag-autocomplete'), path(r'ap-autocomplete/', APAutocomplete.as_view(), name='ap-autocomplete'), re_path(r'^admin/build/.*', builder.views.do_build), path(r'admin/data/', include('utils.urls')), path(r'admin/income/invoice/monthlyview//invoice/', DownloadMonthlyInvoiceView.as_view(), name="download-invoice"), path(r'admin/income/invoice/monthlyview//', MonthlyInvoiceView.as_view(), name="monthly-invoice"), path(r'admin/', admin.site.urls), path(r'luximages/insert/', utils.views.insert_image), path(r'sitemap.xml', sitemap, {'sitemaps': sitemaps}), path(r'links/', include('links.urls')), path(r'jrnl/', include('jrnl.urls')), path(r'projects/', include('projects.urls')), path(r'locations/', include('locations.urls')), path(r'expenses/', include('expenses.urls', namespace='expenses')), path(r'photos/', include('photos.urls')), path(r'books/', include('books.urls')), path(r'people/', include('people.urls')), path(r'dialogues/', include('sightings.urls', namespace='sightings')), path(r'field-notes/', include('sketches.urls', namespace='sketches')), path(r'src/', include('src.urls', namespace='src')), path(r'figments/', include('figments.urls', namespace='figments')), path(r'resume/', include('resume.urls', namespace='resume')), path(r'map', include('locations.urls', namespace='map')), path(r'map/', include('locations.urls', namespace='map')), path(r'', HomepageList.as_view(), name="homepage"), path(r'comments/', include('django_comments.urls')), path(r'', PageDetailView.as_view()), path(r'//', PageDetailView.as_view()), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) if settings.DEBUG: import debug_toolbar urlpatterns = [ path(r'__debug__/', include(debug_toolbar.urls)), ] + urlpatterns