edc-locator


Nameedc-locator JSON
Version 0.3.45 PyPI version JSON
download
home_pagehttps://github.com/clinicedc/edc-locator
SummaryBase models, forms and admin for participant locator in clinicedc/edc projects
upload_time2024-03-27 04:13:47
maintainerNone
docs_urlNone
authorErik van Widenfelt
requires_python>=3.11
licenseGPL license, see LICENSE
keywords django edc participant locator crf clinicedc clinical trials
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            |pypi| |actions| |codecov| |downloads|

edc-locator
-----------

Base classes for participant locator form and processes

Other edc modules will use ``get_locator_model`` and ``get_locator_model_cls`` to access the
subject locator model class. ``get_locator_model`` defaults to ``edc_locator.subject_locator``.
If you declare a custom locator model, add the name of the model to ``settings``
in label_lower format::

    # settings.py
    SUBJECT_LOCATOR_MODEL="myapp.subject_locator"

When declaring a custom locator model, you may only need to declare a ``proxy`` model class.

For example:

.. code-block:: python

    # models.py
    from edc_locator.models import SubjectLocator as BaseModel


    class SubjectLocator(BaseModel):
        class Meta:
            proxy = True
            verbose_name = "Subject Locator"
            verbose_name_plural = "Subject Locators"

.. code-block:: python

    # forms.py
    # use the form class from edc_locator

Use the modeladmin mixin class ``SubjectLocatorModelAdminMixin``.  Since you only want one
subject locator model accessible through admin in your EDC, unregister the default subject locator
before registering your custom modeladmin class.

.. code-block:: python

    # admin.py
    edc_locator_admin.unregister(DefaultSubjectLocator)

    @admin.register(SubjectLocator, site=intecomm_prn_admin)
    class SubjectLocatorAdmin(
        SubjectLocatorModelAdminMixin,
        SiteModelAdminMixin,
        ModelAdminSubjectDashboardMixin,
        SimpleHistoryAdmin,
    ):
        pass


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

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

.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-locator/branch/develop/graph/badge.svg
  :target: https://codecov.io/gh/clinicedc/edc-locator

.. |downloads| image:: https://pepy.tech/badge/edc-locator
   :target: https://pepy.tech/project/edc-locator

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/clinicedc/edc-locator",
    "name": "edc-locator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "django Edc participant locator, CRF, clinicedc, clinical trials",
    "author": "Erik van Widenfelt",
    "author_email": "ew2789@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/86/1c/759fd149bf53a927224a2b1ccc3dab0e9e2d8120597e7d593508497902f4/edc-locator-0.3.45.tar.gz",
    "platform": null,
    "description": "|pypi| |actions| |codecov| |downloads|\n\nedc-locator\n-----------\n\nBase classes for participant locator form and processes\n\nOther edc modules will use ``get_locator_model`` and ``get_locator_model_cls`` to access the\nsubject locator model class. ``get_locator_model`` defaults to ``edc_locator.subject_locator``.\nIf you declare a custom locator model, add the name of the model to ``settings``\nin label_lower format::\n\n    # settings.py\n    SUBJECT_LOCATOR_MODEL=\"myapp.subject_locator\"\n\nWhen declaring a custom locator model, you may only need to declare a ``proxy`` model class.\n\nFor example:\n\n.. code-block:: python\n\n    # models.py\n    from edc_locator.models import SubjectLocator as BaseModel\n\n\n    class SubjectLocator(BaseModel):\n        class Meta:\n            proxy = True\n            verbose_name = \"Subject Locator\"\n            verbose_name_plural = \"Subject Locators\"\n\n.. code-block:: python\n\n    # forms.py\n    # use the form class from edc_locator\n\nUse the modeladmin mixin class ``SubjectLocatorModelAdminMixin``.  Since you only want one\nsubject locator model accessible through admin in your EDC, unregister the default subject locator\nbefore registering your custom modeladmin class.\n\n.. code-block:: python\n\n    # admin.py\n    edc_locator_admin.unregister(DefaultSubjectLocator)\n\n    @admin.register(SubjectLocator, site=intecomm_prn_admin)\n    class SubjectLocatorAdmin(\n        SubjectLocatorModelAdminMixin,\n        SiteModelAdminMixin,\n        ModelAdminSubjectDashboardMixin,\n        SimpleHistoryAdmin,\n    ):\n        pass\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/edc-locator.svg\n    :target: https://pypi.python.org/pypi/edc-locator\n\n.. |actions| image:: https://github.com/clinicedc/edc-locator/action/workflows/build.yml/badge.svg\n  :target: https://github.com/clinicedc/edc-locator/action/workflows/build.yml\n\n.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-locator/branch/develop/graph/badge.svg\n  :target: https://codecov.io/gh/clinicedc/edc-locator\n\n.. |downloads| image:: https://pepy.tech/badge/edc-locator\n   :target: https://pepy.tech/project/edc-locator\n",
    "bugtrack_url": null,
    "license": "GPL license, see LICENSE",
    "summary": "Base models, forms and admin for participant locator in clinicedc/edc projects",
    "version": "0.3.45",
    "project_urls": {
        "Homepage": "https://github.com/clinicedc/edc-locator"
    },
    "split_keywords": [
        "django edc participant locator",
        " crf",
        " clinicedc",
        " clinical trials"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "378c3bf8cc2850eabd087b441b60106b3312875bf107dacc4ea9adae07b9d619",
                "md5": "b76ce7761032b5a90dd1c6281a32efaf",
                "sha256": "2f21300681a766288eae8af8dfaa031259cb418d0bc221b8ec0f1b5efc3934d8"
            },
            "downloads": -1,
            "filename": "edc_locator-0.3.45-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b76ce7761032b5a90dd1c6281a32efaf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 55343,
            "upload_time": "2024-03-27T04:13:45",
            "upload_time_iso_8601": "2024-03-27T04:13:45.102122Z",
            "url": "https://files.pythonhosted.org/packages/37/8c/3bf8cc2850eabd087b441b60106b3312875bf107dacc4ea9adae07b9d619/edc_locator-0.3.45-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "861c759fd149bf53a927224a2b1ccc3dab0e9e2d8120597e7d593508497902f4",
                "md5": "956908ae2145944a85ffef5f0fbc916b",
                "sha256": "ddc245ba742e10668634201b1a06a1ba5928fa2c757ccb695eac243fe4f68e87"
            },
            "downloads": -1,
            "filename": "edc-locator-0.3.45.tar.gz",
            "has_sig": false,
            "md5_digest": "956908ae2145944a85ffef5f0fbc916b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 36130,
            "upload_time": "2024-03-27T04:13:47",
            "upload_time_iso_8601": "2024-03-27T04:13:47.205415Z",
            "url": "https://files.pythonhosted.org/packages/86/1c/759fd149bf53a927224a2b1ccc3dab0e9e2d8120597e7d593508497902f4/edc-locator-0.3.45.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-27 04:13:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "clinicedc",
    "github_project": "edc-locator",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "edc-locator"
}
        
Elapsed time: 0.22464s