This commit is contained in:
seba 2010-12-02 13:44:10 +01:00
parent c05fe944c0
commit d8838dbefb
2 changed files with 6 additions and 0 deletions

View File

@ -6,4 +6,5 @@ urlpatterns = patterns('',
(r'^show/(\d+)/$', 'buyable.views.showItem'), (r'^show/(\d+)/$', 'buyable.views.showItem'),
(r'^buy/(\d+)/(|with/deposit|only/deposit)/?$', 'buyable.views.buyItem'), (r'^buy/(\d+)/(|with/deposit|only/deposit)/?$', 'buyable.views.buyItem'),
(r'^bought/(\d+)/?$', 'buyable.views.boughtItem'), (r'^bought/(\d+)/?$', 'buyable.views.boughtItem'),
(r'^history/?$', 'buyable.views.history'),
) )

View File

@ -61,3 +61,8 @@ def boughtItem(request, orderid):
item1 = None item1 = None
error = u"Diese Items gehören dir nicht" error = u"Diese Items gehören dir nicht"
return render_to_response("buyables/itemBought.html", {'order': item, 'error': error}, RequestContext(request)) return render_to_response("buyables/itemBought.html", {'order': item, 'error': error}, RequestContext(request))
@login_required
def history(request):
hist = Order.objects.filter(user=request.user.id).order_by("-dateTime")
return render_to_response("buyables/history.html", {'history': hist}, RequestContext(request))