Skip to content

Commit

Permalink
Merge pull request #397 from VoSeq/typo
Browse files Browse the repository at this point in the history
fixes to admin layout and searches
  • Loading branch information
carlosp420 committed Jul 4, 2020
2 parents 86322a9 + dee9a7a commit 9bb59c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
HISTORY
-------

X.Y.Z ()
++++++++++++++++++
- fixed usage of django-suit for admin interface.
- allow partial match to voucher code, genus, species, accession numbers, gene_codes
when searching for Vouchers or Sequences in the admin interface. Eg. searching
for "Meli" will return matches to Melitaea, Melinaea, etc.

2.2.1 (2020-06-28)
++++++++++++++++++
- upgraded dataset-creator dependency to allow generating datasets with full taxon
Expand Down
4 changes: 2 additions & 2 deletions public_interface/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class VouchersAdmin(ImportExportModelAdmin):
import_template_name = 'admin/public_interface/vouchers/batch_import.html'
list_display = ['code', 'genus', 'species', 'sex', 'voucher', 'country', 'collector']
ordering = ['code']
search_fields = ['=code', '=genus', '=species']
search_fields = ['code', 'genus', 'species']

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

Expand Down Expand Up @@ -138,7 +138,7 @@ def batch_changes(self, request, queryset):

class SequencesAdmin(ImportExportModelAdmin):
# TODO let users know that code and genecode keywords act as AND boolean search
search_fields = ['=code__code', '=gene_code']
search_fields = ['code__code', 'gene_code', 'accession']
list_display = ['code', 'gene_code', 'genbank', 'accession', 'lab_person',
'notes', 'time_edited', 'time_created']
fields = ['code', 'gene_code', 'sequences', 'genbank', 'accession',
Expand Down
1 change: 1 addition & 0 deletions run/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dataset-creator==0.4.0
degenerate-dna==0.0.9
django-crispy-forms==1.9.0
django-debug-toolbar==2.2
django-extensions
django-haystack==2.8.1
django-import-export==2.0.2
django-registration-redux==2.7
Expand Down
4 changes: 2 additions & 2 deletions voseq/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@

INSTALLED_APPS = [
'registration',
'suit',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django_extensions',

# added
'suit',
'haystack',
'crispy_forms',

Expand Down

0 comments on commit 9bb59c2

Please sign in to comment.