Skip to content

Commit

Permalink
Removed unneccessary view for basket vouchers
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinthehole committed Dec 23, 2011
1 parent 26ce764 commit 0025cb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 2 additions & 3 deletions oscar/apps/basket/app.py
@@ -1,14 +1,14 @@
from django.conf.urls.defaults import patterns, url

from oscar.apps.basket.views import BasketView, SavedView, VoucherView, VoucherAddView, BasketAddView, VoucherRemoveView
from oscar.apps.basket.views import (BasketView, SavedView,
VoucherAddView, BasketAddView, VoucherRemoveView)
from oscar.core.application import Application


class BasketApplication(Application):
name = 'basket'
summary_view = BasketView
saved_view = SavedView
voucher_view = VoucherView
add_view = BasketAddView
add_voucher_view = VoucherAddView
remove_voucher_view = VoucherRemoveView
Expand All @@ -17,7 +17,6 @@ def get_urls(self):
urlpatterns = patterns('',
url(r'^$', self.summary_view.as_view(), name='summary'),
url(r'^add/$', self.add_view.as_view(), name='add'),
url(r'^vouchers/$', self.voucher_view.as_view(), name='vouchers'),
url(r'^vouchers/add/$', self.add_voucher_view.as_view(), name='vouchers-add'),
url(r'^vouchers/(?P<pk>\d+)/remove/$', self.remove_voucher_view.as_view(), name='vouchers-remove'),
url(r'^saved/$', self.saved_view.as_view(), name='saved'),
Expand Down
9 changes: 0 additions & 9 deletions oscar/apps/basket/views.py
Expand Up @@ -117,15 +117,6 @@ def form_invalid(self, form):
return HttpResponseRedirect(self.request.META.get('HTTP_REFERER',reverse('basket:summary')))


class VoucherView(ListView):
model = get_model('voucher', 'voucher')
can_delete = True
extra = 0

def get_queryset(self):
self.request.basket.vouchers.all()


class VoucherAddView(FormView):
form_class = BasketVoucherForm
voucher_model = get_model('voucher', 'voucher')
Expand Down

0 comments on commit 0025cb0

Please sign in to comment.