no more apache2
This commit is contained in:
parent
ba112f7166
commit
d8bd75003b
79 changed files with 52 additions and 27 deletions
12
sciodog-app/app/blog/urls.py
Normal file
12
sciodog-app/app/blog/urls.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from . import views
|
||||
from django.urls import path
|
||||
from django.shortcuts import render
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
urlpatterns = [
|
||||
path("", lambda r: render(r, "blog/index.html")),
|
||||
path("posts", views.IndexView.as_view()),
|
||||
path("preview", login_required(views.ArticleList.as_view(preview=True), login_url='/admin/login'), name='articles'),
|
||||
path("articles", views.ArticleList.as_view(), name='articles'),
|
||||
path('articles/<slug:slug>/', views.ArticleDetail.as_view(), name='article_detail'),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue