Package: django-genomix
Core library for Nexus django projectsDocumentationThe full documentation is athttps://django-genomix.readthedocs.io.QuickstartInstall Django GenomiX:pip install django-genomixAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'genomix',...)FeaturesDisplayChoiceField - display representation values for choice fields in REST APIs.:fromgenomix.fieldsimportDisplayChoiceFieldfromrest_frameworkimportserializersfrom.importchoicesclassExampleSerializer(serializers.ModelSerializer):status=DisplayChoiceField(choices=choices.STATUS_OPTIONS)UserRelatedField - display username for a REST API with a user relation.:fromdjango.contrib.authimportget_user_modelfromgenomix.fieldsimportUserRelatedFieldfromrest_frameworkimportserializersclassExampleSerializer(serializers.ModelSerializer):user=UserRelatedField(queryset=get_user_model().objects.all())ContentRelatedField - display ContentType model for a REST API using a generic relation.:fromdjango.contrib.authimportget_user_modelfromdjango.contrib.contenttypes.modelsimportContentTypefromgenomix.fieldsimportContentRelatedFieldfromrest_frameworkimportserializersclassExampleSerializer(serializers.ModelSerializer):content_type=ContentRelatedField(queryset=ContentType.objects.all())DisplayChoiceFilter - Filter by representation values in a REST API.:importdjango_filtersfromgenomix.filtersimportDisplayChoiceFilterfrom.importchoicesclassExampleFilter(django_filters.rest_framework.FilterSet):source=DisplayChoiceFilter(choices=choices.SOURCES)Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-12-02)First release on PyPI.TimeStampedLabelModel abstract model classUserRelatedField for use in DRF serializersDisplayChoiceField for use in DRF serializersContentRelatedField for use in DRF serializersDefaultRouter that allows you to extend other routersModelMixinTestCase that allows you to test abstract model classes0.2.0 (2017-12-31)0.2.0 ChangelogAdded utils function to retrieve data from a URLAdded utils function to retrieve compressed data from a URL0.3.0 (2018-01-04)0.3.0 ChangelogDisplayChoiceFilter for use in django_filters. Filter by diplay fields for a choice field in a REST API0.4.0 (2018-01-05)0.4.0 ChangelogImproved docsBeta release0.4.1 (2018-01-09)0.4.1 ChangelogDisplayChoiceFilter fixed coerce method to handle Choices with different display values.0.5.0 (2018-02-09)0.5.0 ChangelogUpdated requirements to the latest.0.6.0 (2018-04-07)0.6.0 ChangelogAdded support for Django 2.0 and Python3.6Dropped support for Django <1.11 and Python 2.7, 3.3, 3.40.6.1 (2018-04-18)0.6.1 ChangelogUpgraded 3rd party libs0.6.2 (2018-05-16)0.6.2 ChangelogUpdated setup.py to read install_requires from requirements.txt0.6.3 (2018-08-13)0.6.3 ChangelogUpdated 3rd party requirements.  Some requirements had changed so it was causing failures0.6.4 (2018-10-29)0.6.4 ChangelogUpdated deps and adjusted for new flake8 reqs0.6.5 (2019-02-07)0.6.5 ChangelogUpdated deps0.6.6 (2019-04-10)0.6.6 ChangelogUpdated depsUpdated travis to use xenial distribution.  Django 2.1 dropped support for SQLite < 3.8.30.6.7 (2019-05-30)0.6.7 ChangelogUpdated deps0.6.8 (2019-07-26)0.6.8 ChangelogUpdated deps0.6.9 (2019-08-09)0.6.9 ChangelogUpdated deps0.6.10 (2019-09-09)0.6.10 ChangelogUpdated deps1.0.0 (2019-11-01)1.0.0 ChangelogMade gene symbol uniqueFirst release used in production in DGD1.1.0 (2019-11-26)1.1.0 ChangelogAdded disabled update method queryset base class