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)
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)
def genome_link(self, obj=None): if not obj: return '' return view_link(obj.genome)
def post_link(self, obj=None): if not obj: return '' return view_link(obj.post)