Skip to main content

ModelAdmin mixins to extend admin field sets

Project description

pypi travis coverage

edc-fieldsets

ModelAdmin mixins to extend django.admin fieldsets atribute. The class Fieldset formats a data structure in the format of a django.fieldset.

For example:

from .fieldsets import fieldset, biosynex_fieldset


@admin.register(BloodResult, site=ambition_subject_admin)
class BloodResultsAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = BloodResultForm

    conditional_fieldsets = {DAY1: biosynex_fieldset}

    fieldsets_move_to_end = [
        'Conclusion', 'Summary', 'Action', audit_fieldset_tuple[0]]

    fieldsets = fieldset

    radio_fields = ...

where fieldset is:

biosynex_fieldset = Fieldset(
    'bios_crag',
    'crag_control_result',
    'crag_t1_result',
    'crag_t2_result',
    section='BIOSYNEX® CryptoPS (Semi-quantitative CrAg)')

fieldset = [(None, {'fields': ('subject_visit', 'report_datetime',)})]
fieldset.append(('Conclusion', {
    'fields': ('results_abnormal', 'results_reportable')}))
fieldset.append(
    ('Summary', {'classes': ('collapse', ), 'fields': ('summary', )}))
fieldset.append(action_fieldset_tuple)
fieldset.append(audit_fieldset_tuple)

The conditional_fieldsets will only display for CRF completed at visit DAY1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edc-fieldsets-0.1.5.macosx-10.13-x86_64.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

edc_fieldsets-0.1.5-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file edc-fieldsets-0.1.5.macosx-10.13-x86_64.tar.gz.

File metadata

  • Download URL: edc-fieldsets-0.1.5.macosx-10.13-x86_64.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for edc-fieldsets-0.1.5.macosx-10.13-x86_64.tar.gz
Algorithm Hash digest
SHA256 684e41325fa4adac7929e5b7a18c784cf50c36412030aa0a83b552d5d0f62b97
MD5 6ee8b921c34a8158bf90419ec9d30318
BLAKE2b-256 138e44666a646903896ec90e06da819e59df4cc1525cce92053ed4df2e283a13

See more details on using hashes here.

File details

Details for the file edc_fieldsets-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: edc_fieldsets-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for edc_fieldsets-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3abaf00416a8f5837cde054610199e07c304bee428c75d60744efdc40891d69b
MD5 4206382a34e2a32e35b0719956f9a3ba
BLAKE2b-256 fb98923e5a0e5ce95e131fd8458b47b1bf88a56506e1a6b58cbf2c2d2138b119

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page