Пример #1
0
 def feed_url_link(self, obj):
     try:
         print(type(obj), obj, obj.feed_url)
         feed = Feed.objects.get(id=obj.id)
         return view_link(feed)
     except Exception as e:
         return str(e)
Пример #2
0
 def reference_link(self, obj=None):
     try:
         if not obj:
             return ''
         elif obj.gene.type == c.GENE_TYPE_GENOME:
             return view_link(obj.value)
         else:
             return ''
     except Exception, e:
         return str(e)
Пример #3
0
 def genome_link(self, obj=None):
     if not obj:
         return ''
     return view_link(obj.genome)
Пример #4
0
 def post_link(self, obj=None):
     if not obj:
         return ''
     return view_link(obj.post)