예제 #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)