Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edc-fieldsets

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edc-fieldsets

ModelAdmin mixins to extend admin field sets

  • 0.3.22
  • PyPI
  • Socket score

Maintainers
1

|pypi| |actions| |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:

.. code-block:: python

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:

.. code-block:: python

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

.. |pypi| image:: https://img.shields.io/pypi/v/edc-fieldsets.svg :target: https://pypi.python.org/pypi/edc-fieldsets

.. |actions| image:: https://github.com/clinicedc/edc-fieldsets/actions/workflows/build.yml/badge.svg :target: https://github.com/clinicedc/edc-fieldsets/actions/workflows/build.yml

.. |coverage| image:: https://coveralls.io/repos/github/clinicedc/edc-fieldsets/badge.svg?branch=develop :target: https://coveralls.io/github/clinicedc/edc-fieldsets?branch=develop

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc