blob: 30be542206d072c61b3931ed4bc755cba06c070e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from django.shortcuts import render
from .models import Product
def insert_products(request):
"""
The view that handles the admin insert products feature
"""
object_list = Product.objects.all()
#object_list = sorted(
# chain(images, videos, audio),
# key=lambda instance: instance.pub_date,
# reverse=True
#)
return render(request, 'admin/insert_products.html', {'object_list': object_list, 'textarea_id': request.GET['textarea']})
|