Base models, forms and admin for participant locator in clinicedc/edc projects
Project description
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
Built Distribution
File details
Details for the file edc-locator-0.3.45.tar.gz
.
File metadata
- Download URL: edc-locator-0.3.45.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddc245ba742e10668634201b1a06a1ba5928fa2c757ccb695eac243fe4f68e87 |
|
MD5 | 956908ae2145944a85ffef5f0fbc916b |
|
BLAKE2b-256 | 861c759fd149bf53a927224a2b1ccc3dab0e9e2d8120597e7d593508497902f4 |
File details
Details for the file edc_locator-0.3.45-py3-none-any.whl
.
File metadata
- Download URL: edc_locator-0.3.45-py3-none-any.whl
- Upload date:
- Size: 55.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f21300681a766288eae8af8dfaa031259cb418d0bc221b8ec0f1b5efc3934d8 |
|
MD5 | b76ce7761032b5a90dd1c6281a32efaf |
|
BLAKE2b-256 | 378c3bf8cc2850eabd087b441b60106b3312875bf107dacc4ea9adae07b9d619 |