Register buttons.

This commit is contained in:
nikolark committed 2012-01-05 22:28:39 +01:00
1 parent 12fafabcdd
commit 96bacb586d
2 files changed
+20 -2

No files matched your search

+3 -1
View File
@@ -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))
+17 -1
View File
@@ -4,5 +4,21 @@
{%endblock%}
{%block content%}
<section id="register">
<div id="user">
Selg til:
{% for user in users %}
  <button id="{{ user }}">{{ user }}</button>
{% endfor %}
</div>
<div id="products">
Vi selger:<br />
{% for product in products %}
  <button id="{{ product.id }}">+ {{ product.name }}</button>
  <button id="{{ product.id }}">- {{ product.name }}</button>
{% endfor %}
</div>
<div id="total">Totalt: <span class="total_text"></span></div>
  <button id="submit">Kjøp</button>
</section>
{%endblock%}