Ideally you want a single point of truth for the email_onceoff URL so if it changes you don't have to change it (or forget to change it) in all the places it is in the code (and it also just makes for more readable code), although I see that you were just following the pattern from above with export/.

The standard way to do this would be to pass the url as a context variable when rendering the template and then pass that url as a parameter to the HQReport constructor.

You'd have to go into GenericReportView and find where it sets the context variables used for all report views and then use reverse('email_onceoff', args=[<domain>, <report_slug]).

Feel free to ignore this, I can do it some time, just thought I'd mention what I think is a good general principle of passing URLs to javascript code rather than hard-coding them in.