1. John Costa
  2. django-fitlog

Commits

John Costa  committed 7025814

add csrf token to forms

  • Participants
  • Parent commits 6a8e2c2
  • Branches django-1.5

Comments (0)

Files changed (5)

File fitlog/templates/fitlog/add_bodyweight_log.html

View file
  • Ignore whitespace
 {% 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>

File fitlog/templates/fitlog/add_cardio.html

View file
  • Ignore whitespace
 {% 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>

File fitlog/templates/fitlog/add_log.html

View file
  • Ignore whitespace
 {% 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>

File fitlog/templates/fitlog/add_weight_training.html

View file
  • Ignore whitespace
 {% 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}}
 

File fitlog/templates/fitlog/edit_fitlog.html

View file
  • Ignore whitespace
 {% 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>