From 96bacb586dbbc2168c047d45e52f63c0177b8f6a Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Thu, 5 Jan 2012 22:28:39 +0100 Subject: [PATCH] Register buttons. --- main/views.py | 4 +++- templates/home.html | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/main/views.py b/main/views.py index 9886c00..14a7c40 100755 --- a/main/views.py +++ b/main/views.py @@ -6,4 +6,6 @@ from django.template import RequestContext from models import * def home(request): - return render_to_response('home.html', locals()) + products = Product.objects.all() + users = User.objects.all() + return render_to_response('home.html', locals(), context_instance=RequestContext(request)) diff --git a/templates/home.html b/templates/home.html index 3b74bec..9e6093f 100644 --- a/templates/home.html +++ b/templates/home.html @@ -4,5 +4,21 @@ {%endblock%} {%block content%} - +
+
+Selg til: +{% for user in users %} +  +{% endfor %} +
+
+Vi selger:
+{% for product in products %} +  +  +{% endfor %} +
+
Totalt:
+  +
{%endblock%}