2021-09-05 17:10:14 +00:00
|
|
|
""" all home app urls """
|
|
|
|
|
2021-10-22 04:45:06 +00:00
|
|
|
from django.conf import settings
|
2021-10-21 12:33:27 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2021-10-22 04:45:06 +00:00
|
|
|
from django.contrib.auth.views import LogoutView
|
2021-09-05 17:10:14 +00:00
|
|
|
from django.urls import path
|
2021-09-21 09:25:22 +00:00
|
|
|
from home.views import (
|
|
|
|
AboutView,
|
|
|
|
ChannelIdView,
|
|
|
|
ChannelView,
|
|
|
|
DownloadView,
|
|
|
|
HomeView,
|
2021-10-18 10:14:59 +00:00
|
|
|
LoginView,
|
2021-09-21 09:25:22 +00:00
|
|
|
SettingsView,
|
|
|
|
VideoView,
|
2021-10-21 12:33:27 +00:00
|
|
|
process,
|
|
|
|
progress,
|
2021-09-21 09:25:22 +00:00
|
|
|
)
|
2021-09-05 17:10:14 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2021-10-21 12:33:27 +00:00
|
|
|
path("", login_required(HomeView.as_view()), name="home"),
|
2021-10-18 10:14:59 +00:00
|
|
|
path("login/", LoginView.as_view(), name="login"),
|
2021-10-22 04:45:06 +00:00
|
|
|
path(
|
|
|
|
"logout/",
|
|
|
|
LogoutView.as_view(),
|
|
|
|
{"next_page": settings.LOGOUT_REDIRECT_URL},
|
|
|
|
name="logout",
|
|
|
|
),
|
2021-09-21 09:25:22 +00:00
|
|
|
path("about/", AboutView.as_view(), name="about"),
|
2021-10-21 12:33:27 +00:00
|
|
|
path(
|
|
|
|
"downloads/", login_required(DownloadView.as_view()), name="downloads"
|
|
|
|
),
|
|
|
|
path("settings/", login_required(SettingsView.as_view()), name="settings"),
|
|
|
|
path("process/", login_required(process), name="process"),
|
|
|
|
path("downloads/progress/", login_required(progress), name="progress"),
|
|
|
|
path("channel/", login_required(ChannelView.as_view()), name="channel"),
|
2021-09-18 13:02:54 +00:00
|
|
|
path(
|
2021-09-21 09:25:22 +00:00
|
|
|
"channel/<slug:channel_id_detail>/",
|
2021-10-21 12:33:27 +00:00
|
|
|
login_required(ChannelIdView.as_view()),
|
2021-09-21 09:25:22 +00:00
|
|
|
name="channel_id",
|
2021-09-18 13:02:54 +00:00
|
|
|
),
|
2021-10-21 12:33:27 +00:00
|
|
|
path(
|
|
|
|
"video/<slug:video_id>/",
|
|
|
|
login_required(VideoView.as_view()),
|
|
|
|
name="video",
|
|
|
|
),
|
2021-09-05 17:10:14 +00:00
|
|
|
]
|