summaryrefslogtreecommitdiff
path: root/app/posts/urls.py
blob: 322e5ad59a386bbbd7955701621b5140bc060ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from django.urls import path, re_path
from django.views.generic.base import RedirectView

from . import views

app_name = "posts"

urlpatterns = [
    path(
        r'<str:slug>.txt',
        views.EntryDetailViewTXT.as_view(),
        name="detail-txt"
    ),
    path(
        r'<str:slug>',
        views.EntryDetailView.as_view(),
        name="detail"
    ),
    re_path(
        r'<int:page>/',
        views.EntryList.as_view(),
        name="list"
    ),
]