website/src/ctfs/urls.py

16 lines
497 B
Python
Raw Normal View History

from django.contrib.sitemaps.views import sitemap
2021-07-10 11:18:24 +02:00
from django.urls import path
from .sitemaps import CategorySitemap, CTFSitemap
2021-07-10 11:18:24 +02:00
from . import views
sitemaps = {
'categories': CategorySitemap(),
'challenges': CTFSitemap(),
}
2021-07-10 11:18:24 +02:00
urlpatterns = [
path('<str:cat_slug>/', views.category, name='category'),
path('<str:cat_slug>/<str:ctf_slug>', views.ctf, name='ctf'),
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
2021-07-10 11:18:24 +02:00
]