4.2.1.3. Package apps.managers.challenge_mgr

The Challenge manager maintains state information about an entire Challenge, including what widgets are enabled, the round information, and so forth.

4.2.1.3.1. Module apps.managers.challenge_mgr.models

Defines the model containing game settings.

class apps.managers.challenge_mgr.models.AboutPage(*args, **kwargs)[source]

Defines the sponsor for this challenge.

Parameters:
  • id (AutoField) – Id
  • challenge_id (ForeignKey) – Challenge
  • about_page_text (TextField) – The text of the about page that explains the challenge. Uses Markdown formatting.
class apps.managers.challenge_mgr.models.ChallengeSetting(*args, **kwargs)[source]

Defines the global settings for the challenge.

Parameters:
  • id (AutoField) – Id
  • domain (CharField) – The domain name of this challenge.
  • logo (ImageField) – The logo of the challenge.
  • name (CharField) – The name of the challenge.
  • theme (CharField) – The default theme for this challenge.
  • team_label (CharField) – The display label for ‘teams’.
  • use_cas_auth (BooleanField) – Use CAS authentication ?
  • cas_server_url (CharField) – The URL for CAS authentication service. Example: https://login.its.hawaii.edu/cas/
  • cas_auth_text (TextField) – A button will appear if there is other auth method(s) selected. This is the text for the CAS auth button. Uses Markdown formatting.
  • use_ldap_auth (BooleanField) – Use LDAP authentication ?
  • ldap_server_url (CharField) – The URL for LDAP authentication service. Example: ldap://localhost:10389
  • ldap_search_base (CharField) – The search base for the ldap service. Example: ou=users,ou=system
  • ldap_auth_text (TextField) – A button will appear if there is other auth method(s) selected. This is the text for the LDAP auth button. Uses Markdown formatting.
  • use_internal_auth (BooleanField) – Use internal authentication ?
  • internal_auth_text (TextField) – A button will appear if there is other auth method(s) selected. This is the text for the internal auth button. Uses Markdown formatting.
  • wattdepot_server_url (CharField) – The URL for Wattdepot service. Example: http://localhost:8194/wattdepot
  • email_enabled (BooleanField) – Enable email ?
  • contact_email (CharField) – The contact email of the admin.
  • email_host (CharField) – The host name of the email server.
  • email_port (IntegerField) – The port of the email server
  • email_use_tls (BooleanField) – Use TLS in the email server ?
  • landing_slogan (TextField) – The slogan text in the landing page. Uses Markdown formatting.
  • landing_introduction (TextField) – The introduction in the landing page. Uses Markdown formatting.
  • landing_participant_text (TextField) – The text of the participant button in the landing page. Uses Markdown formatting.
  • landing_non_participant_text (TextField) – The text of the non participant button in the landing page. Uses Markdown formatting.
about_page_text()[source]

returns the about page text.

is_multi_auth()[source]

returns true if use_cas and either use ldap or internal.

round_info()[source]

returns the info for all rounds.

save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.GameInfo(*args, **kwargs)[source]

Defines the game info.

Parameters:
  • id (AutoField) – Id
  • name (CharField) – The name of the game.
  • enabled (BooleanField) – Enable ?
  • priority (IntegerField) – The priority (ordering) of the game in the admin interface.
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.GameSetting(*args, **kwargs)[source]

Defines the widgets in a game.

Parameters:
  • id (AutoField) – Id
  • game_id (ForeignKey) – Game
  • widget (CharField) – The name of the widget in the page.
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.PageInfo(*args, **kwargs)[source]

Defines the page info.

Parameters:
  • id (AutoField) – Id
  • name (CharField) – The name of the page. It is used to determine which navbar icon is used.
  • label (CharField) – The label of the page. It is used on the Home page and the navbar. Should be less than 10 characters long.
  • title (CharField) – The HTML title of the page.
  • introduction (TextField) – This text is shown on the Home page. It should not be more than 3 lines,each line should be less than 25 characters long. Uses Markdown formatting.
  • priority (IntegerField) – The priority (ordering) of the page.
  • url (CharField) – The URL of the page.
  • unlock_condition (CharField) – if the condition is True, the page will be unlocked. Uses Makahiki Predicates.
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.PageSetting(*args, **kwargs)[source]

Defines widgets in a page.

Parameters:
  • id (AutoField) – Id
  • page_id (ForeignKey) – Page
  • widget (CharField) – The name of the widget in the page.
  • location (CharField) – The location of the widget in the page.
  • priority (IntegerField) – The priority (ordering) of widget in the location of the page.
  • enabled (BooleanField) – Enable ?
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.RoundSetting(*args, **kwargs)[source]

Defines the round settings for this challenge.

Parameters:
  • id (AutoField) – Id
  • name (CharField) – The name of the round.
  • start (DateTimeField) – The start date of the round.
  • end (DateTimeField) – The end date of the round.
  • round_reset (BooleanField) – Reset the points for this round? if reset, the points from previous roundwill not be carried over to this round.
  • display_scoreboard (BooleanField) – Display the round in scoreboard?
save(*args, **kwargs)[source]

Custom save method.

class apps.managers.challenge_mgr.models.Sponsor(*args, **kwargs)[source]

Defines the sponsor for this challenge.

Parameters:
  • id (AutoField) – Id
  • challenge_id (ForeignKey) – Challenge
  • priority (IntegerField) – The priority of the sponsor
  • name (CharField) – The name of the sponsor.
  • url (CharField) – The url of the sponsor.
  • logo_url (CharField) – The url of the sponsor logo.
  • logo (ImageField) – The logo of the sponsor.
class apps.managers.challenge_mgr.models.UploadImage(*args, **kwargs)[source]

Defines the table for uploaded images.

Parameters:
  • id (AutoField) – Id
  • image (ImageField) – The uploaded image.

Table Of Contents

Previous topic

4.2.1.2. Package apps.managers.cache_mgr

Next topic

4.2.1.4. Package apps.managers.log_mgr

This Page