-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,007 additions
and
347 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
Binary file not shown.
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,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11 on 2017-04-11 21:08 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('feedcrunch', '0019_feeduser_modified_linkedin_credentials'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='feeduser', | ||
old_name='pref_post_repost_GPlus', | ||
new_name='pref_post_repost_Slack', | ||
), | ||
migrations.RemoveField( | ||
model_name='feeduser', | ||
name='gplus_token', | ||
), | ||
migrations.RemoveField( | ||
model_name='feeduser', | ||
name='gplus_token_secret', | ||
), | ||
] |
32 changes: 32 additions & 0 deletions
32
feedcrunch/migrations/0021_slack_integration_model_creation.py
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11 on 2017-04-11 22:34 | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import encrypted_model_fields.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('feedcrunch', '0020_gplus_replaced_by_slack'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='SlackIntegration', | ||
fields=[ | ||
('id', models.AutoField(primary_key=True, serialize=False)), | ||
('team_name', models.CharField(max_length=100)), | ||
('channels', models.CharField(blank=True, default='', max_length=100, null=True)), | ||
('access_token', encrypted_model_fields.fields.EncryptedCharField()), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rel_slack_integrations', to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='slackintegration', | ||
unique_together=set([('team_name', 'user')]), | ||
), | ||
] |
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,24 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import unicode_literals | ||
from django.db import models | ||
|
||
from .models_user import FeedUser | ||
|
||
from encrypted_model_fields .fields import EncryptedCharField | ||
|
||
############################## TAG MODEL ################################### | ||
|
||
class SlackIntegration(models.Model): | ||
id = models.AutoField(primary_key=True) | ||
user = models.ForeignKey(FeedUser, related_name='rel_slack_integrations', on_delete=models.CASCADE) | ||
team_name = models.CharField(max_length=100, blank=False, null=False) | ||
channels = models.CharField(max_length=100, blank=True, null=True, default="") | ||
access_token = EncryptedCharField(max_length=500, blank=False, null=False) | ||
|
||
class Meta: | ||
unique_together = (("team_name", "user"),) | ||
|
||
def __str__(self): | ||
return self.team_name + " // " + self.user.username |
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
Oops, something went wrong.