You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
padelclub_backend/tournaments/urls.py

74 lines
4.9 KiB

from django.contrib.auth import views as auth_views
from django.urls import include, path
from .forms import EmailOrUsernameAuthenticationForm, CustomPasswordChangeForm
from . import views
urlpatterns = [
path('reset/<uidb64>/<token>/', views.CustomPasswordResetConfirmView.as_view(), name='password_reset_confirm'),
path("", views.index, name="index"),
path("tournaments/", views.tournaments, name="tournaments"),
path("clubs/", views.clubs, name="clubs"),
path("clubs/<str:club_id>/", views.club, name="club"),
path("c/<str:broadcast_code>", views.club_broadcast, name="club-broadcast"),
path("c/<str:broadcast_code>/go", views.club_broadcast_auto, name="club-broadcast-auto"),
path("tournament/<str:tournament_id>/",
include([
path('', views.tournament, name='tournament'),
path('teams/', views.tournament_teams, name='tournament-teams'),
path('info/', views.tournament_info, name='tournament-info'),
path('bracket/', views.tournament_bracket, name='tournament-bracket'),
path('prog/', views.tournament_prog, name='tournament-prog'),
path('summons/', views.tournament_summons, name='tournament-summons'),
path('broadcast/summons/', views.tournament_broadcasted_summons, name='broadcasted-summons'),
path('summons/json/', views.tournament_summons_json, name='tournament-summons-json'),
path('broadcast/matches/', views.tournament_matches, name='broadcasted-matches'),
path('broadcast/', views.tournament_broadcast_home, name='broadcast'),
path('broadcast/auto/', views.automatic_broadcast, name='automatic-broadcast'),
path('matches/json/', views.tournament_matches_json, name='tournament-matches-json'),
path('prog/json/', views.tournament_prog_json, name='tournament-prog-json'),
path('broadcast/json/', views.broadcast_json, name='broadcast-json'),
path('broadcast/group-stages/', views.tournament_broadcasted_group_stages, name='broadcasted-group-stages'),
path('broadcast/prog/', views.tournament_broadcasted_prog, name='broadcasted-prog'),
path('group-stages/', views.tournament_group_stages, name='group-stages'),
path('group-stages/json/', views.tournament_live_group_stage_json, name='group-stages-json'),
path('rankings/', views.tournament_rankings, name='tournament-rankings'),
path('rankings/json/', views.tournament_rankings_json, name='tournament-rankings-json'),
path('broadcast/rankings/', views.tournament_broadcast_rankings, name='broadcasted-rankings'),
path('team/<str:team_id>/', views.team_details, name='team-details'),
])
),
path("event/<str:event_id>/broadcast/auto/", views.automatic_broadcast_event, name='automatic-broadcast-event'),
path('players/', views.players, name='players'),
path('activate/<uidb64>/<token>/', views.activate, name='activate'),
path('download/', views.download, name='download'),
path('apns/', views.test_apns, name='test-apns'),
path('terms-of-use/', views.terms_of_use, name='terms-of-use'),
path('utils/xls-to-csv/', views.xls_to_csv, name='xls-to-csv'),
path('mail-test/', views.simple_form_view, name='mail-test'),
path('login/', auth_views.LoginView.as_view(
template_name='registration/login.html',
authentication_form=EmailOrUsernameAuthenticationForm
), name='login'),
path('password_change/',
auth_views.PasswordChangeView.as_view(
success_url='/profile/', # Redirect back to profile after success
form_class=CustomPasswordChangeForm
),
name='password_change'
),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('signup/', views.signup, name='signup'), # URL pattern for signup
# path('profile/', views.profile, name='profile'), # URL pattern for signup
path('my-tournaments/', views.my_tournaments, name='my-tournaments'), # URL pattern for signup
path('tournaments/<str:tournament_id>/register/', views.register_tournament, name='register_tournament'),
path('tournaments/<str:tournament_id>/unregister/', views.unregister_tournament, name='unregister_tournament'),
path('password_reset/', auth_views.PasswordResetView.as_view(), name='password_reset'),
path('password_reset_done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
path('profile/', views.ProfileUpdateView.as_view(), name='profile'),
path('admin/tournament-import/', views.tournament_import_view, name='tournament_import'),
path('admin/tournament-import-tr/', views.tournament_import_team_reg, name='tournament_import'),
path('admin/users-export/', views.UserListExportView.as_view(), name='users_export'),
]