from django.urls import path from django.views.generic import RedirectView from django.contrib.auth.decorators import login_required, permission_required 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//', 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//', login_required(mcm.ApplicationInfo.as_view()), name="application_info"), # Players path('player/', login_required(mcm.Player.as_view()), name="player"), path('player//', login_required(mcm.PlayerInfo.as_view()), name="player_info"), # Tickets path('ticket/', login_required(mcm.Ticket.as_view()), name="ticket"), path('ticket//', login_required(mcm.TicketInfo.as_view()), name="ticket_info"), # Notes path('note/', login_required(mcm.Note.as_view()), name="note"), path('note//', login_required(mcm.NoteInfo.as_view()), name='note_info'), path('note/add', login_required(mcm.NoteAdd.as_view()), name="note_add"), # Attachments path('attachment//', login_required(mcm.Attachment.as_view()), name="attachment"), path('attachment///', login_required(mcm.AddAttachment.as_view()), name='attachment_add'), # IP path('ip//', 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"), ]