Skip to content

Commit

Permalink
Merge pull request #66 from EBI-Metagenomics/develop
Browse files Browse the repository at this point in the history
1.3.2
  • Loading branch information
atarkowska authored Jul 5, 2018
2 parents e56cf94 + 095ef60 commit e82f4d1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions emgapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,27 @@ class MyDataViewSet(emg_mixins.ListModelMixin,
emg_perms.IsSelf,
)

filter_backends = (
filters.SearchFilter,
filters.OrderingFilter,
)

ordering_fields = (
('study_id', 'accession'),
'study_name',
'last_update',
'samples_count',
)

ordering = ('-last_update',)

search_fields = (
'@study_name',
'@study_abstract',
'centre_name',
'project_id',
)

def get_queryset(self):
queryset = emg_models.Study.objects \
.mydata(self.request)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
_requirements = os.path.join(_base, 'requirements.txt')
_requirements_test = os.path.join(_base, 'requirements-test.txt')

version = "1.3.1"
version = "1.3.2"

install_requirements = []
with open(_requirements) as f:
Expand Down

0 comments on commit e82f4d1

Please sign in to comment.