templated-docs
templated-docs copied to clipboard
get_template_sources() takes 2 positional arguments but 3 were given
- Templated-docs version:0.3.1
- Python version: 3.7
- Django : 2.1
- Operating System: Debian (Docker image : python:3.7.3-stretch )
Description
Im trying to pass fill_template('dashboard/report/word/invoice.odt', context, output_format='pdf')
What I Did
def report_html_view(request,project_id):
try :
context = {'number':'93333333'} # Just an example
filename = fill_template('dashboard/report/word/invoice.odt', context, output_format='pdf')
visible_filename = 'greeting.pdf'
except Exception as e:
print('Something Went Wrong.!'+ str(e))
return FileResponse(filename, visible_filename)
Output / Error
get_template_sources() takes 2 positional arguments but 3 were given
Same here with django 2.2.4
En la linea 74 del archivo templated_docs/init.py, quitale el segundo parametro None, la linea quedaría así:
for origin in loader.get_template_sources(template_name):
Saludos.
With django 3.0.3 it is still not useable, will there be any fixes or is this just dead?