supercontest.views.picks

The blueprint for the picks views.

Module Attributes

picks_blueprint

The blueprint for the picks views.

picks_values

Which URL path params are required for this view.

Functions

picks

The route to show ALL users' picks for a given week.

picks_results

The route to fetch the calculated week results for the allpicks view.

picks_url_defaults

Wrapper for common defaults call.

picks_url_value_preprocessor

Wrapper for common preprocessors call.

supercontest.views.picks.picks() str

The route to show ALL users’ picks for a given week. Fails fast if picks aren’t open.

Returns:

The rendered template for the view.

supercontest.views.picks.picks_blueprint = <Blueprint 'picks'>

The blueprint for the picks views.

supercontest.views.picks.picks_results() Response

The route to fetch the calculated week results for the allpicks view. Called async to just return the data (rather than template) in order to tick scores/results.

Returns:

The list of results (rank, grade, picks, etc).

supercontest.views.picks.picks_url_defaults(endpoint: str, values: dict[str, Any])

Wrapper for common defaults call. The values dict is mutated.

Parameters:
  • endpoint – The flask endpoint.

  • values – The flask values.

supercontest.views.picks.picks_url_value_preprocessor(endpoint: str | None, values: dict[str, Any] | None)

Wrapper for common preprocessors call. Values are extracted then added to g.

Parameters:
  • endpoint – The flask endpoint.

  • values – The flask values.

supercontest.views.picks.picks_values = {'league': True, 'week': True}

Which URL path params are required for this view.