Skip to content

Commit

Permalink
search in admin sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed May 26, 2015
1 parent fe292cc commit a92cd4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions voseq/public_interface/admin.py
Expand Up @@ -11,8 +11,7 @@
class VouchersAdmin(admin.ModelAdmin):
list_display = ['code', 'genus', 'species', 'sex', 'voucher', 'country', 'collector']
ordering = ['code']
list_filter = ['voucher']
search_fields = ['=genus', '=species']
search_fields = ['=code', '=genus', '=species']

# list_editable = ['genus', 'species', 'sex', 'voucher', 'country', 'collector']

Expand Down Expand Up @@ -58,9 +57,12 @@ def batch_changes(self, request, queryset):


class SequencesAdmin(admin.ModelAdmin):
# TODO let users know that code and genecode keywords act as AND boolean search
search_fields = ['=code__code', '=gene_code']
list_display = ['code', 'gene_code', 'genbank', 'accession', 'labPerson', 'notes']
fields = ['code', 'gene_code', 'sequences', 'genbank', 'accession', 'labPerson', 'notes']


# Register your models here.
admin.site.register(Sequences, SequencesAdmin)
admin.site.register(Vouchers, VouchersAdmin)

0 comments on commit a92cd4e

Please sign in to comment.