Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_template_sources() takes 2 positional arguments but 3 were given #29

Open
cypna opened this issue Jul 4, 2019 · 3 comments
Open

Comments

@cypna
Copy link

cypna commented Jul 4, 2019

  • 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

@gniccolini
Copy link

Same here with django 2.2.4

@cloarcaios
Copy link

cloarcaios commented Oct 25, 2019

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.

@ghost
Copy link

ghost commented Feb 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants