{% if action == 'add' %} <h1>Add SSH Key</h1> {% else %} <h1>Edit SSH Key</h1> {% endif %} {% if error_message %} <p><strong>{{ error_message }}</strong></p> {% endif %} <form action="" method="post"> {% csrf_token %} <table> {{ form }} </table> <input type="submit" value="Save" /> </form>