summaryrefslogtreecommitdiff
path: root/app/products/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-11-05 11:15:30 -0500
committerluxagraf <sng@luxagraf.net>2019-11-05 11:15:30 -0500
commitb1057c9dc9ff6b6e1786d31e3401ad9571eb7f1d (patch)
treec3247bc40c63bf5df1c6fecee75a81b7c2ebafde /app/products/views.py
parent725e3d2f798d228a386466823490b6f25647a4db (diff)
added products
Diffstat (limited to 'app/products/views.py')
-rw-r--r--app/products/views.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/products/views.py b/app/products/views.py
new file mode 100644
index 0000000..30be542
--- /dev/null
+++ b/app/products/views.py
@@ -0,0 +1,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']})