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-0.3.36.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

edc_locator-0.3.36-py3-none-any.whl (54.1 kB view details)

Uploaded Python 3

File details

Details for the file edc-locator-0.3.36.tar.gz.

File metadata

  • Download URL: edc-locator-0.3.36.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for edc-locator-0.3.36.tar.gz
Algorithm Hash digest
SHA256 74ea1bfc67422c80915d2a91785e5ca5e29bd4a58bf37ebf8e82bc4dffb1b203
MD5 88b7ed304d892c1a2e3c8c3e641a6d1d
BLAKE2b-256 94746c2a41a9ce825b537f4a14bb99eabe778d8e104dc3805cddc991df5da107

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edc_locator-0.3.36-py3-none-any.whl
Algorithm Hash digest
SHA256 6950b637fec6cab28121a5277fbb0b1f357cab76f18d706d4a46a484dc5f822b
MD5 9d96585df36c9e06abda4ba2e1a6f9c7
BLAKE2b-256 6c6a675b31a26a6372fe2060c5a31977af3ab234262c3fe2119120343ed32d3e

See more details on using hashes here.

Supported by

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