Commits

Anonymous committed 7025814

add csrf token to forms

Comments (0)

Files changed (5)

fitlog/templates/fitlog/add_bodyweight_log.html

 {% block body %}
 
 <h1>Add Body Weight Log</h1>
-<form method="post" action=".">
+<form method="post" action=".">{% csrf_token %}
 <table>
     {{form}}
 <tr><td colspan='2'><input type="submit" value="Save" /></td></tr>

fitlog/templates/fitlog/add_cardio.html

 {% block body %}
 
 <h1>Add Cardio Log</h1>
-<form method="post" action="{% url 'add_cardio' fitlog.id %}">
+<form method="post" action="{% url 'add_cardio' fitlog.id %}">{% csrf_token %}
 <table>
     {{form}}
 <tr><td colspan='2'><input type="submit" value="Save" /></td></tr>

fitlog/templates/fitlog/add_log.html

 {% block body %}
 
 <h1>Add Fitness Log</h1>
-<form method="post" action=".">
+<form method="post" action=".">{% csrf_token %}
 <table>
     {{form}}
 <tr><td colspan='2'><input type="submit" value="Save" /></td></tr>

fitlog/templates/fitlog/add_weight_training.html

 {% block body %}
 
 <h1>Add Weight Training Log</h1>
-<form method="post" action="{% url 'add_weight_training_log' fitlog.id %}">
+<form method="post" action="{% url 'add_weight_training_log' fitlog.id %}">{% csrf_token %}
 <table>
     {{form}}
 

fitlog/templates/fitlog/edit_fitlog.html

 {% block body %}
 
 <h1>Add Fitness Log</h1>
-<form method="post" action="{% url 'edit_fitlog' fitlog.id %}">
+<form method="post" action="{% url 'edit_fitlog' fitlog.id %}">{% csrf_token %}
 <table>
     {{form}}
 <tr><td colspan='2'><input type="submit" value="Save" /></td></tr>