marketing.views
Define the marketing views.
Copyright (C) 2021 Gitcoin Core
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
matching_settings
matching_settings(request)
Handle viewing and updating EmailSubscriber matching settings.
TODO: * Migrate this to a form and handle validation. * Migrate Keyword to taggit. * Maybe migrate keyword information to Profile instead of using ES?
Returns: TemplateResponse: The populated matching template.
set_mautic_dnc
set_mautic_dnc(profile, es, form)
Places contact on the DNC list on mautic
Args: profile (Profile): The user who is being unsubscribed es (EmailSubscriber): The details of the subscription form (dict): email_type: bool
email_settings
email_settings(request, key)
Display email settings.
Args: key (str): The private key to lookup email subscriber data.
TODO: * Remove all ES.priv_key lookups and use request.user only. * Remove settings_helper_get_auth usage.
Returns: TemplateResponse: The email settings view populated with ES data.
slack_settings
slack_settings(request)
Display and save user's slack settings.
Returns: TemplateResponse: The user's slack settings template response.
token_settings
token_settings(request)
Display and save user's token settings.
Returns: TemplateResponse: The user's token settings template response.
account_settings
account_settings(request)
Display and save user's Account settings.
Returns: TemplateResponse: The user's Account settings template response.
job_settings
job_settings(request)
Display and save user's Account settings.
Returns: TemplateResponse: The user's Account settings template response.
org_settings
org_settings(request)
Display and save user's Account settings.
Returns: TemplateResponse: The user's Account settings template response.
tax_settings
tax_settings(request)
Display and save user's Tax settings.
Returns: TemplateResponse: The user's Tax settings template response.
leaderboard
leaderboard(request, key='')
Display the leaderboard for top earning or paying profiles.
Args: key (str): The leaderboard display type. Defaults to: quarterly_earners.
Returns: TemplateResponse: The leaderboard template response.