Self hosted FLOSS fitness/workout, nutrition and weight tracker
Only logged-in users can access the weight application
Roland Geider660bbca60a1f
diff --git a/weight/views.py b/weight/views.pyindex 19ccc544b..16a8c1548 100644--- a/weight/views.py+++ b/weight/views.py@@ -20,6 +20,7 @@ from django.shortcuts import get_object_or_404from django.http import HttpResponseRedirectfrom django.forms import ModelFormfrom django.core.context_processors import csrf+from django.contrib.auth.decorators import permission_required, login_requiredfrom weight.models import WeightEntry@@ -30,6 +31,7 @@ class WeightForm(ModelForm):class Meta:model = WeightEntry+@login_requireddef add(request, id=None):"""Add a weight entry"""@@ -61,6 +63,7 @@ def add(request, id=None):return render_to_response('edit.html', template_data)+@login_requireddef overview(request):"""Shows an overview of weight data@@ -80,4 +83,4 @@ def overview(request):template_data['data_x'] = data_xtemplate_data['data_y'] = data_y- return render_to_response('weight_overview.html', template_data)\ No newline at end of file+ return render_to_response('weight_overview.html', template_data)