Issues (27)

th_wallabag/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 Wallabag(Services):
8
    """
9
10
        wallabag model to be adapted for the new service
11
        to store url in your account
12
13
    """
14
    url = models.URLField(max_length=255)
15
    title = models.CharField(max_length=80, blank=True)
16
    tag = models.CharField(max_length=80, blank=True)
17
    trigger = models.ForeignKey(TriggerService)
18
19
    class Meta:
20
        app_label = 'th_wallabag'
21
        db_table = 'django_th_wallabag'
22
23
    def show(self):
24
        """
25
26
        :return: string representing object
27
        """
28
        return "My Wallabag %s" % self.url
29
30
    def __str__(self):
31
        return "%s" % self.url
32