snorklerjoe/CubeServer

View on GitHub
src/CubeServer-app/cubeserver_app/blueprints/client_setup/templates/client_config.py.jinja2

Summary

Maintainability
Test Coverage
"""Python/Circuitpython/Micropython Client Configuration File
Autogenerated {{timestamp}}

This contains constant values necessary for making a secure and
authorized connection for posting data to the server.
"""

{% if team_name is none %}
# Don't forget to put your real team name here!
{% endif %}
TEAM_NAME = "{{team_name if team_name else 'The Yodelers'}}"
"""The (case-sensitive) full name of this team,
exactly as it displays on the leaderboard,
inside quotes.
""" 

{% if team_secret is none %}
# Don't forget to put your real team secret here!
{% endif %}
TEAM_SECRET = "{{team_secret if team_secret else '123abc'}}"
"""The (digits and lowercase letters) secret code
given at the time of registration, inside quotes.
This is necessary to authorize posts to the server
to prevent teams from impersonating one another.
"""

# Connection configuration:
CONF_AP_SSID = "{{ssid}}"
CONF_API_HOST = "{{api_host}}"
API_PORT = {{port}}

{% if server_cert %}
SERVER_CERT = """{{server_cert}}"""
{% else %}
SERVER_CERT = None
{% endif %}