Pelican.__str__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 1
Ratio 50 %

Importance

Changes 0
Metric Value
cc 1
dl 1
loc 2
rs 10
c 0
b 0
f 0
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
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7
class Pelican(Services):
8
9
    """
10
        pelican model
11
    """
12
    title = models.CharField(max_length=80)
13
    url = models.URLField()
14
    tags = models.CharField(max_length=200, blank=True)
15
    category = models.CharField(max_length=200, blank=True)
16
    path = models.CharField(max_length=255)
17
    trigger = models.ForeignKey(TriggerService)
18
19
    class Meta:
20
        app_label = 'th_pelican'
21
        db_table = 'django_th_pelican'
22
23
    def show(self):
24
        """
25
26
        :return: string representing object
27
        """
28
        return "My Pelican %s" % self.name
29
30
    def __str__(self):
31
        return '%s' % self.name
32