Пример #1
0
 def link_to_digest_record(self, obj):
     return object_modification_url('gatherer', 'digestrecord',
                                    obj.digest_record.id,
                                    str(obj.digest_record))
Пример #2
0
 def link_to_telegram_bot_user(self, obj):
     return object_modification_url('tbot', 'telegrambotuser',
                                    obj.telegram_bot_user.id,
                                    str(obj.telegram_bot_user))
Пример #3
0
 def links_to_groups(self, obj):
     return object_modification_url('tbot', 'telegrambotusergroup',
                                    [g.id for g in obj.groups.all()],
                                    [str(g) for g in obj.groups.all()])
Пример #4
0
 def links_to_users(self, obj):
     return object_modification_url('tbot', 'telegrambotuser',
                                    [u.id for u in obj.users.all()],
                                    [str(u) for u in obj.users.all()])
Пример #5
0
 def link_to_digest_issue(self, obj):
     return object_modification_url(
         'gatherer', 'digestissue',
         obj.digest_issue.id if obj.digest_issue else None,
         str(obj.digest_issue))
Пример #6
0
 def links_to_keywords(self, obj):
     return object_modification_url(
         'gatherer', 'keyword', [k.id for k in obj.title_keywords.all()],
         [str(k) for k in obj.title_keywords.all()])
Пример #7
0
 def links_to_projects(self, obj):
     return object_modification_url('gatherer', 'project',
                                    [p.id for p in obj.projects.all()],
                                    [str(p) for p in obj.projects.all()])
Пример #8
0
 def link_to_source(self, obj):
     return object_modification_url('gatherer', 'digestrecordssource',
                                    obj.source.id if obj.source else None,
                                    str(obj.source))
Пример #9
0
 def link_to_lemma(self, obj):
     return object_modification_url('ds', 'lemma', obj.lemma.id if obj.lemma else None, obj.lemma.text)