2018-09-20 02:56:17 +00:00
|
|
|
from django.conf.urls import url
|
|
|
|
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 = [
|
|
|
|
url(r'^$', RedirectView.as_view(pattern_name='overview')),
|
|
|
|
#Dashboard
|
|
|
|
url(r'^dashboard/overview/$', login_required(mcm.Overview.as_view()), name="overview"),
|
|
|
|
url(r'^dashboard/ban/$', login_required(mcm.Ban.as_view()), name="ban"),
|
|
|
|
#Alerts
|
|
|
|
url(r'^dashboard/alert/$', login_required(mcm.Alert.as_view()), name="alert"),
|
|
|
|
url(r'^dashboard/alert/(?P<alert_id>[0-9]{1,5})/$', login_required(mcm.AlertInfo.as_view())),
|
|
|
|
#Applications
|
|
|
|
url(r'^dashboard/application/$', login_required(mcm.Application.as_view()), name="application"),
|
|
|
|
url(r'^dashboard/reference/$', login_required(mcm.Reference.as_view()), name="reference"),
|
|
|
|
url(r'^dashboard/application/(?P<application_id>[0-9]{1,5})/$', login_required(mcm.ApplicationInfo.as_view())),
|
|
|
|
#Players
|
|
|
|
url(r'^dashboard/player/$', login_required(mcm.Player.as_view()), name="player"),
|
|
|
|
url(r'^dashboard/player/(?P<player_id>[0-9]{1,5})/$', login_required(mcm.PlayerInfo.as_view())),
|
|
|
|
#Tickets
|
|
|
|
url(r'^dashboard/ticket/$', login_required(mcm.Ticket.as_view()), name="ticket"),
|
|
|
|
url(r'^dashboard/ticket/(?P<ticket_id>[0-9]{1,5})/$', login_required(mcm.TicketInfo.as_view())),
|
|
|
|
#Warnings
|
2018-12-13 21:18:29 +00:00
|
|
|
url(r'^dashboard/note/$', login_required(mcm.Note.as_view()), name="note"),
|
|
|
|
url(r'^dashboard/note/(?P<note_id>[0-9]{1,5})/$', login_required(mcm.NoteInfo.as_view())),
|
|
|
|
url(r'^dashboard/note/add$', login_required(mcm.NoteAdd.as_view()), name="note_add"),
|
2018-09-22 04:35:51 +00:00
|
|
|
#IP
|
|
|
|
url(r'^dashboard/ip/(?P<ip_id>[0-9]{1,5})/$', login_required(mcm.IP.as_view()), name="ip"),
|
2018-09-20 02:56:17 +00:00
|
|
|
#Report
|
|
|
|
url(r'^report/$', login_required(mcm.Report.as_view()), name="report"),
|
|
|
|
#Chat
|
2019-08-27 20:44:20 +00:00
|
|
|
url(r'^dashboard/chat/$', permission_required('minecraft_manager.chat')(mcm.Chat.as_view()), name="chat"),
|
2018-09-20 02:56:17 +00:00
|
|
|
#Bots
|
2019-08-27 20:44:20 +00:00
|
|
|
url(r'^dashboard/bots/$', permission_required('minecraft_manager.bots')(mcm.Bots.as_view()), name="bots"),
|
2018-09-20 02:56:17 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Possible future feature
|
|
|
|
# from django.conf import settings
|
|
|
|
#
|
|
|
|
# LOGIN_REQUIRED = settings.LOGIN_REQUIRED if hasattr(settings, 'LOGIN_REQUIRED') else False
|
|
|
|
#
|
|
|
|
# urlpatterns = [
|
|
|
|
# #Dashboard
|
|
|
|
# url(r'^dashboard/overview/$', login_required(mcm.Overview.as_view()) if LOGIN_REQUIRED else mcm.Overview.as_view(), name="overview"),
|
|
|
|
# url(r'^dashboard/coreprotect/$', login_required(mcm.CoreProtect.as_view()) if LOGIN_REQUIRED else mcm.CoreProtect.as_view(), name="coreprotect"),
|
|
|
|
# url(r'^dashboard/activity/$', login_required(mcm.Activity.as_view()) if LOGIN_REQUIRED else mcm.Activity.as_view(), name="activity"),
|
|
|
|
# url(r'^dashboard/ban/$', login_required(mcm.Ban.as_view()) if LOGIN_REQUIRED else mcm.Ban.as_view(), name="ban"),
|
|
|
|
# #Alerts
|
|
|
|
# url(r'^dashboard/alert/$', login_required(mcm.Alert.as_view()) if LOGIN_REQUIRED else mcm.Alert.as_view(), name="alert"),
|
|
|
|
# url(r'^dashboard/alert/(?P<alert_id>[0-9]{1,5})/$', login_required(mcm.AlertInfo.as_view()) if LOGIN_REQUIRED else mcm.AlertInfo.as_view()),
|
|
|
|
# #Applications
|
|
|
|
# url(r'^dashboard/application/$', login_required(mcm.Application.as_view()) if LOGIN_REQUIRED else mcm.Application.as_view(), name="application"),
|
|
|
|
# url(r'^dashboard/application/(?P<application_id>[0-9]{1,5})/$', login_required(mcm.ApplicationInfo.as_view()) if LOGIN_REQUIRED else mcm.ApplicationInfo.as_view()),
|
|
|
|
# #Players
|
|
|
|
# url(r'^dashboard/player/$', login_required(mcm.Player.as_view()) if LOGIN_REQUIRED else mcm.Player.as_view(), name="player"),
|
|
|
|
# url(r'^dashboard/player/(?P<player_id>[0-9]{1,5})/$', login_required(mcm.PlayerInfo.as_view()) if LOGIN_REQUIRED else mcm.PlayerInfo.as_view()),
|
|
|
|
# #Tickets
|
|
|
|
# url(r'^dashboard/ticket/$', login_required(mcm.Ticket.as_view()) if LOGIN_REQUIRED else mcm.Ticket.as_view(), name="ticket"),
|
|
|
|
# url(r'^dashboard/ticket/(?P<ticket_id>[0-9]{1,5})/$', login_required(mcm.TicketInfo.as_view()) if LOGIN_REQUIRED else mcm.TicketInfo.as_view()),
|
|
|
|
# #Warnings
|
|
|
|
# url(r'^dashboard/warning/$', login_required(mcm.Warning.as_view()) if LOGIN_REQUIRED else mcm.Warning.as_view(), name="warning"),
|
|
|
|
# url(r'^dashboard/warning/(?P<warning_id>[0-9]{1,5})/$', login_required(mcm.WarningInfo.as_view()) if LOGIN_REQUIRED else mcm.WarningInfo.as_view()),
|
|
|
|
# url(r'^dashboard/warning/add$', login_required(mcm.WarningAdd.as_view()) if LOGIN_REQUIRED else mcm.WarningAdd.as_view(), name="warning_add"),
|
|
|
|
# #Chat
|
|
|
|
# url(r'^dashboard/chat/$', login_required(mcm.Chat.as_view()) if LOGIN_REQUIRED else mcm.Chat.as_view(), name="chat"),
|
|
|
|
# #Bots
|
|
|
|
# url(r'^dashboard/bots/$', login_required(mcm.Bots.as_view()) if LOGIN_REQUIRED else mcm.Bots.as_view(), name="bots"),
|
|
|
|
# ]
|