edc-locator


Nameedc-locator JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/clinicedc/edc-locator
SummaryBase models, forms and admin for participant locator in clinicedc/edc projects
upload_time2025-01-22 03:29:58
maintainerNone
docs_urlNone
authorErik van Widenfelt
requires_python>=3.12
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.12",
    "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/94/46/4e58af17332318c0f236cdc8982f1a3da50af092d3e3d50e6dba6cdf9e0e/edc_locator-1.0.2.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": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/clinicedc/edc-locator"
    },
    "split_keywords": [
        "django edc participant locator",
        " crf",
        " clinicedc",
        " clinical trials"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e6241d660ec45597795fc985b5ca61ea55eb37530cc2225ecde55bb9fadc736",
                "md5": "17525daa1d890a3a6d0336b7eaf9ee85",
                "sha256": "3053474c0db248c47982d6e3e467991dde2c49c6d096340168f63c53ebd054bf"
            },
            "downloads": -1,
            "filename": "edc_locator-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "17525daa1d890a3a6d0336b7eaf9ee85",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 56994,
            "upload_time": "2025-01-22T03:29:57",
            "upload_time_iso_8601": "2025-01-22T03:29:57.330897Z",
            "url": "https://files.pythonhosted.org/packages/1e/62/41d660ec45597795fc985b5ca61ea55eb37530cc2225ecde55bb9fadc736/edc_locator-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "94464e58af17332318c0f236cdc8982f1a3da50af092d3e3d50e6dba6cdf9e0e",
                "md5": "0102a732de2340ba3c02f5d94fe94937",
                "sha256": "560678d2f212ce1957ea25366b7ecf6d8af460c93295f1abd6b12a5fd94ab496"
            },
            "downloads": -1,
            "filename": "edc_locator-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0102a732de2340ba3c02f5d94fe94937",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 36273,
            "upload_time": "2025-01-22T03:29:58",
            "upload_time_iso_8601": "2025-01-22T03:29:58.634127Z",
            "url": "https://files.pythonhosted.org/packages/94/46/4e58af17332318c0f236cdc8982f1a3da50af092d3e3d50e6dba6cdf9e0e/edc_locator-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-22 03:29:58",
    "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: 4.51214s