Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Clean up a little

Tom Bowyer7c46f180eaef
diff --git a/wger/exercises/templates/history/list3.html b/wger/exercises/templates/history/list3.html
index 89125d163..463b27197 100644
--- a/wger/exercises/templates/history/list3.html
+++ b/wger/exercises/templates/history/list3.html
@@ -102,7 +102,6 @@
{% translate "Revert changes" %}
</a>
</td>
- {% endif %}
</tr>
{% endfor %}
</tbody>
diff --git a/wger/exercises/views/exercises.py b/wger/exercises/views/exercises.py
index 4131c1e22..0b7b07fd5 100644
--- a/wger/exercises/views/exercises.py
+++ b/wger/exercises/views/exercises.py
@@ -33,6 +33,10 @@ from django.forms import (
Select,
Textarea,
)
+from django.http import (FileResponse,
+ Http404,
+ HttpResponse, HttpResponseForbidden, HttpResponseNotFound, HttpResponseRedirect,
+ JsonResponse)
from django.shortcuts import (
get_object_or_404,
render,
@@ -47,6 +51,9 @@ from django.views.generic import (
ListView,
)
+# Third Party
+from actstream import action as actstream_action
+
# wger
from wger.exercises.models import (
Equipment,
@@ -55,6 +62,7 @@ from wger.exercises.models import (
ExerciseCategory,
Muscle,
)
+from wger.exercises.views.helper import StreamVerbs
from wger.manager.models import WorkoutLog
from wger.utils.constants import MIN_EDIT_DISTANCE_THRESHOLD
from wger.utils.generic_views import WgerDeleteMixin
diff --git a/wger/exercises/views/helper.py b/wger/exercises/views/helper.py
index 195166110..84eae9222 100644
--- a/wger/exercises/views/helper.py
+++ b/wger/exercises/views/helper.py
@@ -18,3 +18,4 @@ import enum
class StreamVerbs(enum.Enum):
CREATED = 'created'
UPDATED = 'updated'
+ DELETED = 'deleted'
diff --git a/wger/exercises/views/history.py b/wger/exercises/views/history.py
index 708ce4712..af7152b7f 100644
--- a/wger/exercises/views/history.py
+++ b/wger/exercises/views/history.py
@@ -103,10 +103,7 @@ def control(request):
'history': {'record': hist, 'delta': hist.diff_against(hist.prev_record)},
'stream': entry
})
- elif entry.verb == "deleted":
- print("TODO")
- print(out)
return render(request, 'history/list3.html', {
'history': out,
})