Commit 50d8bdce authored by freetux's avatar freetux

add weight url

parent 61939bba
......@@ -10,5 +10,5 @@ urlpatterns = [
# The home page
url(r'^$', views.index, name='index'),
url(r'^home/$', views.home, name='dashboard'),
url(r'^weight/$', views.weight, name='weight'),
\ No newline at end of file
......@@ -5,7 +5,7 @@ from .forms import UserCreationForm
from django.contrib.auth import login
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from body.models import Weight
......@@ -36,5 +36,9 @@ def site_html(request):
template = loader.get_template('sites/' + load_template)
return HttpResponse(template.render(context, request))
def weight(request):
weights = Weight.objects.filter(user = request.user)
template = loader.get_template('sites/weight.html')
return HttpResponse(template.render(weights, request))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment