Skip to main content

Base models, forms and admin for participant locator in clinicedc/edc projects

Project description

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:

# 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"
# 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.

# admin.py
edc_locator_admin.unregister(DefaultSubjectLocator)

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

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

edc_locator-1.0.2.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edc_locator-1.0.2-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

Details for the file edc_locator-1.0.2.tar.gz.

File metadata

  • Download URL: edc_locator-1.0.2.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for edc_locator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 560678d2f212ce1957ea25366b7ecf6d8af460c93295f1abd6b12a5fd94ab496
MD5 0102a732de2340ba3c02f5d94fe94937
BLAKE2b-256 94464e58af17332318c0f236cdc8982f1a3da50af092d3e3d50e6dba6cdf9e0e

See more details on using hashes here.

File details

Details for the file edc_locator-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: edc_locator-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 57.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for edc_locator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3053474c0db248c47982d6e3e467991dde2c49c6d096340168f63c53ebd054bf
MD5 17525daa1d890a3a6d0336b7eaf9ee85
BLAKE2b-256 1e6241d660ec45597795fc985b5ca61ea55eb37530cc2225ecde55bb9fadc736

See more details on using hashes here.

Supported by

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