Skip to content

Expand Export Template to allow for non-attachment response #5830

@rodvand

Description

@rodvand

Environment

  • Python version: 3.6.8
  • NetBox version: 2.10.4

Proposed Functionality

Add an option to the Export Template functionality where it does not download the export template as an attachment, but instead presents it right away.

Use Case

Allow rendered content to be opened straight away. Currently I am generating a link using the Export Template and am required to open the downloaded attachment and click on the link to access the page. Being able to adjust this behaviour would make for a smoother workflow.

Database Changes

Boolean field on the ExportTemplate model for deciding whether to set the Content-Disposition to attachment. Suggests to set this default as True to keep the current workflow as standard.

External Dependencies

None

On my test instance I commented out the line

response['Content-Disposition'] = 'attachment; filename="{}"'.format(filename)
and this gave me the behaviour I'm describing.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions