Site/programmer/urls.py

31 lines
1.1 KiB
Python

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from .views import *
from django.contrib.sitemaps.views import sitemap
from .sitemaps import sitemaps
from blog.views import ArticleListView
from . import views
urlpatterns = [
path('', views.HomePageView.as_view(), name='home'),
path('about/', views.AboutPageView.as_view(), name='about'),
path('solutions/', views.SolutionListView.as_view(), name='solution'),
# path('competence/', ability, name='ability'),
path('recall/', views.RecallListView.as_view(), name='recall'),
path('blog/', ArticleListView.as_view(), name='blog'),
path('post/<int:post_id>/', show_post, name='post'),
path('callback/', callback_request, name='callback'),
path('admin/statistics/', statistics_view, name='statistics'),
# Sitemap
path('sitemap.xml', sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap'),
path('robots.txt', robots_txt, name='robots'),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)