edc-fieldsets


Nameedc-fieldsets JSON
Version 0.3.21 PyPI version JSON
download
home_pagehttps://github.com/clinicedc/edc-fieldsets
SummaryModelAdmin mixins to extend admin field sets
upload_time2024-03-26 04:58:20
maintainerNone
docs_urlNone
authorErik van Widenfelt
requires_python>=3.11
licenseGPL license, see LICENSE
keywords django edc fieldsets modeladmin clinical trials
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            |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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/clinicedc/edc-fieldsets",
    "name": "edc-fieldsets",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "django Edc fieldsets modeladmin, clinical trials",
    "author": "Erik van Widenfelt",
    "author_email": "ew2789@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f7/90/f95e43ac697dfb52643cf67313ce9939f42ffa8c0b34b6afc73dd83d3008/edc-fieldsets-0.3.21.tar.gz",
    "platform": null,
    "description": "|pypi| |actions| |coverage|\n\nedc-fieldsets\n-------------\nModelAdmin mixins to extend django.admin fieldsets atribute. The class ``Fieldset`` formats a data structure in the format of a django.fieldset.\n\nFor example:\n\n.. code-block:: python\n\n    from .fieldsets import fieldset, biosynex_fieldset\n\n\n    @admin.register(BloodResult, site=ambition_subject_admin)\n    class BloodResultsAdmin(CrfModelAdminMixin, admin.ModelAdmin):\n\n        form = BloodResultForm\n\n        conditional_fieldsets = {DAY1: biosynex_fieldset}\n\n        fieldsets_move_to_end = [\n            'Conclusion', 'Summary', 'Action', audit_fieldset_tuple[0]]\n\n        fieldsets = fieldset\n\n        radio_fields = ...\n\n\nwhere ``fieldset`` is:\n\n\n.. code-block:: python\n\n    biosynex_fieldset = Fieldset(\n        'bios_crag',\n        'crag_control_result',\n        'crag_t1_result',\n        'crag_t2_result',\n        section='BIOSYNEX\u00ae CryptoPS (Semi-quantitative CrAg)')\n\n    fieldset = [(None, {'fields': ('subject_visit', 'report_datetime',)})]\n    fieldset.append(('Conclusion', {\n        'fields': ('results_abnormal', 'results_reportable')}))\n    fieldset.append(\n        ('Summary', {'classes': ('collapse', ), 'fields': ('summary', )}))\n    fieldset.append(action_fieldset_tuple)\n    fieldset.append(audit_fieldset_tuple)\n\nThe ``conditional_fieldsets`` will only display for CRF completed at visit ``DAY1``\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/edc-fieldsets.svg\n  :target: https://pypi.python.org/pypi/edc-fieldsets\n\n.. |actions| image:: https://github.com/clinicedc/edc-fieldsets/actions/workflows/build.yml/badge.svg\n  :target: https://github.com/clinicedc/edc-fieldsets/actions/workflows/build.yml\n\n.. |coverage| image:: https://coveralls.io/repos/github/clinicedc/edc-fieldsets/badge.svg?branch=develop\n  :target: https://coveralls.io/github/clinicedc/edc-fieldsets?branch=develop\n",
    "bugtrack_url": null,
    "license": "GPL license, see LICENSE",
    "summary": "ModelAdmin mixins to extend admin field sets",
    "version": "0.3.21",
    "project_urls": {
        "Homepage": "https://github.com/clinicedc/edc-fieldsets"
    },
    "split_keywords": [
        "django edc fieldsets modeladmin",
        " clinical trials"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "557548396f0a1d46025482c9974737c6bfaf409e78efdee0da2f11b1b5f3438e",
                "md5": "2610d462764c0ef959a6b6787210c9b6",
                "sha256": "34fcee148a5d7f67265cae8eee0c75901069d6301fa439c2c9522a755a3a3e5d"
            },
            "downloads": -1,
            "filename": "edc_fieldsets-0.3.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2610d462764c0ef959a6b6787210c9b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 30391,
            "upload_time": "2024-03-26T04:58:18",
            "upload_time_iso_8601": "2024-03-26T04:58:18.955594Z",
            "url": "https://files.pythonhosted.org/packages/55/75/48396f0a1d46025482c9974737c6bfaf409e78efdee0da2f11b1b5f3438e/edc_fieldsets-0.3.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f790f95e43ac697dfb52643cf67313ce9939f42ffa8c0b34b6afc73dd83d3008",
                "md5": "69ea3c8d1886103a66afe2d60ce59b44",
                "sha256": "0648dc5ddbea736867e31bfead8b4da8ef7ddcad0a6f566574bbc9075e1e3825"
            },
            "downloads": -1,
            "filename": "edc-fieldsets-0.3.21.tar.gz",
            "has_sig": false,
            "md5_digest": "69ea3c8d1886103a66afe2d60ce59b44",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 31621,
            "upload_time": "2024-03-26T04:58:20",
            "upload_time_iso_8601": "2024-03-26T04:58:20.505121Z",
            "url": "https://files.pythonhosted.org/packages/f7/90/f95e43ac697dfb52643cf67313ce9939f42ffa8c0b34b6afc73dd83d3008/edc-fieldsets-0.3.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 04:58:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "clinicedc",
    "github_project": "edc-fieldsets",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "edc-fieldsets"
}
        
Elapsed time: 0.21963s