2022-02-15 23:01:37 +00:00
|
|
|
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 = [
|
2022-02-15 23:01:37 +00:00
|
|
|
path('', RedirectView.as_view(pattern_name='overview')),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Dashboard
|
2022-02-15 23:01:37 +00:00
|
|
|
path('overview/', login_required(mcm.Overview.as_view()), name="overview"),
|
|
|
|
path('ban/', login_required(mcm.Ban.as_view()), name="ban"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Alerts
|
2022-02-15 23:01:37 +00:00
|
|
|
path('alert/', login_required(mcm.Alert.as_view()), name="alert"),
|
|
|
|
path('alert/<int:alert_id>/', login_required(mcm.AlertInfo.as_view()), name="alert_info"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Applications
|
2022-02-15 23:01:37 +00:00
|
|
|
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"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Players
|
2022-02-15 23:01:37 +00:00
|
|
|
path('player/', login_required(mcm.Player.as_view()), name="player"),
|
|
|
|
path('player/<int:player_id>/', login_required(mcm.PlayerInfo.as_view()), name="player_info"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Tickets
|
2022-02-15 23:01:37 +00:00
|
|
|
path('ticket/', login_required(mcm.Ticket.as_view()), name="ticket"),
|
|
|
|
path('ticket/<int:ticket_id>/', login_required(mcm.TicketInfo.as_view()), name="ticket_info"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
2021-05-06 17:50:18 +00:00
|
|
|
# Notes
|
2022-02-15 23:01:37 +00:00
|
|
|
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"),
|
2021-05-06 17:50:18 +00:00
|
|
|
|
|
|
|
# Attachments
|
2022-02-15 23:01:37 +00:00
|
|
|
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'),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# IP
|
2022-02-15 23:01:37 +00:00
|
|
|
path('ip/<int:ip_id>/', login_required(mcm.IP.as_view()), name="ip"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Report
|
2022-02-15 23:01:37 +00:00
|
|
|
path('report/', login_required(mcm.Report.as_view()), name="report"),
|
2020-04-19 20:26:51 +00:00
|
|
|
|
|
|
|
# Chat
|
2022-02-15 23:01:37 +00:00
|
|
|
path('chat/', permission_required('minecraft_manager.chat')(mcm.Chat.as_view()), name="chat"),
|
2018-09-20 02:56:17 +00:00
|
|
|
]
|