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

Possible to Access ExcelRenderer from PandasSimpleView? #46

Open
geoffrey-eisenbarth opened this issue Jun 24, 2020 · 0 comments
Open

Comments

@geoffrey-eisenbarth
Copy link

Apologies, this is probably not the best place to ask this question, but it might lend itself to some useful enhancements to others and I wasn't sure if there was a better forum for asking questions.

I am extending PandasExcelRenderer so that I can 1) use a permanent file (with a filename based on URL parameters passed to renderer_context) stored on my server instead of a temp file and 2) set the sheetname of the file based on the filename of the permanent file. The filename and sheetname are defined in get_pandas_kwargs based on renderer_context and sheet_name is specified in the return value of get_pandas_kwargs.

Is there any way to access this information in PandasSimpleView? Currently I am duplicating the code form get_pandas_kwargs (to determine filename) in PandasSimpleView.get_pandas_filename(), but was hoping for something cleaner and more DRY.

Any guidance or suggestions would be greatly appreciated. Again, apologies if this is the wrong place to post this question, a redirect to a better forum would be appreciated as well if applicable.

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

1 participant