Completed
Push — master ( 89b1ce...302d13 )
by Fox
01:46
created

Rss

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 21

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __str__() 0 2 1
A show() 0 6 1
1
# coding: utf-8
2
from django.db import models
3
from django_th.models.services import Services
4
import uuid
5
6
7
class Rss(Services):
8
    """
9
        Model for RSS Service
10
    """
11
    uuid = models.UUIDField(unique=True, default=uuid.uuid4, editable=False)
12
    url = models.URLField(max_length=255)
13
    trigger = models.ForeignKey('TriggerService')
14
15
    class Meta:
16
        app_label = 'django_th'
17
        db_table = 'django_th_rss'
18
19
    def show(self):
20
        """
21
22
        :return: string representing object
23
        """
24
        return "Services RSS %s %s" % (self.url, self.trigger)
25
26
    def __str__(self):
27
        return "%s" % self.url
28