minecraft_manager/urls.py

48 lines
2.0 KiB
Python
Raw Permalink Normal View History

from django.urls import path
2018-09-20 02:56:17 +00:00
from django.views.generic import RedirectView
2019-08-27 20:44:20 +00:00
from django.contrib.auth.decorators import login_required, permission_required
2018-09-20 02:56:17 +00:00
import minecraft_manager.views as mcm
urlpatterns = [
path('', RedirectView.as_view(pattern_name='overview')),
# Dashboard
path('overview/', login_required(mcm.Overview.as_view()), name="overview"),
path('ban/', login_required(mcm.Ban.as_view()), name="ban"),
# Alerts
path('alert/', login_required(mcm.Alert.as_view()), name="alert"),
path('alert/<int:alert_id>/', login_required(mcm.AlertInfo.as_view()), name="alert_info"),
# Applications
path('application/', login_required(mcm.Application.as_view()), name="application"),
path('reference/', login_required(mcm.Reference.as_view()), name="reference"),
path('application/<int:application_id>/', login_required(mcm.ApplicationInfo.as_view()), name="application_info"),
# Players
path('player/', login_required(mcm.Player.as_view()), name="player"),
path('player/<int:player_id>/', login_required(mcm.PlayerInfo.as_view()), name="player_info"),
# Tickets
path('ticket/', login_required(mcm.Ticket.as_view()), name="ticket"),
path('ticket/<int:ticket_id>/', login_required(mcm.TicketInfo.as_view()), name="ticket_info"),
attachments (#2) Add migration for longer timezone Signed-off-by: Etzelia <etzelia@hotmail.com> Merge branch 'master' of birbmc.com:BirbMC/minecraft_manager into birb # Conflicts: # external/views.py Fix col Signed-off-by: Etzelia <etzelia@hotmail.com> Add attachments, clean up UI, etc. Signed-off-by: Etzelia <etzelia@hotmail.com> Fix Discord embeds (#59) Fix Discord embeds Reviewed-on: https://git.etztech.xyz/MMS/MinecraftManagerDjango/pulls/59 Reviewed-by: ZeroHD <joey@ahines.net> Add requirements (not txt) (#57) Add requirements (not txt) Signed-off-by: Etzelia <etzelia@hotmail.com> Reviewed-on: https://git.etztech.xyz/MMS/MinecraftManagerDjango/pulls/57 Reviewed-by: ZeroHD <joey@ahines.net> Interim Patch (#54) Birb Patches (#1) Birb Patches Signed-off-by: Etzelia <etzelia@hotmail.com> Co-authored-by: Etzelia <etzelia@hotmail.com> Reviewed-by: ZeroHD <joey@ahines.net> Add 'LICENSE' (#53) Add 'LICENSE' Reviewed-by: ZeroHD <joey@ahines.net> Fix captcha and generify community invite (#52) Add validation for final question and some minor CSS Signed-off-by: Etzelia <etzelia@hotmail.com> Change some docs Signed-off-by: Etzelia <etzelia@hotmail.com> Fix captcha and generify community invite Signed-off-by: Etzelia <etzelia@hotmail.com> Co-authored-by: Etzelia <etzelia@hotmail.com> Reviewed-by: ZeroHD <joey@ahines.net> Co-authored-by: Etz Elia <etzelia@hotmail.com> Reviewed-on: https://git.birbmc.com/BirbMC/minecraft_manager/pulls/2 Co-Authored-By: Etzelia <etzelia@hotmail.com> Co-Committed-By: Etzelia <etzelia@hotmail.com>
2021-05-06 17:50:18 +00:00
# Notes
path('note/', login_required(mcm.Note.as_view()), name="note"),
path('note/<int:note_id>/', login_required(mcm.NoteInfo.as_view()), name='note_info'),
path('note/add', login_required(mcm.NoteAdd.as_view()), name="note_add"),
attachments (#2) Add migration for longer timezone Signed-off-by: Etzelia <etzelia@hotmail.com> Merge branch 'master' of birbmc.com:BirbMC/minecraft_manager into birb # Conflicts: # external/views.py Fix col Signed-off-by: Etzelia <etzelia@hotmail.com> Add attachments, clean up UI, etc. Signed-off-by: Etzelia <etzelia@hotmail.com> Fix Discord embeds (#59) Fix Discord embeds Reviewed-on: https://git.etztech.xyz/MMS/MinecraftManagerDjango/pulls/59 Reviewed-by: ZeroHD <joey@ahines.net> Add requirements (not txt) (#57) Add requirements (not txt) Signed-off-by: Etzelia <etzelia@hotmail.com> Reviewed-on: https://git.etztech.xyz/MMS/MinecraftManagerDjango/pulls/57 Reviewed-by: ZeroHD <joey@ahines.net> Interim Patch (#54) Birb Patches (#1) Birb Patches Signed-off-by: Etzelia <etzelia@hotmail.com> Co-authored-by: Etzelia <etzelia@hotmail.com> Reviewed-by: ZeroHD <joey@ahines.net> Add 'LICENSE' (#53) Add 'LICENSE' Reviewed-by: ZeroHD <joey@ahines.net> Fix captcha and generify community invite (#52) Add validation for final question and some minor CSS Signed-off-by: Etzelia <etzelia@hotmail.com> Change some docs Signed-off-by: Etzelia <etzelia@hotmail.com> Fix captcha and generify community invite Signed-off-by: Etzelia <etzelia@hotmail.com> Co-authored-by: Etzelia <etzelia@hotmail.com> Reviewed-by: ZeroHD <joey@ahines.net> Co-authored-by: Etz Elia <etzelia@hotmail.com> Reviewed-on: https://git.birbmc.com/BirbMC/minecraft_manager/pulls/2 Co-Authored-By: Etzelia <etzelia@hotmail.com> Co-Committed-By: Etzelia <etzelia@hotmail.com>
2021-05-06 17:50:18 +00:00
# Attachments
path('attachment/<int:attachment_id>/', login_required(mcm.Attachment.as_view()), name="attachment"),
path('attachment/<str:ref_model>/<int:ref_id>/', login_required(mcm.AddAttachment.as_view()), name='attachment_add'),
# IP
path('ip/<int:ip_id>/', login_required(mcm.IP.as_view()), name="ip"),
# Report
path('report/', login_required(mcm.Report.as_view()), name="report"),
# Chat
path('chat/', permission_required('minecraft_manager.chat')(mcm.Chat.as_view()), name="chat"),
2018-09-20 02:56:17 +00:00
]