4.1. Management Commands

Mahahiki implements the following Django management commands to facilitate setup and management of challenges.

4.1.1. Development management

These management commands are used by developers for testing enhancements to the system and debugging.

4.1.1.1. clear_cache

Invocation: python manage.py clear_cache

Clear all content in the Makahiki cache.

4.1.1.2. clear_log

Invocation: python manage.py clear_log

Clear all content in the Makahiki log table.

4.1.1.3. clear_session

Invocation: python manage.py clear_session

Delete all persistent web sessions. Use this to clean up any invalid session references.

4.1.1.4. setup_test_data

4.1.2. Challenge configuration

These management commands are used to set up a challenge.

4.1.2.1. load_users

4.1.2.2. reset_users

4.1.2.3. verify_quests

Invocation: python manage.py verify_quests

Verifies that all of the existing quest lock and unlock condition strings are valid. Prints out the names of any invalid quest conditions.

4.1.2.4. verify_smartgrid

4.1.3. Challenge management

These management commands are used by administrators to facilitate the running of a challenge.

4.1.3.1. award_badge

4.1.3.2. update_energy_baseline

Invocation: python manage.py update_energy_baseline

update the daily baseline.

4.1.4. Automated management

These management commands are typically invoked automatically during a challenge in order to manage resource and game data.

4.1.4.1. update_energy_usage

Invocation: python manage.py update_energy_usage

For each team, queries WattDepot server to find out cumulative energy usage from midnight to now. Used for updating the status of the Energy Goal Game.

4.1.4.2. check_energy_goal

Invocation: python manage.py check_energy_goal

Checks whether or not each team made their energy goal, and awards points to team members if it’s at the end of the day.

4.1.4.3. check_water_goal

Invocation: python manage.py check_water_goal

Checks whether or not each team made their water goal, and awards points to team members if it’s at the end of the day.