Skip to content
MrFacundo edited this page Nov 14, 2024 · 3 revisions

(not including game views and user view, which is called on every page)

Home Page

  • InvitationsReceivedView - List of Invitations Received
  • SendInvitationsView - List of Users Available for Invitation
  • AcceptInvitationView - Accept a received friend invitation.
  • SendInvitationView - Send a friend invitation.
urlpatterns += [
    path('invitations-received/', InvitationsReceivedView.as_view(), name='invitations_received'),
    path('send-invitations/', SendInvitationsView.as_view(), name='send_invitations'),
    path('accept-invitation/<int:friend_id>/', AcceptInvitationView.as_view(), name='accept_invitation'),
    path('send-invitation/<int:friend_id>/', SendInvitationView.as_view(), name='send_invitation'),
]

Profile Page

  • FriendsView - List of a user's friends
urlpatterns += [
	path('friends', FriendsView.as_view(), name='friends'),
]

AI Page

  • UpdateGameStatsView - Updates the user's game statistics, including wins, losses, and total matches played.
  • CreateMatchHistoryEntryView - Records the details of each completed match, including players, scores, winner, and match date, in the match history
urlpatterns += [
    path('update-game-stats/', UpdateGameStatsView.as_view(), name='update_game_stats'),
    path('create-match-history/', CreateMatchHistoryEntryView.as_view(), name='create_match_history'),
]

1v1 Page

  • GameInvitationsReceivedView - Lists game invitations received from friends.
  • AvailableFriendsForGameInvitationView - Lists friends to whom the user can send invitations, excluding those who have sent pending invitations to the user. Each friend displays their current invitation status (e.g., pending).
  • AcceptGameInvitationView - Allows the user to accept a game invitation from a friend.
  • SendGameInvitationView - Allows the user to send a game invitation to a friend.
  • UpdateGameStatsView - Updates the user's game statistics, including wins, losses, and total matches played.
  • CreateMatchHistoryEntryView - Records the details of each completed match, including players, scores, winner, and match date, in the match history
urlpatterns += [
    path('game-invitations-received/', GameInvitationsReceivedView.as_view(), name='game_invitations_received'),
    path('available-friends-for-game/', AvailableFriendsForGameInvitationView.as_view(), name='available_friends_for_game'),
    path('accept-game-invitation/', AcceptGameInvitationView.as_view(), name='accept_game_invitation'),
    path('send-game-invitation/', SendGameInvitationView.as_view(), name='send_game_invitation'),
	path('update-game-stats/', UpdateGameStatsView.as_view(), name='update_game_stats'),
    path('create-match-history/', CreateMatchHistoryEntryView.as_view(), name='create_match_history'),
]

Tournament Page

  • OpenTournamentsListView - Lists all open tournaments with each tournament’s name and the current participant count.
  • CreateTournamentView - Allows users to create a new tournament by submitting a tournament name.
  • JoinTournamentView - Allows the user to join a tournament by clicking on a tournament item. Only one tournament can be joined at a time.
  • CancelTournamentParticipationView - Allows the user to cancel their participation in a tournament by clicking on the joined tournament again.
  • TournamentBracketView - Provides tournament bracket details, showing the list of participants, match results as they are updated, and the tournament status (match and tournament completion updates).
  • UpdateGameStatsView - Updates the user's game statistics, including wins, losses, and total matches played.
  • CreateMatchHistoryEntryView - Records the details of each completed match, including players, scores, winner, and match date, in the match history
urlpatterns += [
    path('open-tournaments/', OpenTournamentsListView.as_view(), name='open_tournaments'),
    path('create-tournament/', CreateTournamentView.as_view(), name='create_tournament'),
    path('join-tournament/', JoinTournamentView.as_view(), name='join_tournament'),
    path('cancel-tournament-participation/', CancelTournamentParticipationView.as_view(), name='cancel_tournament_participation'),
    path('tournament-bracket/', TournamentBracketView.as_view(), name='tournament_bracket'),
    path('update-game-stats/', UpdateGameStatsView.as_view(), name='update_game_stats'),
    path('create-match-history/', CreateMatchHistoryEntryView.as_view(), name='create_match_history'),
]
Clone this wiki locally