2020-05-01 22:46:15 +08:00
|
|
|
"""boofilsic URL Configuration
|
|
|
|
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
|
|
https://docs.djangoproject.com/en/3.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'))
|
|
|
|
"""
|
2024-06-02 14:50:07 -04:00
|
|
|
|
2020-05-01 22:46:15 +08:00
|
|
|
from django.conf import settings
|
2023-08-10 11:27:31 -04:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import include, path
|
2023-07-04 17:21:17 -04:00
|
|
|
from django.views.generic import RedirectView
|
2020-05-01 22:46:15 +08:00
|
|
|
|
2023-08-10 11:27:31 -04:00
|
|
|
from common.api import api
|
|
|
|
from users.views import login
|
|
|
|
|
2020-05-01 22:46:15 +08:00
|
|
|
urlpatterns = [
|
2023-12-05 23:14:29 -05:00
|
|
|
path("api/", api.urls),
|
2023-01-02 00:03:13 -05:00
|
|
|
path("login/", login),
|
|
|
|
path("markdownx/", include("markdownx.urls")),
|
2023-07-04 17:21:17 -04:00
|
|
|
path("account/", include("users.urls")),
|
|
|
|
path(
|
|
|
|
"users/connect/",
|
|
|
|
RedirectView.as_view(url="/account/connect", query_string=True),
|
|
|
|
),
|
2023-11-22 20:59:50 -05:00
|
|
|
path(
|
|
|
|
"auth/edit", # some apps like elk will use this url
|
|
|
|
RedirectView.as_view(url="/account/profile", query_string=True),
|
|
|
|
),
|
2023-01-02 00:03:13 -05:00
|
|
|
path("", include("catalog.urls")),
|
|
|
|
path("", include("journal.urls")),
|
2023-01-09 00:09:45 -05:00
|
|
|
path("timeline/", include("social.urls")),
|
2023-01-02 00:03:13 -05:00
|
|
|
path("hijack/", include("hijack.urls")),
|
|
|
|
path("", include("common.urls")),
|
2023-01-08 23:17:30 -05:00
|
|
|
path("", include("legacy.urls")),
|
2023-11-12 20:24:17 -05:00
|
|
|
path("", include("takahe.urls")),
|
2023-01-10 22:36:13 -05:00
|
|
|
path("tz_detect/", include("tz_detect.urls")),
|
2023-02-04 10:56:14 -05:00
|
|
|
path(settings.ADMIN_URL + "/", admin.site.urls),
|
|
|
|
path(settings.ADMIN_URL + "-rq/", include("django_rq.urls")),
|
2020-05-01 22:46:15 +08:00
|
|
|
]
|
2021-02-15 21:27:50 +01:00
|
|
|
|
|
|
|
if settings.DEBUG:
|
|
|
|
from django.conf.urls.static import static
|
2023-01-02 00:03:13 -05:00
|
|
|
|
|
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
2023-02-04 00:45:17 -05:00
|
|
|
|
|
|
|
handler400 = "common.views.error_400"
|
|
|
|
handler403 = "common.views.error_403"
|
|
|
|
handler404 = "common.views.error_404"
|
|
|
|
handler500 = "common.views.error_500"
|