Issues (27)

th_pocket/models.py (1 issue)

1
# coding: utf-8
2
from django.db import models
3
from django_th.models.services import Services
4
from django_th.models import TriggerService
5
6 View Code Duplication
0 ignored issues
show
This code seems to be duplicated in your project.
Loading history...
7
class Pocket(Services):
8
    """
9
10
        Pocket model to store how you want
11
        to store url in your account
12
13
    """
14
    tag = models.CharField(max_length=80, blank=True)
15
    url = models.URLField(max_length=255)
16
    title = models.CharField(max_length=80, blank=True)
17
    tweet_id = models.CharField(max_length=80, blank=True)
18
    trigger = models.ForeignKey(TriggerService)
19
20
    class Meta:
21
        app_label = 'th_pocket'
22
        db_table = 'django_th_pocket'
23
24
    def show(self):
25
        """
26
27
        :return: string representing object
28
        """
29
        return "My Pocket %s" % self.url
30
31
    def __str__(self):
32
        return "%s" % self.url
33