khaganat-web/khaganat/urls.py
Rodolphe Breard 85eb1ff03e Refactor the page edition
Markdown has been removed, pages are now directly edited in HTML. To
ease that process, TinyMCE has been added. Also, the admin dashboard now
provides a file management tool in order to upload stuff.
2020-02-28 13:53:57 +01:00

43 lines
1.5 KiB
Python

"""khaganat URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.views.generic.base import RedirectView
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from pages.views import index
from filebrowser.sites import site
urlpatterns = [path("", index)]
urlpatterns += i18n_patterns(
path("", index),
# Dependencies
path("tinymce/", include("tinymce.urls")),
path("admin/filebrowser/", site.urls),
path("admin/", admin.site.urls),
# Khaganat
path("account/", include("neluser.urls")),
path("chat/", include("chat.urls")),
path("nsfw/", include("nsfw.urls")),
path("page/", include("pages.urls")),
path("paste/", include("npb.urls", namespace="npb")),
path("password_share/", include("pwdb.urls")),
)
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)