Samples App¶
The samples application models the uid.models.Sample objects views and
updates.
samples.forms¶
samples.forms module contents¶
Created on Thu Feb 7 15:38:46 2019
@author: Paolo Cozzi <cozzi@ibba.cnr.it>
-
class
samples.forms.UpdateSampleForm(sample, *args, **kwargs)[source]¶ Bases:
common.forms.RequestFormMixin,django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ('disabled_name', 'alternative_id', 'description', 'disabled_animal', 'protocol', 'collection_date', 'collection_place', 'collection_place_latitude', 'collection_place_longitude', 'collection_place_accuracy', 'organism_part', 'developmental_stage', 'physiological_stage', 'animal_age_at_collection', 'animal_age_at_collection_units', 'availability', 'storage', 'storage_processing', 'preparation_interval', 'preparation_interval_units')¶
-
model¶ alias of
uid.models.Sample
-
-
__init__(sample, *args, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
base_fields= {'alternative_id': <django.forms.fields.CharField object>, 'animal_age_at_collection': <django.forms.fields.IntegerField object>, 'animal_age_at_collection_units': <django.forms.fields.TypedChoiceField object>, 'availability': <django.forms.fields.CharField object>, 'collection_date': <django.forms.fields.DateField object>, 'collection_place': <django.forms.fields.CharField object>, 'collection_place_accuracy': <django.forms.fields.TypedChoiceField object>, 'collection_place_latitude': <django.forms.fields.FloatField object>, 'collection_place_longitude': <django.forms.fields.FloatField object>, 'description': <django.forms.fields.CharField object>, 'developmental_stage': <django.forms.models.ModelChoiceField object>, 'disabled_animal': <django.forms.fields.CharField object>, 'disabled_name': <django.forms.fields.CharField object>, 'organism_part': <django.forms.models.ModelChoiceField object>, 'physiological_stage': <django.forms.models.ModelChoiceField object>, 'preparation_interval': <django.forms.fields.IntegerField object>, 'preparation_interval_units': <django.forms.fields.TypedChoiceField object>, 'protocol': <django.forms.fields.CharField object>, 'storage': <django.forms.fields.TypedChoiceField object>, 'storage_processing': <django.forms.fields.TypedChoiceField object>}¶
-
clean()[source]¶ Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
-
declared_fields= {'disabled_animal': <django.forms.fields.CharField object>, 'disabled_name': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
samples.tasks¶
samples.tasks module contents¶
Created on Wed Feb 27 16:38:37 2019
@author: Paolo Cozzi <cozzi@ibba.cnr.it>
-
class
samples.tasks.BatchDeleteSamples(*args, **kwargs)[source]¶ Bases:
submissions.tasks.SubmissionTaskMixin,common.tasks.NotifyAdminTaskMixin,common.tasks.BaseTask-
action= 'batch delete samples'¶
-
description= 'Batch remove samples'¶
-
name= 'Batch delete samples'¶
-
-
class
samples.tasks.BatchUpdateSamples(*args, **kwargs)[source]¶ Bases:
submissions.tasks.BatchUpdateMixin,common.tasks.NotifyAdminTaskMixin,common.tasks.BaseTask-
action= 'batch update samples'¶
-
description= 'Batch update of field in samples'¶
-
item_cls¶ alias of
uid.models.Sample
-
name= 'Batch update samples'¶
-
samples.views¶
samples.views module contents¶
Created on Fri Feb 15 16:25:59 2019
@author: Paolo Cozzi <cozzi@ibba.cnr.it>
-
class
samples.views.DeleteSampleView(**kwargs)[source]¶ Bases:
common.views.DeleteMaterialMixin,django.views.generic.edit.DeleteView-
delete(request, *args, **kwargs)[source]¶ Calls the delete() method on the fetched object, does all stuff and then redirects to the success URL.
-
model¶ alias of
uid.models.Sample
-
template_name= 'samples/sample_confirm_delete.html'¶
-
-
class
samples.views.DetailSampleView(**kwargs)[source]¶ Bases:
common.views.DetailMaterialMixin,django.views.generic.detail.DetailView-
model¶ alias of
uid.models.Sample
-
template_name= 'samples/sample_detail.html'¶
-
-
class
samples.views.ListSampleView(**kwargs)[source]¶ Bases:
common.views.ListMaterialMixin,django.views.generic.list.ListView-
model¶ alias of
uid.models.Sample
-
ordering= ['submission']¶
-
paginate_by= 10¶
-
template_name= 'samples/sample_list.html'¶
-
-
class
samples.views.UpdateSampleView(**kwargs)[source]¶ Bases:
common.views.UpdateMaterialMixin,django.views.generic.edit.UpdateView-
form_class¶ alias of
samples.forms.UpdateSampleForm
-
model¶ alias of
uid.models.Sample
-
template_name= 'samples/sample_form.html'¶
-
validationresult_class¶ alias of
validation.models.ValidationResult
-