User guide

Some installation:

git clone https://github.com/jluttine/django-sportsteam.git
cd django-sportsteam
python manage.py syncdb
mkdir sportsteam/static
python manage.py collectstatic

The database is pre-populated from initial_data.json. Run the development server:

./runserver.sh

Views for showing different statistics of the team.

teamstats.views.get_match_enrollments(match, seasonplayer_class=<class 'teamstats.models.SeasonPlayer'>, enrolledplayer_class=<class 'teamstats.models.EnrolledPlayer'>)

Returns the enrollment statuses of the players.

teamstats.views.index(request, league_class=<class 'teamstats.models.League'>, template_name='teamstats/index.html')

View for the main page.

teamstats.views.show_all_players(request, player_class=<class 'teamstats.models.Player'>, league_class=<class 'teamstats.models.League'>, matchplayer_class=<class 'teamstats.models.MatchPlayer'>, template_name='teamstats/show_all_players.html')

View for showing statistics for all the players.

teamstats.views.show_match(request, match_id, match_class=<class 'teamstats.models.Match'>, league_class=<class 'teamstats.models.League'>, video_class=<class 'teamstats.models.Video'>, seekpoint_class=<class 'teamstats.models.SeekPoint'>, enrolledplayer_class=<class 'teamstats.models.EnrolledPlayer'>, matchplayer_class=<class 'teamstats.models.MatchPlayer'>, seasonplayer_class=<class 'teamstats.models.SeasonPlayer'>, result_template_name='teamstats/show_match_result.html', registration_template_name='teamstats/show_match_registration.html')

View for showing information about a match. If the match has not yet been played, shows registrations of the players. If the match has been played already, shows statistics of the players.

teamstats.views.show_player(request, player_id, player_class=<class 'teamstats.models.Player'>, match_class=<class 'teamstats.models.Match'>, matchplayer_class=<class 'teamstats.models.MatchPlayer'>, enrolledplayer_class=<class 'teamstats.models.EnrolledPlayer'>, season_class=<class 'teamstats.models.Season'>, seasonplayer_class=<class 'teamstats.models.SeasonPlayer'>, league_class=<class 'teamstats.models.League'>, template_name='teamstats/show_player.html')

View for showing information about a player. Shows all the statistics for all the seasons the player has attended and lists all games the player has played in or can register in.

teamstats.views.show_season(request, season_id, season_class=<class 'teamstats.models.Season'>, league_class=<class 'teamstats.models.League'>, seasonplayer_class=<class 'teamstats.models.SeasonPlayer'>, enrolledplayer_class=<class 'teamstats.models.EnrolledPlayer'>, match_class=<class 'teamstats.models.Match'>, template_name='teamstats/show_season.html')

View for showing information about a season: the players with statistics and all the matches.

Project Versions

Previous topic

Welcome to djangosite-sportsteam’s documentation!

This Page