Code Duplication    Length = 20-22 lines in 3 locations

th_pocket/models.py 1 location

@@ 6-27 (lines=22) @@
3
from django_th.models.services import Services
4
5
6
class Pocket(Services):
7
    """
8
9
        Pocket model to store how you want
10
        to store url in your account
11
12
    """
13
    tag = models.CharField(max_length=80, blank=True)
14
    url = models.URLField(max_length=255)
15
    title = models.CharField(max_length=80, blank=True)
16
    tweet_id = models.CharField(max_length=80, blank=True)
17
    trigger = models.ForeignKey('TriggerService')
18
19
    class Meta:
20
        app_label = 'django_th'
21
        db_table = 'django_th_pocket'
22
23
    def __str__(self):
24
        return self.url
25
26
    def show(self):
27
        return "My Pocket %s" % self.url
28

th_pelican/models.py 1 location

@@ 6-26 (lines=21) @@
3
from django_th.models.services import Services
4
5
6
class Pelican(Services):
7
8
    """
9
        pelican model
10
    """
11
    title = models.CharField(max_length=80)
12
    url = models.URLField()
13
    tags = models.CharField(max_length=200, blank=True)
14
    category = models.CharField(max_length=200, blank=True)
15
    path = models.CharField(max_length=255)
16
    trigger = models.ForeignKey('TriggerService')
17
18
    class Meta:
19
        app_label = 'django_th'
20
        db_table = 'django_th_pelican'
21
22
    def __str__(self):
23
        return self.name
24
25
    def show(self):
26
        return "My Pelican {}".format(self.name)
27

th_pushbullet/models.py 1 location

@@ 6-25 (lines=20) @@
3
from django_th.models.services import Services
4
5
6
class Pushbullet(Services):
7
8
    """
9
        todoist model to be adapted for the new service
10
    """
11
    type = models.CharField(max_length=4, default='note')
12
    device = models.CharField(max_length=80, blank=True)
13
    email = models.EmailField(max_length=255, blank=True)
14
    channel_tag = models.CharField(max_length=80, blank=True)
15
    trigger = models.ForeignKey('TriggerService')
16
17
    class Meta:
18
        app_label = 'django_th'
19
        db_table = 'django_th_pushbullet'
20
21
    def __str__(self):
22
        return self.name
23
24
    def show(self):
25
        return "My Pushbullet %s" % self.name
26