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%}