I have function in view
from django.shortcuts import render
from .models import myModel
def articleTheme(request):
if request.method == 'POST':
article_id = request.POST['id']
article = myModel.objects.get(id=article_id)
theme = article.theme
return render(request, 'theme.html', {'newTheme': theme })
now it works normal. But I have excess html. I want return json object. What I can import and return?