14 lines
341 B
Python
14 lines
341 B
Python
from django.shortcuts import render
|
|
from django.core import serializers
|
|
from apps.pages.models import *
|
|
|
|
# Create your views here.
|
|
|
|
def index(request):
|
|
products = serializers.serialize('json', Product.objects.all())
|
|
context = {
|
|
'segment': 'charts',
|
|
'products': products
|
|
}
|
|
return render(request, 'charts/index.html', context)
|