from django.views import generic

from ..mixins import BazaarPrefixMixin
from .models import Product


class ProductListView(BazaarPrefixMixin, generic.ListView):
    model = Product


class ProductCreateView(BazaarPrefixMixin, generic.CreateView):
    model = Product

from django.views import generic

from ..mixins import BazaarPrefixMixin
from .models import Product


class ProductListView(BazaarPrefixMixin, generic.ListView):
    model = Product
    paginate_by = 20


class ProductCreateView(BazaarPrefixMixin, generic.CreateView):
    model = Product

Add pagination to product list view
Add pagination to product list view

  from django.views import generic
  
  from ..mixins import BazaarPrefixMixin
  from .models import Product
  
  
  class ProductListView(BazaarPrefixMixin, generic.ListView):
      model = Product
+     paginate_by = 20
  
  
  class ProductCreateView(BazaarPrefixMixin, generic.CreateView):
      model = Product
  
Add pagination to product list view
## Code Before:
from django.views import generic

from ..mixins import BazaarPrefixMixin
from .models import Product


class ProductListView(BazaarPrefixMixin, generic.ListView):
    model = Product


class ProductCreateView(BazaarPrefixMixin, generic.CreateView):
    model = Product

## Instruction:
Add pagination to product list view
## Code After:
from django.views import generic

from ..mixins import BazaarPrefixMixin
from .models import Product


class ProductListView(BazaarPrefixMixin, generic.ListView):
    model = Product
    paginate_by = 20


class ProductCreateView(BazaarPrefixMixin, generic.CreateView):
    model = Product
