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

report context defined in settings.py does not have any effect on email reports #44

Closed
HassanQamar07 opened this issue Sep 24, 2018 · 1 comment

Comments

@HassanQamar07
Copy link
Member

SPIDERMON_REPORT_CONTEXT defined in settings.py file does not have any effect on email reports, we need to subclass SendSESEmail and add 'context' attribute explicitly.

SPIDERMON_REPORT_CONTEXT = { 'report_title': 'ABC Spiders Report' , 'show_job_button': True }

@jesuslosada
Copy link
Contributor

Fixed in #53 . Note that I've added a separate setting (SPIDERMON_EMAIL_CONTEXT) since it might be useful to use different contexts for each action (email vs. report). You should be able to get rid of the custom subclass and just add this setting to your project settings:
SPIDERMON_EMAIL_CONTEXT = { 'report_title': 'My Custom Title', 'show_job_button': True}

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

2 participants