I figured this out. I just had to add 'download' to the <a> tag:
<a href="{% url 'core.reports.views.download' the_controller.app.name
the_controller.get_name %}?report_id={{ encounters.0.report_id }}"
class="btn btn-primary" download>Export</a>
On Tue, Aug 9, 2016 at 3:04 AM, M Hashmi <[email protected]> wrote:
> Please paste code.
>
>
> On Monday, August 8, 2016 at 12:18:45 PM UTC-7, [email protected] wrote:
>>
>> Not really a django question but I'm hoping someone can help me here.
>>
>> I have a django app but the html is not displayed in a browser -
>> render_to_string is called and the html is returned in a response to
>> custom app that displays the page. On the page I have a button that
>> sends a request back to the server. When I click the button in the
>> page within the custom app app the request is sent, but the app does
>> not wait for the reply. However if I right click on the button and
>> select "Save link ...' then the app does wait for the reply and it all
>> works as I want.
>>
>> Is there some way I can associate the "Save link ...' action with the
>> button so that clicking on it will function the same as when right
>> click save link is selected?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CACwCsY63wUzckeckOsR3wU7htezHqQVBoLdKUgahe-0AGutBwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.