ModelAdmin mixins to extend admin field sets
Project description
edc-fieldsets
ModelAdmin mixins to extend django.admin fieldsets atribute. The class Fieldset formats a data structure in the format of a django.fieldset.
For example:
from .fieldsets import fieldset, biosynex_fieldset
@admin.register(BloodResult, site=ambition_subject_admin)
class BloodResultsAdmin(CrfModelAdminMixin, admin.ModelAdmin):
form = BloodResultForm
conditional_fieldsets = {DAY1: biosynex_fieldset}
fieldsets_move_to_end = [
'Conclusion', 'Summary', 'Action', audit_fieldset_tuple[0]]
fieldsets = fieldset
radio_fields = ...
where fieldset is:
biosynex_fieldset = Fieldset(
'bios_crag',
'crag_control_result',
'crag_t1_result',
'crag_t2_result',
section='BIOSYNEX® CryptoPS (Semi-quantitative CrAg)')
fieldset = [(None, {'fields': ('subject_visit', 'report_datetime',)})]
fieldset.append(('Conclusion', {
'fields': ('results_abnormal', 'results_reportable')}))
fieldset.append(
('Summary', {'classes': ('collapse', ), 'fields': ('summary', )}))
fieldset.append(action_fieldset_tuple)
fieldset.append(audit_fieldset_tuple)
The conditional_fieldsets will only display for CRF completed at visit DAY1
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-fieldsets-0.3.10.tar.gz
(30.7 kB
view details)
Built Distribution
File details
Details for the file edc-fieldsets-0.3.10.tar.gz
.
File metadata
- Download URL: edc-fieldsets-0.3.10.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d70dac1ef6d1d93b132c347e8a638b8546263507c5cb316b836e04ae051dc83e |
|
MD5 | c42ce63f33025c170f545740ae3975e5 |
|
BLAKE2b-256 | b080568051f77427f3cb22328cc4f713e2260e8bb420b033966283230ca7581e |
File details
Details for the file edc_fieldsets-0.3.10-py3-none-any.whl
.
File metadata
- Download URL: edc_fieldsets-0.3.10-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a46eba8d20ea46c1882e275be74a255930f7effe366b0a346e2d19b61e08cf7 |
|
MD5 | 4b370863daafcbeb3b51e175b96929bb |
|
BLAKE2b-256 | cc3667dba94cd6fedd95e70dbee7b524e4b5987782b7a143855d6e9abe6de23e |