Completed
Pull Request — master (#216)
by
unknown
40s
created

Reddit.show()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 2
rs 10
c 1
b 0
f 0
1
# coding: utf-8
2
from django.db import models
3
from django_th.models.services import Services
4
5
6
class Reddit(Services):
7
8
    """
9
        reddit model to be adapted for the new service
10
    """
11
    # put whatever you need  here
12
    # eg title = models.CharField(max_length=80)
13
    # but keep at least this one
14
    subreddit = models.CharField(max_length=80)
15
    trigger = models.ForeignKey('TriggerService')
16
17
    class Meta:
18
        app_label = 'django_th'
19
        db_table = 'django_th_reddit'
20
21
    def __str__(self):
22
        return self.name
23
24
    def show(self):
25
        return "My Reddit %s" % self.name
26