Skip to content

Commit

Permalink
show taxon list as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed Jun 22, 2015
1 parent a19669d commit 7be2d3c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions voseq/public_interface/admin.py
Expand Up @@ -64,14 +64,17 @@ class SequencesAdmin(admin.ModelAdmin):
fields = ['code', 'gene_code', 'sequences', 'genbank', 'accession', 'labPerson', 'notes']


def taxa(obj):
out = []
return 'hola'


class TaxonSetsAdmin(admin.ModelAdmin):
readonly_fields = ('taxa',)
fields = ['taxonset_name', 'taxonset_creator', 'taxonset_description', 'taxa']
list_display = ['taxonset_name', 'taxonset_creator', 'taxonset_description']

def taxa(self, instance):
out = []
for i in json.loads(instance.taxonset_list):
out.append(i)
return '\n'.join(out)


# Register your models here.
admin.site.register(Sequences, SequencesAdmin)
Expand Down

0 comments on commit 7be2d3c

Please sign in to comment.