Skip to content

Instantly share code, notes, and snippets.

@jbbarth
Last active May 28, 2018 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbbarth/bd159407f3a37bba85670bd1b57e727d to your computer and use it in GitHub Desktop.
Save jbbarth/bd159407f3a37bba85670bd1b57e727d to your computer and use it in GitHub Desktop.
{% if user.name == "Alice" %}
<input type=hidden name=is_captain value=false>
<input type=checkbox name=is_captain id=id_is_captain {% if object.is_captain %}checked{% endif %}>
{% else %}
{{ object.is_captain|yesno:"Yes,No" }} <i>(must be admin to edit)</i>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment