Skip to content

Commit

Permalink
added order_required decorator to more views
Browse files Browse the repository at this point in the history
  • Loading branch information
Ales Kocjancic committed Sep 14, 2012
1 parent 33fc0a7 commit 414cd56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shop/payment/backends/pay_on_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.conf.urls.defaults import patterns, url
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from shop.util.decorators import on_method, shop_login_required
from shop.util.decorators import on_method, shop_login_required, order_required


class PayOnDeliveryBackend(object):
Expand All @@ -17,6 +17,7 @@ def __init__(self, shop):
# it in a tidy way (look ma', no imports!)

@on_method(shop_login_required)
@on_method(order_required)
def simple_view(self, request):
"""
This simple view does nothing but record the "payment" as being
Expand Down
1 change: 1 addition & 0 deletions shop/shipping/backends/flat_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def view_process_order(self, request):
# That's an HttpResponseRedirect

@on_method(shop_login_required)
@on_method(order_required)
def view_display_fees(self, request):
"""
A simple, normal view that displays a template showing how much the
Expand Down

0 comments on commit 414cd56

Please sign in to comment.