This commit is contained in:
Ross
2021-09-26 09:15:22 +01:00
parent b0584d3685
commit 9cefbda6c8
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -426,6 +426,9 @@ class CidUserAnswer(models.Model):
self.answer_compare = s self.answer_compare = s
def get_absolute_url(self):
return reverse('anatomy:user_answer_view', args=(self.pk))
# def get_compare_string(self): # def get_compare_string(self):
# # strip here should be unneccasry (providing clean is now working) # # strip here should be unneccasry (providing clean is now working)
# s = self.answer.lower().strip() # s = self.answer.lower().strip()
+1 -1
View File
@@ -5,7 +5,7 @@
<form method="post">{% csrf_token %} <form method="post">{% csrf_token %}
<p>Are you sure you want to delete the user answer "{{ object }}"?</p> <p>Are you sure you want to delete the user answer "{{ object }}"?</p>
<input type="submit" value="Confirm"> <input type="submit" value="Confirm">
<a href="{{ view.get_success_url }}" class="btn btn-default">Cancel</a> <a href="{{ object.get_absolute_url }}" class="btn btn-default">Cancel</a>
</form> </form>
{% endblock content %} {% endblock content %}