Django / xhtml2pdf - object has no attribute 'encode'
www.py4u.net › discuss › 215079When I run the following code I get 'list' object has no attribute 'encode', a pdf is saved in the media folder but it is a plain text file. I think the object that is being referred to is the sections queryset. @login_required def generate_pdf(request, slug): # Prepare context document = get_object_or_404 (Document, slug=slug) sections = \ get ...