|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
from django.conf import settings |
|
|
|
|
from django.shortcuts import render, redirect, get_object_or_404 |
|
|
|
|
from django.views.decorators.http import require_POST |
|
|
|
|
from django.views.decorators.csrf import csrf_exempt |
|
|
|
|
@ -55,6 +56,16 @@ from .forms import CartAddProductForm |
|
|
|
|
# # 'discount_apply_form': discount_apply_form}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BuyingsHistory(ProtectedView,ListView): |
|
|
|
|
class BuyingsHistory(ListView,ProtectedView): |
|
|
|
|
model = Buying |
|
|
|
|
template_name = 'cart/buying_history.html' |
|
|
|
|
paginate_by = settings.DEFAULT_PAGE_AMMOUNT |
|
|
|
|
context_object_name = 'bought_item_list' |
|
|
|
|
ordering = '-created_at' |
|
|
|
|
template_name = 'cart/bought_history.html' |
|
|
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
|
|
self.object_list = super().get_queryset() |
|
|
|
|
return self.object_list |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|