from django.urls import path, re_path, include from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.views.generic.base import RedirectView import debug_toolbar admin.autodiscover() admin.site.enable_nav_sidebar = False from django.contrib.admin.sites import AdminSite AdminSite.site_header = "PD Data Sorting Tools" AdminSite.site_title = "Sorting" urlpatterns = [ path(r'admin/', admin.site.urls), path(r'accounts/', include('django_registration.backends.activation.urls')), path(r'accounts/', include('django.contrib.auth.urls')), path(r'', include('django_registration.backends.activation.urls')), path(r'', include('django.contrib.auth.urls')), path(r'code/', include('deals.urls', namespace='deals')), path(r'post/', include('posts.urls')), re_path(r'^post/$', RedirectView.as_view(url='/posts/')), path(r'posts/', include('posts.urls', namespace='posts')), path(r'notes/', include('notes.urls', namespace='notes')), path('__debug__/', include(debug_toolbar.urls)), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)