templated-docs icon indicating copy to clipboard operation
templated-docs copied to clipboard

get_template_sources() takes 2 positional arguments but 3 were given

Open cypna opened this issue 6 years ago • 3 comments

  • 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

cypna avatar Jul 04 '19 13:07 cypna

Same here with django 2.2.4

gniccolini avatar Aug 02 '19 15:08 gniccolini

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.

cloarcaios avatar Oct 25 '19 01:10 cloarcaios

With django 3.0.3 it is still not useable, will there be any fixes or is this just dead?

ghost avatar Feb 23 '20 11:02 ghost