forked from gitcoinco/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add slack settings tab on user's settings page
- send same messages to user's slack as to gitcoin's slack Fixes: gitcoinco#259
- Loading branch information
1 parent
07903ba
commit aae7d84
Showing
8 changed files
with
166 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 2.0.4 on 2018-04-19 15:17 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('marketing', '0021_emailsubscriber_profile'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='emailsubscriber', | ||
name='repos', | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=200), blank=True, default=[], size=None), | ||
), | ||
migrations.AddField( | ||
model_name='emailsubscriber', | ||
name='slack_channel', | ||
field=models.CharField(default='', max_length=255), | ||
), | ||
migrations.AddField( | ||
model_name='emailsubscriber', | ||
name='slack_token', | ||
field=models.CharField(default='', max_length=255), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends 'settings/settings.html' %} | ||
{% load i18n static %} | ||
|
||
{% block settings_content %} | ||
<form id="settings" method="POST"> | ||
<div class="form-group"> | ||
<h5>{% trans "Slack Integration" %}</h5> | ||
<label class="form__label" for="token">{% trans "Slack API token" %}</label> | ||
<input type="text" name="token" class="form__input" placeholder='API token' value="{{ es.slack_token }}"> | ||
</div> | ||
<div class="form-group"> | ||
<label class="form__label" for="repos">{% trans "Github repos to monitor" %}</label> | ||
<input type="text" name="repos" class="form__input" placeholder='comma, separated, list' value="{{ repos }}"> | ||
</div> | ||
<div class="form-group"> | ||
<label class="form__label" for="channel">{% trans "Slack channel to post to" %}</label> | ||
<input type="text" name="channel" class="form__input" value="{{ es.slack_channel }}"> | ||
</div> | ||
{% csrf_token %} | ||
<input class='button button--primary' type='submit' name='submit' value="Go"> | ||
</form> | ||
</div> | ||
{% endblock %} |