You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing an entire object to view context and putting in it to the html that goes to pdf, i'm trying to get an image. Thats the view :
def customer_reader_pdf_view(request,*args,**kwargs):
pk = kwargs.get('pk')
customer = get_object_or_404(Customer, pk=pk)
template_path = 'users/pdf_customer.html'
context = {'customer': customer }
...
```
But in the html wen i try to get the image passing the url :
Traceback (most recent call last):
File "/home/marcus_andrade/Desktop/pyp/Django_PDF/venv/lib/python3.8/site-packages/xhtml2pdf/context.py", line 773, in _getFileDeprecated
nv = self.pathCallback(name, relative)
TypeError: 'str' object is not callable
Need a valid file name!
I get the url, but it broke my code ... someone could help me ?
The text was updated successfully, but these errors were encountered:
Passing an entire object to view context and putting in it to the html that goes to pdf, i'm trying to get an image. Thats the view :
Traceback (most recent call last):
File "/home/marcus_andrade/Desktop/pyp/Django_PDF/venv/lib/python3.8/site-packages/xhtml2pdf/context.py", line 773, in _getFileDeprecated
nv = self.pathCallback(name, relative)
TypeError: 'str' object is not callable
Need a valid file name!
The text was updated successfully, but these errors were encountered: