4.2.1. fpiweb package¶
Subpackages¶
- fpiweb.migrations package
- Submodules
- fpiweb.migrations.0001_initial module
- fpiweb.migrations.0002_auto_20190324_0332 module
- fpiweb.migrations.0003_constraints_constraintdescr module
- fpiweb.migrations.0004_auto_20190330_0215 module
- fpiweb.migrations.0005_auto_20190403_0205 module
- fpiweb.migrations.0006_auto_20190406_1711 module
- fpiweb.migrations.0007_auto_20190406_1717 module
- fpiweb.migrations.0008_auto_20190406_1737 module
- fpiweb.migrations.0009_auto_20190410_0118 module
- fpiweb.migrations.0010_auto_20190415_0404 module
- fpiweb.migrations.0011_auto_20190415_0430 module
- fpiweb.migrations.0012_auto_20190419_2341 module
- fpiweb.migrations.0013_auto_20190420_1612 module
- fpiweb.migrations.0014_auto_20190523_2043 module
- fpiweb.migrations.0015_box_print_box_number_label module
- fpiweb.migrations.0016_remove_box_print_box_number_label module
- fpiweb.migrations.0017_location_locbin_locrow_loctier_profile module
- fpiweb.migrations.0018_profile_active_location module
- fpiweb.migrations.0019_pallet_tables_and_tweaks module
- fpiweb.migrations.0020_auto_20191021_2016 module
- fpiweb.migrations.0021_auto_20191022_2113 module
- fpiweb.migrations.0022_consolidate_location_fields module
- fpiweb.migrations.0023_auto_20200102_2045 module
- fpiweb.migrations.0024_change_pallet_handling module
- fpiweb.migrations.0025_restore_pallet_box_number_tweak_activity module
- fpiweb.migrations.0026_auto_20200210_2015 module
- fpiweb.migrations.0027_set_constraint_name_choices module
- fpiweb.migrations.0028_add_activity_adj_code module
- fpiweb.migrations.0029_add_model_permissions module
- fpiweb.support package
- fpiweb.templatetags package
- fpiweb.tests package
Submodules¶
fpiweb.admin module¶
Admin.py - Identify what can be managed by administrators.
-
class
fpiweb.admin.ActivityAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'box_number', 'date_filled', 'date_consumed', 'adjustment_code')¶
-
list_filter= ('adjustment_code',)¶
-
property
media¶
-
-
class
fpiweb.admin.BoxAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'box_number', 'box_type', 'location', 'quantity', 'product')¶
-
list_filter= ('box_type',)¶
-
property
media¶
-
-
class
fpiweb.admin.BoxTypeAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('box_type_code', 'box_type_descr', 'box_type_qty')¶
-
property
media¶
-
-
class
fpiweb.admin.ConstraintsAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('constraint_name', 'constraint_type', 'constraint_min', 'constraint_max', 'constraint_list')¶
-
property
media¶
-
-
class
fpiweb.admin.LocBinAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('loc_bin', 'loc_bin_descr')¶
-
property
media¶
-
-
class
fpiweb.admin.LocRowAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('loc_row', 'loc_row_descr')¶
-
property
media¶
-
-
class
fpiweb.admin.LocTierAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('loc_tier', 'loc_tier_descr')¶
-
property
media¶
-
-
class
fpiweb.admin.Location(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('pk', 'loc_row', 'loc_bin', 'loc_tier')¶
-
list_filter= ('loc_row', 'loc_bin', 'loc_tier')¶
-
property
media¶
-
-
class
fpiweb.admin.PalletAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('pk', 'name')¶
-
property
media¶
-
-
class
fpiweb.admin.PalletBoxAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('box_number', 'pallet', 'box', 'product', 'exp_year', 'exp_month_start', 'exp_month_end')¶
-
property
media¶
-
fpiweb.apps module¶
fpiweb.code_reader module¶
fpiweb.constants module¶
Global constants, constructs and exceptions for this project.
Constants and constructs that don’t have an obvious home elsewhere are defined here.
Non-Django-based exceptions are defined here.
-
fpiweb.constants.CURRENT_YEAR= 2021¶ The current year - used for validating expiration dates
-
exception
fpiweb.constants.InternalError(message, code=None, params=None)[source]¶ Bases:
fpiweb.constants.ProjectErrorThe error is raised when there is some interal logic problem.
-
exception
fpiweb.constants.InvalidActionAttemptedError(message, code=None, params=None)[source]¶ Bases:
fpiweb.constants.ProjectErrorA requested action cannot be done at this time.
-
exception
fpiweb.constants.InvalidValueError(message, code=None, params=None)[source]¶ Bases:
fpiweb.constants.ProjectErrorUsed when an invalid value has been passed as a parameter.
-
exception
fpiweb.constants.ProjectError(message, code=None, params=None)[source]¶ Bases:
django.core.exceptions.ValidationErrorAll exceptions unique to this project wil be based on this class.
-
class
fpiweb.constants.ValidOrErrorResponse(is_valid: bool = True, error_msg_list: List[str] = <factory>)[source]¶ Bases:
objectA constructed response denoting either valid or has error messages.
-
add_error(msg: str)[source]¶ Set as invalid and add an error message.
- Parameters
msg – error message to add
- Returns
-
error_msg_list: List[str]¶
-
is_valid: bool = True¶
-
fpiweb.forms module¶
forms.py - provide validation of a forms.
-
class
fpiweb.forms.BoxItemForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormForm for the Box as it appears as part of a formset on the Build Pallet page
-
base_fields= {'box_number': <fpiweb.forms.BoxNumberField object>, 'exp_month_end': <django.forms.fields.IntegerField object>, 'exp_month_start': <django.forms.fields.IntegerField object>, 'exp_year': <django.forms.fields.TypedChoiceField object>, 'product': <django.forms.models.ModelChoiceField 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= {'box_number': <fpiweb.forms.BoxNumberField object>, 'exp_month_end': <django.forms.fields.IntegerField object>, 'exp_month_start': <django.forms.fields.IntegerField object>, 'exp_year': <django.forms.fields.TypedChoiceField object>, 'product': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.BoxTypeForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormA form to use whenever a box type selection is needed.
-
base_fields= {'box_type': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'box_type': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.BuildPalletForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ('loc_row', 'loc_bin', 'loc_tier')¶
-
model¶ alias of
fpiweb.models.Location
-
-
base_fields= {'loc_bin': <django.forms.models.ModelChoiceField object>, 'loc_row': <django.forms.models.ModelChoiceField object>, 'loc_tier': <django.forms.models.ModelChoiceField 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= {}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.ConfirmMergeForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
ACTION_CHANGE_LOCATION= 'C'¶
-
ACTION_CHOICES= (('C', 'Change To Location'), ('M', 'Merge Pallets'))¶
-
ACTION_MERGE_PALLETS= 'M'¶
-
base_fields= {'action': <django.forms.fields.ChoiceField object>, 'boxes_at_to_location': <django.forms.fields.IntegerField object>, 'from_location': <django.forms.models.ModelChoiceField object>, 'to_location': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'action': <django.forms.fields.ChoiceField object>, 'boxes_at_to_location': <django.forms.fields.IntegerField object>, 'from_location': <django.forms.models.ModelChoiceField object>, 'to_location': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ConstraintsForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelFormManage Constraint details with a generic form.
-
class
Meta[source]¶ Bases:
objectAdditional info to help Django provide intelligent defaults.
-
fields= ['id', 'constraint_name', 'constraint_descr', 'constraint_type', 'constraint_min', 'constraint_max', 'constraint_list']¶
-
model¶ alias of
fpiweb.models.Constraints
-
-
base_fields= {'constraint_descr': <django.forms.fields.CharField object>, 'constraint_list': <django.forms.fields.CharField object>, 'constraint_max': <django.forms.fields.CharField object>, 'constraint_min': <django.forms.fields.CharField object>, 'constraint_name': <django.forms.fields.TypedChoiceField object>, 'constraint_type': <django.forms.fields.ChoiceField object>}¶
-
declared_fields= {'constraint_list': <django.forms.fields.CharField object>, 'constraint_max': <django.forms.fields.CharField object>, 'constraint_min': <django.forms.fields.CharField object>, 'constraint_type': <django.forms.fields.ChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
static
validate_constraint_fields(con_name: str, con_descr: str, con_type: ‘Int-MM’, ‘Integer Min/Max’, ‘Char-MM’, ‘Character Min/Max’, ‘Int-List’, ‘Integer Valid List’, ‘Char-List’, ‘Character Valid List’, con_min: Union[str, int], con_max: Union[str, int], con_list: str)[source]¶ Validate the various constraint record fields.
- Parameters
con_name – name of constraint
con_type – type of constraint
con_min – minimum value, if given
con_max – maximum value, if given
con_list – list of values, if given
- Returns
-
class
-
class
fpiweb.forms.EmptyBoxNumberField(**kwargs)[source]¶ Bases:
fpiweb.forms.ExtantBoxNumberFieldChecks whether there’s a Box with the specified box number in the database. If a matching Box is found, this Box is stored in the field’s box attribute
-
class
fpiweb.forms.EmptyBoxNumberForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'box_number': <fpiweb.forms.EmptyBoxNumberField object>}¶
-
declared_fields= {'box_number': <fpiweb.forms.EmptyBoxNumberField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExistingBoxTypeForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
fpiweb.forms.BoxTypeFormA form to validate that the box type exists.
-
base_fields= {'box_type': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'box_type': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExistingLocationForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
fpiweb.forms.LocationForm-
base_fields= {'loc_bin': <django.forms.models.ModelChoiceField object>, 'loc_row': <django.forms.models.ModelChoiceField object>, 'loc_tier': <django.forms.models.ModelChoiceField 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= {}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExistingLocationWithBoxesForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
fpiweb.forms.ExistingLocationForm-
base_fields= {'loc_bin': <django.forms.models.ModelChoiceField object>, 'loc_row': <django.forms.models.ModelChoiceField object>, 'loc_tier': <django.forms.models.ModelChoiceField 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= {}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExistingProductForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
fpiweb.forms.ProductForm-
base_fields= {'product': <django.forms.models.ModelChoiceField 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= {'product': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExpMoEndForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormA form for use whenever you need to select an ending month.
-
base_fields= {'exp_month_end': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields= {'exp_month_end': <django.forms.fields.TypedChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
valid_months= [(0, 'No Label'), ('1', 'Jan'), ('2', 'Feb'), ('3', 'Mar'), ('4', 'Apr'), ('5', 'May'), ('6', 'Jun'), ('7', 'Jul'), ('8', 'Aug'), ('9', 'Sep'), ('10', 'Oct'), ('11', 'Nov'), ('12', 'Dec')]¶
-
-
class
fpiweb.forms.ExpMoStartForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormA form for use whenever you need to select a starting month.
-
base_fields= {'exp_month_start': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields= {'exp_month_start': <django.forms.fields.TypedChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
valid_months= [(0, 'No Label'), ('1', 'Jan'), ('2', 'Feb'), ('3', 'Mar'), ('4', 'Apr'), ('5', 'May'), ('6', 'Jun'), ('7', 'Jul'), ('8', 'Aug'), ('9', 'Sep'), ('10', 'Oct'), ('11', 'Nov'), ('12', 'Dec')]¶
-
-
class
fpiweb.forms.ExpYearForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormA form for use whenever you need to select a year.
-
base_fields= {'exp_year': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields= {'exp_year': <django.forms.fields.TypedChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ExtantBoxNumberField(**kwargs)[source]¶ Bases:
fpiweb.forms.RelaxedBoxNumberFieldChecks whether there’s a Box with the specified box number in the database. If a matching Box is found, this Box is stored in the field’s box attribute
-
class
fpiweb.forms.ExtantBoxNumberForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'box_number': <fpiweb.forms.ExtantBoxNumberField object>}¶
-
declared_fields= {'box_number': <fpiweb.forms.ExtantBoxNumberField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.FillBoxForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ['product', 'exp_year', 'exp_month_start', 'exp_month_end']¶
-
model¶ alias of
fpiweb.models.Box
-
-
base_fields= {'exp_month_end': <django.forms.fields.TypedChoiceField object>, 'exp_month_start': <django.forms.fields.TypedChoiceField object>, 'exp_year': <django.forms.fields.TypedChoiceField object>, 'product': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'exp_month_end': <django.forms.fields.TypedChoiceField object>, 'exp_month_start': <django.forms.fields.TypedChoiceField object>, 'exp_year': <django.forms.fields.TypedChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.FilledBoxNumberField(**kwargs)[source]¶ Bases:
fpiweb.forms.ExtantBoxNumberFieldChecks whether there’s a Box with the specified box number in the database. If a matching Box is found, this Box is stored in the field’s box attribute
-
class
fpiweb.forms.FilledBoxNumberForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'box_number': <fpiweb.forms.FilledBoxNumberField object>}¶
-
declared_fields= {'box_number': <fpiweb.forms.FilledBoxNumberField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.HiddenPalletForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'pallet': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'pallet': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.Html5DateInput(attrs=None, format=None)[source]¶ Bases:
django.forms.widgets.DateInput-
input_type= 'date'¶
-
property
media¶
-
-
class
fpiweb.forms.LocBinForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelFormManage Loction bin details with a generic form.
-
class
Meta[source]¶ Bases:
objectAdditional info to help Django provide intelligent defaults.
-
fields= ['id', 'loc_bin', 'loc_bin_descr']¶
-
model¶ alias of
fpiweb.models.LocBin
-
-
base_fields= {'loc_bin': <django.forms.fields.CharField object>, 'loc_bin_descr': <django.forms.fields.CharField object>}¶
-
declared_fields= {'loc_bin': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.LocRowForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelFormManage Loction row details with a generic form.
-
class
Meta[source]¶ Bases:
objectAdditional info to help Django provide intelligent defaults.
-
fields= ['id', 'loc_row', 'loc_row_descr']¶
-
model¶ alias of
fpiweb.models.LocRow
-
-
base_fields= {'loc_row': <django.forms.fields.CharField object>, 'loc_row_descr': <django.forms.fields.CharField object>}¶
-
declared_fields= {'loc_row': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.LocTierForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelFormManage Loction tier details with a generic form.
-
class
Meta[source]¶ Bases:
objectAdditional info to help Django provide intelligent defaults.
-
fields= ['id', 'loc_tier', 'loc_tier_descr']¶
-
model¶ alias of
fpiweb.models.LocTier
-
-
base_fields= {'loc_tier': <django.forms.fields.CharField object>, 'loc_tier_descr': <django.forms.fields.CharField object>}¶
-
declared_fields= {'loc_tier': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.LocationForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelFormA form for use whenever you need to select row, bin, and tier
-
class
Meta[source]¶ Bases:
object-
fields= ('loc_row', 'loc_bin', 'loc_tier')¶
-
model¶ alias of
fpiweb.models.Location
-
-
base_fields= {'loc_bin': <django.forms.models.ModelChoiceField object>, 'loc_row': <django.forms.models.ModelChoiceField object>, 'loc_tier': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.LoginForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.LogoutForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'username': <django.forms.fields.CharField object>}¶
-
declared_fields= {'username': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.MoveToLocationForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
fpiweb.forms.ExistingLocationForm-
base_fields= {'from_location': <django.forms.models.ModelChoiceField object>, 'loc_bin': <django.forms.models.ModelChoiceField object>, 'loc_row': <django.forms.models.ModelChoiceField object>, 'loc_tier': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'from_location': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.NewBoxForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ['box_number', 'box_type']¶
-
model¶ alias of
fpiweb.models.Box
-
-
base_fields= {'box_number': <django.forms.fields.CharField object>, 'box_type': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'box_number': <django.forms.fields.CharField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.NewBoxNumberField(**kwargs)[source]¶ Bases:
fpiweb.forms.RelaxedBoxNumberFieldAdd a new box number to the database.
Checks whether there’s a Box with the specified box number in the database. If a matching Box is not found, store the box number in the field’s box attribute
-
class
fpiweb.forms.NewBoxNumberForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'box_number': <fpiweb.forms.NewBoxNumberField object>}¶
-
declared_fields= {'box_number': <fpiweb.forms.NewBoxNumberField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.PalletNameForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
fields= ('name',)¶
-
model¶ alias of
fpiweb.models.Pallet
-
-
base_fields= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields= {}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
class
-
class
fpiweb.forms.PalletSelectForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'pallet': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'pallet': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.PrintLabelsForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= {'number_to_print': <django.forms.fields.IntegerField object>, 'starting_number': <django.forms.fields.IntegerField object>}¶
-
declared_fields= {'number_to_print': <django.forms.fields.IntegerField object>, 'starting_number': <django.forms.fields.IntegerField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.ProductForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.FormA form for use whenever you need to select a product.
-
base_fields= {'product': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'product': <django.forms.models.ModelChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
fpiweb.forms.RelaxedBoxNumberField(**kwargs)[source]¶ Bases:
django.forms.fields.CharFieldDefine box nummber field that allows all numberics.
Accepts box number with or without BOX prefix. Returns BoxNumber with BOX prefix and leading zeros
-
fpiweb.forms.none_or_int(text: str) → Optional[int][source]¶ Convert test to a valid integer or None.
- Parameters
text –
- Returns
-
fpiweb.forms.none_or_list(text: str) → Optional[list][source]¶ Convert text to list or None.
- Parameters
text –
- Returns
-
fpiweb.forms.none_or_str(text: str) → Optional[str][source]¶ Convert text to non-empty string or None.
- Parameters
text –
- Returns
-
fpiweb.forms.validate_exp_month_start_end(exp_month_start: Optional[int], exp_month_end: Optional[int]) → bool[source]¶ Validate the start and end month, if given.
- Parameters
exp_month_start – number 1-12 (integer or string)
exp_month_end – number 1-12 (integer or string)
- Returns
-
fpiweb.forms.validate_int_list(char_list: list) → bool[source]¶ Verify that all values in the list are integers.
- Parameters
text –
- Returns
-
fpiweb.forms.validation_exp_months_bool(exp_month_start: Optional[int], exp_month_end: Optional[int]) → fpiweb.constants.ValidOrErrorResponse[source]¶ Validate the expiration months returning only a boolean.
- Parameters
exp_month_start –
exp_month_end –
- Returns
True if valid, False if not
fpiweb.models module¶
models.py - Define the database tables using ORM models.
-
class
fpiweb.models.Activity(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelActivity (history) from the past.
-
ADJUSTMENT_CODE_CHOICES: list = (('Fill Emptied', 'Fill emptied previous contents'), ('Move Added', 'Move added box'), ('Move Consumed', 'Move consumed the box'), ('Consume Added', 'Consume added box'), ('Consume Emptied', 'Consume emptied previous contents'))¶
-
CONSUME_ADDED: str = 'Consume Added'¶
-
CONSUME_EMPTIED: str = 'Consume Emptied'¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
FILL_EMPTIED: str = 'Fill Emptied'¶
-
MOVE_ADDED: str = 'Move Added'¶
-
MOVE_CONSUMED: str = 'Move Consumed'¶
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
adjustment_code¶ Coded reason if this entry was adjusted
-
adjustment_code_help_text= 'Coded reason if this entry was adjusted'¶
-
box_number¶ Box number on box at time of consumption.
-
box_number_help_text= 'Box number on box at time of consumption.'¶
-
box_type¶ Box type holding consumed product.
-
box_type_help_text= 'Box type holding consumed product.'¶
-
date_consumed¶ Date product was consumed.
-
date_consumed_help_text= 'Date product was consumed.'¶
-
date_filled¶ Approximate date product was put in the box.
-
date_filled_help_text= 'Approximate date product was put in the box.'¶
-
duration¶ Number of days between date box was filled and consumed.
-
duration_help_text= 'Number of days between date box was filled and consumed.'¶
-
exp_month_end¶ Optional ending month product would have expired.
-
exp_month_end_help_text= 'Optional ending month product would have expired.'¶
-
exp_month_start¶ Optional starting month product would have expired.
-
exp_month_start_help_text= 'Optional starting month product would have expired.'¶
-
exp_year¶ Year product would have expired.
-
exp_year_help_text= 'Year product would have expired.'¶
-
get_adjustment_code_display(*, field=<django.db.models.fields.CharField: adjustment_code>)¶
-
get_next_by_date_filled(*, field=<django.db.models.fields.DateField: date_filled>, is_next=True, **kwargs)¶
-
get_previous_by_date_filled(*, field=<django.db.models.fields.DateField: date_filled>, is_next=False, **kwargs)¶
-
id¶ Internal record identifier for an activity.
-
id_help_text= 'Internal record identifier for an activity.'¶
-
loc_bin¶ Bin box was in at the time product was consumed.
-
loc_bin_help_text= 'Bin box was in at the time product was consumed.'¶
-
loc_row¶ Row box was in at the time product was consumed.
-
loc_row_help_text= 'Row box was in at the time product was consumed.'¶
-
loc_tier¶ Tier box was in at the time product was consumed.
-
loc_tier_help_text= 'Tier box was in at the time product was consumed.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
prod_cat_name¶ Category of product consumed.
-
prod_cat_name_help_text= 'Category of product consumed.'¶
-
prod_name¶ Product contained in box at time of consumption.
-
prod_name_help_text= 'Product contained in box at time of consumption.'¶
-
quantity¶ Approximate number of items in the box when it was filled.
-
quantity_help_text= 'Approximate number of items in the box when it was filled.'¶
-
-
class
fpiweb.models.Box(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelBox or container for product.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
box_number¶ Number printed in the label on the box.
-
box_number_help_text= 'Number printed in the label on the box.'¶
-
box_number_max_length= 8¶
-
box_number_min_length= 8¶
-
box_type¶ Type of box with this number.
-
box_type_help_text= 'Type of box with this number.'¶
-
box_type_id¶
-
date_filled¶ Approximate date box was filled, if filled.
-
date_filled_help_text= 'Approximate date box was filled, if filled.'¶
-
exp_month_end¶ Optional emding month range of when the product expires, if filled.
-
exp_month_end_help_text= 'Optional ending month range of when the product expires, if filled.'¶
-
exp_month_start¶ Optional starting month range of when the product expires, if filled.
-
exp_month_start_help_text= 'Optional starting month range of when the product expires, if filled.'¶
-
exp_year¶ Year the product expires, if filled.
-
exp_year_help_text= 'Year the product expires, if filled.'¶
-
id¶ Internal record identifier for box.
-
id_help_text= 'Internal record identifier for box.'¶
-
location¶ Location of box
-
location_help_text= 'Location of box'¶
-
location_id¶
-
objects= <django.db.models.manager.Manager object>¶
-
palletbox_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
product¶ Product contained in this box, if filled.
-
product_help_text= 'Product contained in this box, if filled.'¶
-
product_id¶
-
quantity¶ Approximate or default number of items in the box, if filled.
-
quantity_help_text= 'Approximate or default number of items in the box, if filled.'¶
-
exception
-
class
fpiweb.models.BoxNumber[source]¶ Bases:
object-
box_number_regex= re.compile('^BOX\\d{5}$')¶
-
box_number_search_regex= re.compile('box\\d{5}', re.IGNORECASE)¶
-
-
class
fpiweb.models.BoxType(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelType of box (Evan’s boxes, large boxes, etc.) and default quantity.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
box_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
box_type_code¶ Type of box (code or shorthand).
-
box_type_code_help_text= 'Type of box (code or shorthand).'¶
-
box_type_descr¶ Type of box (description).
-
box_type_descr_help_text= 'Type of box (description).'¶
-
box_type_qty¶ Number of items (usually cans) that can typically fix in this box.
-
box_type_qty_help_text= 'Number of items (usually cans) that can typically fix in this box.'¶
-
id¶ Internal record identifier for box type.
-
id_help_text= 'Internal record identifier for box type.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
fpiweb.models.Constraints(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelConstraints of valid values.
-
BIN: str = 'Bin'¶
-
CHAR_LIST= 'Char-List'¶
-
CHAR_RANGE= 'Char-MM'¶
-
CONSTRAINT_NAME_CHOICES= (('Row', 'Rows in the warehouse'), ('Bin', 'Bins in the Warehouse'), ('Tier', 'Tiers in the Warehouse'), ('Location Exclusions ', 'Warehouse locations excluded from inventory'), ('Quantity Limit', 'Typical count of items in a box'), ('Future Expiration Year Limit', 'Maximum years of future expiration permitted'))¶
-
CONSTRAINT_TYPE_CHOICES= (('Int-MM', 'Integer Min/Max'), ('Char-MM', 'Character Min/Max'), ('Int-List', 'Integer Valid List'), ('Char-List', 'Character Valid List'))¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
FUTURE_EXP_YEAR_LIMIT= 'Future Expiration Year Limit'¶
-
INT_LIST= 'Int-List'¶
-
INT_RANGE= 'Int-MM'¶
-
LOCATION_EXCLUSIONS= 'Location Exclusions '¶
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
QUANTITY_LIMIT: str = 'Quantity Limit'¶
-
ROW: str = 'Row'¶
-
TIER: str = 'Tier'¶
-
constraint_descr¶ Description of this constraint.
-
constraint_descr_help_text= 'Description of this constraint.'¶
-
constraint_list¶ If a list, what are the valid values?
-
constraint_list_help_text= 'If a list, what are the valid values?'¶
-
constraint_max¶ If a range, what is the maximum valid value?
-
constraint_max_help_text= 'If a range, what is the maximum valid value?'¶
-
constraint_min¶ If a range, what is the minimum valid value?
-
constraint_min_help_text= 'If a range, what is the minimum valid value?'¶
-
constraint_name¶ Coded name of a constraint.
-
constraint_name_help_text= 'Coded name of a constraint.'¶
-
constraint_type¶ Type of constraint (integer or character, list or range).
-
constraint_type_help_text= 'Type of constraint (integer or character, list or range).'¶
-
get_constraint_name_display(*, field=<django.db.models.fields.CharField: constraint_name>)¶
-
get_constraint_type_display(*, field=<django.db.models.fields.CharField: constraint_type>)¶
-
id¶ Internal record identifier for a constraint.
-
id_help_text= 'Internal record identifier for a constraint.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
-
class
fpiweb.models.LocBin(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelLocation Bin in warehouse.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ Internal record identifier for the location bin.
-
id_help_text= 'Internal record id for location bin.'¶
-
loc_bin¶ Location Bin Designation
-
loc_bin_descr¶ Location Bin Description
-
loc_bin_descr_help_text= 'Location bin description'¶
-
loc_bin_descr_max_length= 20¶
-
loc_bin_help_text= 'Location bin designation'¶
-
loc_bin_max_length= 2¶
-
loc_bin_min_length= 2¶
-
location_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
fpiweb.models.LocRow(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelLocation Row in warehouse.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ Internal record identifier for the location row.
-
id_help_text= 'Internal record id for location row.'¶
-
loc_row¶ Location Row Designation
-
loc_row_descr¶ Location Row Description
-
loc_row_descr_help_text= 'Location row description'¶
-
loc_row_descr_max_length= 20¶
-
loc_row_help_text= 'Location row designation'¶
-
loc_row_max_length= 2¶
-
loc_row_min_length= 2¶
-
location_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
fpiweb.models.LocTier(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelLocation Tier in warehouse.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ Internal record identifier for the location tier.
-
id_help_text= 'Internal record id for location tier.'¶
-
loc_tier¶ Location Tier Designation
-
loc_tier_descr¶ Location Tier Description
-
loc_tier_descr_help_text= 'Location tier description'¶
-
loc_tier_descr_max_length= 20¶
-
loc_tier_help_text= 'Location tier designation'¶
-
loc_tier_max_length= 2¶
-
loc_tier_min_length= 2¶
-
location_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
fpiweb.models.Location(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelLocation for a filled box or other container.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
box_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
static
get_location(loc_row: Union[fpiweb.models.LocRow, int, str], loc_bin: Union[fpiweb.models.LocBin, int, str], loc_tier: Union[fpiweb.models.LocTier, int, str])[source]¶ This method originated as convenient way to retrieve a Location from the database inside a test. :param loc_row: :param loc_bin: :param loc_tier: :return: Location or None
-
id¶ Internal record identifier for location.
-
id_help_text= 'Internal record identifier for location.'¶
-
loc_bin¶ Bin indicator of this location.
-
loc_bin_help_text= 'Loc bin'¶
-
loc_bin_id¶
-
loc_code¶ Coded Location.
-
loc_code_help_text= 'Location code'¶
-
loc_code_max_length= 12¶
-
loc_descr¶ Location description.
-
loc_descr_help_text= 'Location description'¶
-
loc_descr_max_length= 25¶
-
loc_in_warehouse¶ Is this location inside the warehouse?
-
loc_in_warehouse_help_text= 'In warehouse?'¶
-
loc_row¶ Row indicator of this location.
-
loc_row_help_text= 'Loc row'¶
-
loc_row_id¶
-
loc_tier¶ Tier indicator of this location.
-
loc_tier_help_text= 'Loc tier'¶
-
loc_tier_id¶
-
objects= <django.db.models.manager.Manager object>¶
-
pallet_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
fpiweb.models.Pallet(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelTemporary file to build up a list of boxes on a pallet.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
FILL: str = 'Fill'¶
-
MERGE: str = 'Merge'¶
-
MOVE: str = 'Move'¶
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PALLET_STATUS_CHOICES= (('Fill', 'Fill pallet for new location'), ('Merge', 'Merging boxes on pallet'), ('Move', 'Moving boxes to new location'))¶
-
boxes¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
get_pallet_status_display(*, field=<django.db.models.fields.CharField: pallet_status>)¶
-
id¶ Internal record identifier for a pallet.
-
id_help_text= 'Internal record identifier for a pallet.'¶
-
location¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
location_id¶
-
name¶ Name of pallet.
-
name_help_text= 'Name of pallet'¶
-
objects= <django.db.models.manager.Manager object>¶
-
pallet_status¶ Current status of pallet
-
pallet_status_help_text= 'Current status of pallet.'¶
-
profile_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
fpiweb.models.PalletBox(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelTemporary file to hold the individual boxes for a pallet. The goal of this is to ensure that either a Box record has product, expiration, and location or it has no product, no expiration, and no location.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
MOVE: str = 'Move'¶
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
NEW: str = 'New'¶
-
ORIGINAL: str = 'Original'¶
-
PALLET_BOX_STATUS_CHOICES= (('New', 'New box added'), ('Original', 'Box already here'), ('Move', 'Box being moved'))¶
-
box¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
box_help_text= 'Internal record identifier for a box.'¶
-
box_id¶
-
box_number¶ Number printed in the label on the box.
-
box_status¶ Box on pallet status
-
box_status_help_text= 'Box on pallet status.'¶
-
exp_month_end¶ Optional emding month range of when the product expires, if filled.
-
exp_month_end_help_text= 'Optional ending month range of when the product expires, if filled.'¶
-
exp_month_start¶ Optional starting month range of when the product expires, if filled.
-
exp_month_start_help_text= 'Optional starting month range of when the product expires, if filled.'¶
-
exp_year¶ Year the product expires, if filled.
-
exp_year_help_text= 'Year the product expires, if filled.'¶
-
get_box_status_display(*, field=<django.db.models.fields.CharField: box_status>)¶
-
id¶ Internal record identifier for a pallet box.
-
id_help_text= 'Internal record identifier for a pallet box.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
pallet¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
pallet_help_text= 'Internal record identifier for a pallet.'¶
-
pallet_id¶
-
product¶ Product contained in this box, if filled.
-
product_help_text= 'Product contained in this box, if filled.'¶
-
product_id¶
-
exception
-
class
fpiweb.models.Product(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelProduct name and attributes. Oranges, Pineapple, Mixed Fruit are products within the Fruits category
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
box_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
id¶ Internal record identifier for product.
-
id_help_text= 'Internal record identifier for product.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
palletbox_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
prod_cat¶ Product category associated with this product.
-
prod_cat_help_text= 'Product category associated with this product.'¶
-
prod_cat_id¶
-
prod_name¶ Name of this product.
-
prod_name_help_text= 'Name of this product.'¶
-
productexample_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
fpiweb.models.ProductCategory(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelCategory or group of product. i.e. Tomato Soup, Canned Pasta, Fruits
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ Internal record identifier for product category.
-
id_help_text= 'Internal record identifier for product category.'¶
-
objects= <django.db.models.manager.Manager object>¶
-
prod_cat_descr¶ Description of this product category.
-
prod_cat_descr_help_text= 'Description of this product category.'¶
-
prod_cat_name¶ Name of this product category.
-
prod_cat_name_help_text= 'Name of this product category.'¶
-
product_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
exception
-
class
fpiweb.models.ProductExample(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelExamples of items that go into a labeled product.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id¶ Internal reccord identifier for product example
-
id_help_text= 'Internal record identifier for product example'¶
-
objects= <django.db.models.manager.Manager object>¶
-
prod_example_name¶ Name of example product.
-
prod_example_name_help_text= 'Name of example product.'¶
-
product¶ Product with which this product example is associated.
-
product_help_text= 'Product with which this product name is associated.'¶
-
product_id¶
-
exception
-
class
fpiweb.models.Profile(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelTrack more information about the users of our system.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
active_pallet¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
active_pallet_help_text= 'Active Pallet'¶
-
active_pallet_id¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
title¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title_help_text= 'Job title'¶
-
title_max_length= 30¶
-
user¶ Internal link to the default Django User table.
-
user_id¶
-
exception
fpiweb.qr_code_utilities module¶
-
class
fpiweb.qr_code_utilities.QRCodePrinter(url_prefix)[source]¶ Bases:
object-
get_next_box_url(starting_number, count) -> (<class 'str'>, <class 'str'>)[source]¶ Build the URL for the next box. :return:
-
get_next_qr_img(starting_number, count) -> (<class 'str'>, <class 'str'>)[source]¶ Build the QR image for the next box label.
- Returns
a QR code image ready to print
-
fpiweb.urls module¶
Manage the urls for the F. P. I. application.
fpiweb.views module¶
views.py - establish the views (pages) for the F. P. I. web application.
-
class
fpiweb.views.AboutView(**kwargs)[source]¶ Bases:
django.views.generic.base.TemplateViewThe About View for this application.
-
context_object_name= 'about_context'¶
-
template_name= 'fpiweb/about.html'¶
-
-
class
fpiweb.views.ActivityDownloadView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
class
Echo[source]¶ Bases:
objectAn object that implements just the write method of the file-like interface.
-
date_format= '%m/%d/%Y'¶
-
permission_required= ('fpiweb.view_activity',)¶
-
class
-
class
fpiweb.views.BoxDetailsView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.detail.DetailView-
context_object_name= 'box'¶
-
model¶ alias of
fpiweb.models.Box
-
permission_required= ('fpiweb.dummy_profile',)¶
-
template_name= 'fpiweb/box_detail.html'¶
-
-
class
fpiweb.views.BoxEditView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.UpdateView-
context_object_name= 'box'¶
-
form_class¶ alias of
fpiweb.forms.NewBoxForm
-
model¶ alias of
fpiweb.models.Box
-
permission_required= ('fpiweb.dummy_profile',)¶
-
success_url= '/fpiweb/index/'¶
-
template_name= 'fpiweb/box_edit.html'¶
-
-
class
fpiweb.views.BoxEmptyMoveView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateView-
permission_required= ('fpiweb.dummy_profile',)¶
-
template_name= 'fpiweb/box_empty_move.html'¶
-
-
class
fpiweb.views.BoxEmptyView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
permission_required= ('fpiweb.dummy_profile',)¶
-
-
class
fpiweb.views.BoxItemFormView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
permission_required= ('fpiweb.add_box',)¶
-
template_name= 'fpiweb/box_form.html'¶
-
-
class
fpiweb.views.BoxMoveView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateView-
permission_required= ('fpiweb.dummy_profile',)¶
-
template_name= 'fpiweb/box_empty_move.html'¶
-
-
class
fpiweb.views.BoxNewView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
permission_required= ('fpiweb.dummy_profile',)¶
-
template_name= 'fpiweb/box_new.html'¶
-
-
class
fpiweb.views.BoxScannedView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
permission_required= ('fpiweb.dummy_profile',)¶
-
-
class
fpiweb.views.BuildPalletView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
BoxFormFactory¶ alias of
django.forms.formsets.BoxItemFormFormSet
-
PALLET_NAME_FORM_NAME= 'pallet_name_form'¶
-
PALLET_SELECT_FORM_NAME= 'pallet_select_form'¶
-
build_pallet_form_prefix= 'build_pallet'¶
-
confirmation_template= 'fpiweb/build_pallet_confirmation.html'¶
-
form_template= 'fpiweb/build_pallet.html'¶
-
formset_prefix= 'box_forms'¶
-
page_title= 'Build Pallet'¶
-
permission_required= ('fpiweb.build_pallet',)¶
-
-
class
fpiweb.views.ConstraintCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreate a constraint using a generic CreateView.
-
context_object_name= 'constraints'¶
-
fields= ['constraint_name', 'constraint_descr', 'constraint_type', 'constraint_min', 'constraint_max', 'constraint_list']¶
-
formClass¶ alias of
fpiweb.forms.ConstraintsForm
-
model¶ alias of
fpiweb.models.Constraints
-
permission_required= ('fpiweb.add_constraints',)¶
-
success_url= '/fpiweb/constraints/'¶
-
template_name= 'fpiweb/constraint_edit.html'¶
-
-
class
fpiweb.views.ConstraintDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.DeleteViewDelete a constraint using a generic DeleteView.
-
context_object_name= 'constraints'¶
-
form_class¶ alias of
fpiweb.forms.ConstraintsForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.Constraints
-
permission_required= ('fpiweb.delete_constraints',)¶
-
success_url= '/fpiweb/constraints/'¶
-
template_name= 'fpiweb/constraint_delete.html'¶
-
-
class
fpiweb.views.ConstraintUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.UpdateViewUpdate a constraint using a generic UpdateView.
-
context_object_name= 'constraints'¶
-
form_class¶ alias of
fpiweb.forms.ConstraintsForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.Constraints
-
permission_required= ('fpiweb.change_constraints',)¶
-
template_name= 'fpiweb/constraint_edit.html'¶
-
-
class
fpiweb.views.ConstraintsListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.list.ListViewList of existing constraints.
-
context_object_name= 'constraints_list_content'¶
-
get_context_data(*, object_list=None, **kwargs)[source]¶ Add additional content to the context dictionary.
- Parameters
object_list –
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.Constraints
-
permission_required= ('fpiweb.view_constraints',)¶
-
template_name= 'fpiweb/constraints_list.html'¶
-
-
class
fpiweb.views.IndexView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.base.TemplateViewDefault web page (/index)
-
get_context_data(**kwargs)[source]¶ Add some security info so appropriate links can be hidden.
- Parameters
kwargs –
- Returns
-
template_name= 'fpiweb/index.html'¶
-
-
class
fpiweb.views.LocBinCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreate a bin using a generic CreateView.
-
context_object_name= 'loc_bin'¶
-
fields= ['loc_bin', 'loc_bin_descr']¶
-
formClass¶ alias of
fpiweb.forms.LocBinForm
-
model¶ alias of
fpiweb.models.LocBin
-
permission_required= ('fpiweb.add_locbin',)¶
-
success_url= '/fpiweb/loc_bin/'¶
-
template_name= 'fpiweb/loc_bin_edit.html'¶
-
-
class
fpiweb.views.LocBinDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.DeleteViewDelete a bin using a generic DeleteView.
-
context_object_name= 'loc_bin'¶
-
form_class¶ alias of
fpiweb.forms.LocBinForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.LocBin
-
permission_required= ('fpiweb.delete_locbin',)¶
-
success_url= '/fpiweb/loc_bin/'¶
-
template_name= 'fpiweb/loc_bin_delete.html'¶
-
-
class
fpiweb.views.LocBinListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.list.ListViewList of existing bins using a generic ListView.
-
context_object_name= 'loc_bin_list_content'¶
-
model¶ alias of
fpiweb.models.LocBin
-
permission_required= ('fpiweb.view_locbin',)¶
-
template_name= 'fpiweb/loc_bin_list.html'¶
-
-
class
fpiweb.views.LocBinUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.UpdateViewUpdate a bin using a generic UpdateView.
-
context_object_name= 'loc_bin'¶
-
form_class¶ alias of
fpiweb.forms.LocBinForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.LocBin
-
permission_required= ('fpiweb.change_locbin',)¶
-
success_url= '/fpiweb/loc_bin/'¶
-
template_name= 'fpiweb/loc_bin_edit.html'¶
-
-
class
fpiweb.views.LocRowCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreate a row using a generic CreateView.
-
context_object_name= 'loc_row'¶
-
fields= ['loc_row', 'loc_row_descr']¶
-
formClass¶ alias of
fpiweb.forms.LocRowForm
-
model¶ alias of
fpiweb.models.LocRow
-
permission_required= ('fpiweb.add_locrow',)¶
-
success_url= '/fpiweb/loc_row/'¶
-
template_name= 'fpiweb/loc_row_edit.html'¶
-
-
class
fpiweb.views.LocRowDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.DeleteViewDelete a row using a generic DeleteView.
-
context_object_name= 'loc_row'¶
-
form_class¶ alias of
fpiweb.forms.LocRowForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.LocRow
-
permission_required= ('fpiweb.delete_locrow',)¶
-
success_url= '/fpiweb/loc_row/'¶
-
template_name= 'fpiweb/loc_row_delete.html'¶
-
-
class
fpiweb.views.LocRowListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.list.ListViewList of existing rows using a generic ListView.
-
context_object_name= 'loc_row_list_content'¶
-
model¶ alias of
fpiweb.models.LocRow
-
permission_required= ('fpiweb.view_locrow',)¶
-
template_name= 'fpiweb/loc_row_list.html'¶
-
-
class
fpiweb.views.LocRowUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.UpdateViewUpdate a row using a generic UpdateView.
-
context_object_name= 'loc_row'¶
-
form_class¶ alias of
fpiweb.forms.LocRowForm
-
model¶ alias of
fpiweb.models.LocRow
-
permission_required= ('fpiweb.change_locrow',)¶
-
success_url= '/fpiweb/loc_row/'¶
-
template_name= 'fpiweb/loc_row_edit.html'¶
-
-
class
fpiweb.views.LocTierCreateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.CreateViewCreate a tier using a generic CreateView.
-
context_object_name= 'loc_tier'¶
-
fields= ['loc_tier', 'loc_tier_descr']¶
-
formClass¶ alias of
fpiweb.forms.LocTierForm
-
model¶ alias of
fpiweb.models.LocTier
-
permission_required= ('fpiweb.add_loctier',)¶
-
success_url= '/fpiweb/loc_tier/'¶
-
template_name= 'fpiweb/loc_tier_edit.html'¶
-
-
class
fpiweb.views.LocTierDeleteView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.DeleteViewDelete a tier using a generic DeleteView.
-
context_object_name= 'loc_tier'¶
-
form_class¶ alias of
fpiweb.forms.LocTierForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.LocTier
-
permission_required= ('fpiweb.delete_loctier',)¶
-
success_url= '/fpiweb/loc_tier/'¶
-
template_name= 'fpiweb/loc_tier_delete.html'¶
-
-
class
fpiweb.views.LocTierListView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.list.ListViewList of existing tiers using a generic ListView.
-
context_object_name= 'loc_tier_list_content'¶
-
model¶ alias of
fpiweb.models.LocTier
-
permission_required= ('fpiweb.view_loctier',)¶
-
template_name= 'fpiweb/loc_tier_list.html'¶
-
-
class
fpiweb.views.LocTierUpdateView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.UpdateViewUpdate a tier using a generic UpdateView.
-
context_object_name= 'loc_tier'¶
-
form_class¶ alias of
fpiweb.forms.LocTierForm
-
get_context_data(**kwargs)[source]¶ Modify the context before rendering the template.
- Parameters
kwargs –
- Returns
-
model¶ alias of
fpiweb.models.LocTier
-
permission_required= ('fpiweb.change_loctier',)¶
-
success_url= '/fpiweb/loc_tier/'¶
-
template_name= 'fpiweb/loc_tier_edit.html'¶
-
-
class
fpiweb.views.LoginView(**kwargs)[source]¶ Bases:
django.views.generic.edit.FormView-
form_class¶ alias of
fpiweb.forms.LoginForm
-
success_url= '/fpiweb/index/'¶
-
template_name= 'fpiweb/login.html'¶
-
-
class
fpiweb.views.LogoutView(**kwargs)[source]¶ Bases:
django.views.generic.base.TemplateView-
template_name= 'fpiweb/logout.html'¶
-
-
class
fpiweb.views.MANUAL_NOTICE_TYPE(value)[source]¶ Bases:
enum.EnumManual generic notice type.
-
NOTICE: str = 'NOTICE'¶
-
QUESTION: str = 'QUESTION'¶
-
-
class
fpiweb.views.MaintenanceView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateViewDefault web page (/index)
-
permission_required= ('fpiweb.view_system_maintenance',)¶
-
template_name= 'fpiweb/maintenance.html'¶
-
-
class
fpiweb.views.ManualBoxMenuView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateViewMenu of choices for manual individual box management.
-
get_context_data(**kwargs)[source]¶ Add User Information to Manual Menu page.
- Parameters
kwargs –
- Returns
-
permission_required= ('fpiweb.view_box',)¶
-
template_name= 'fpiweb/manual_ind_box_menu.html'¶
-
-
class
fpiweb.views.ManualBoxStatusView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
MODE_CONFIRMATION= 'confirmation'¶
-
MODE_ENTER_BOX_NUMBER= 'enter_box_number'¶
-
static
build_context(*, mode, box_number_form=None, box=None, box_type=None, product_form=None, product=None, location_form=None, location=None, errors=None)[source]¶
-
get(request, *args, **kwargs)[source]¶ Prepare to display consume box number form for the first time.
- Parameters
request –
args –
kwargs –
- Returns
-
permission_required= ('fpiweb.view_box',)¶
-
template_name= 'fpiweb/manual_box_status.html'¶
-
-
class
fpiweb.views.ManualCheckinBoxView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.ViewManually check a box into inventory.
-
MODE_CONFIRMATION= 'confirmation'¶
-
MODE_ENTER_BOX_INFO= 'enter_box_info'¶
-
static
build_context(*, mode, box_number_form=None, box_number=None, box_form=None, box=None, product_form=None, product=None, location_form=None, location=None, exp_year_form=None, exp_year=None, exp_month_start_form=None, exp_month_start=None, exp_month_end_form=None, exp_month_end=None, errors: Optional[list] = None)[source]¶
-
permission_required= ('fpiweb.check_in_box',)¶
-
post_box_info(request)[source]¶ Validate the posted information.
- Parameters
request – container of initial or latest post
- Returns
-
template_name= 'fpiweb/manual_check_in_box.html'¶
-
-
class
fpiweb.views.ManualConsumeBoxView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
MODE_CONFIRMATION= 'confirmation'¶
-
MODE_CONSUME_BOX= 'consume_box'¶
-
MODE_ENTER_BOX_NUMBER= 'enter_box_number'¶
-
static
build_context(*, mode, box_number_form=None, box=None, box_type=None, product_form=None, product=None, location_form=None, location=None, errors: Optional[list] = None)[source]¶
-
get(request, *args, **kwargs)[source]¶ Prepare to display consume box number form for the first time.
- Parameters
request –
args –
kwargs –
- Returns
-
permission_required= ('fpiweb.check_out_box',)¶
-
template_name= 'fpiweb/manual_check_out_box.html'¶
-
-
class
fpiweb.views.ManualMenuView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateViewMenu to choose between manual pallet or manual box management
-
get_context_data(**kwargs)[source]¶ Add User Information to Manual Menu page.
- Parameters
kwargs –
- Returns
-
permission_required= ('fpiweb.view_pallet',)¶
-
template_name= 'fpiweb/manual_menu.html'¶
-
-
class
fpiweb.views.ManualMoveBoxView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
MODE_CONFIRMATION= 'confirmation'¶
-
MODE_ENTER_BOX_NUMBER= 'enter_box_number'¶
-
MODE_ENTER_LOCATION= 'enter_location'¶
-
static
build_context(*, mode, box_number_form=None, box=None, location_form=None, errors: Optional[list] = None)[source]¶
-
permission_required= ('fpiweb.move_box',)¶
-
template_name= 'fpiweb/manual_move_box.html'¶
-
-
class
fpiweb.views.ManualNewBoxView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
MODE_CONFIRMATION= 'confirmation'¶
-
MODE_ENTER_BOX_NUMBER= 'enter_box_number'¶
-
static
build_context(*, mode, box_number_form=None, box=None, box_type=None, box_type_form=None, errors: Optional[list] = None)[source]¶
-
get(request, *args, **kwargs)[source]¶ Prepare to display add new box number form for the first time.
- Parameters
request –
args –
kwargs –
- Returns
-
permission_required= ('fpiweb.add_box',)¶
-
template_name= 'fpiweb/manual_new_box.html'¶
-
-
class
fpiweb.views.ManualPalletMenuView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateViewMenu of choices for manual pallet management.
-
get_context_data(**kwargs)[source]¶ Add User Information to Manual Menu page.
- Parameters
kwargs –
- Returns
-
permission_required= ('fpiweb.view_pallet',)¶
-
template_name= 'fpiweb/manual_pallet_menu.html'¶
-
-
class
fpiweb.views.ManualPalletMoveView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
FORM_PREFIX_CONFIRM_MERGE= 'confirm_merge'¶
-
FORM_PREFIX_FROM_LOCATION= 'from'¶
-
FORM_PREFIX_TO_LOCATION= 'to'¶
-
MODE_COMPLETE= 'complete'¶
-
MODE_CONFIRM_MERGE= 'confirm merge'¶
-
MODE_ENTER_FROM_LOCATION= 'enter from location'¶
-
MODE_ENTER_TO_LOCATION= 'enter to location'¶
-
build_response(request, mode, from_location_form=None, to_location_form=None, confirm_merge_form=None, boxes_moved=0, to_location=None, errors=None, status=<HTTPStatus.OK: 200>)[source]¶
-
permission_required= ('fpiweb.move_pallet',)¶
-
template= 'fpiweb/manual_pallet_move.html'¶
-
-
class
fpiweb.views.ManualPalletNew(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.base.TemplateViewEstablish a new pallet for this user.
-
context_object_name= 'manual_pallet'¶
-
model¶ alias of
fpiweb.models.Profile
-
template_name= 'fpiweb/manual_pallet_add.html'¶
-
-
class
fpiweb.views.ManualPalletStatus(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.list.ListViewEstablish a new pallet for this user.
-
context_object_name= 'manual_pallet_status'¶
-
model¶ alias of
fpiweb.models.Pallet
-
permission_required= ('fpiweb.dummy_profile',)¶
-
success_url= '/fpiweb/manualmenu/'¶
-
template_name= 'fpiweb/manual_pallet_status.html'¶
-
-
class
fpiweb.views.PalletManagementView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.ViewSelect current pallet, add new pallet, delete pallet
-
permission_required= ('fpiweb.dummy_profile',)¶
-
static
show_page(request, page_title='Pallet Management', show_delete=True, prompt=None, pallet_select_form=None, pallet_name_form=None, status_code=<HTTPStatus.OK: 200>)[source]¶
-
template_name= 'fpiweb/pallet_management.html'¶
-
-
class
fpiweb.views.PalletSelectView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.edit.FormView-
form_class¶ alias of
fpiweb.forms.PalletSelectForm
-
permission_required= ('fpiweb.dummy_profile',)¶
-
success_url= '/fpiweb/index/'¶
-
template_name= 'fpiweb/pallet_select.html'¶
-
-
class
fpiweb.views.PrintLabelsView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
permission_required= ('fpiweb.print_labels_box',)¶
-
template_name= 'fpiweb/print_labels.html'¶
-
-
class
fpiweb.views.ScannerView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.View-
static
get_keyed_in_box_number(box_number)[source]¶ - Parameters
box_number – the box number (a string), may be None
- Returns
-
permission_required= ('fpiweb.dummy_profile',)¶
-
static
-
class
fpiweb.views.TestScanView(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin,django.views.generic.base.TemplateView-
permission_required= ('fpiweb.dummy_profile',)¶
-
template_name= 'fpiweb/test_scan.html'¶
-
-
fpiweb.views.error_page(request, message=None, message_list=(), status=<HTTPStatus.BAD_REQUEST: 400>)[source]¶
-
fpiweb.views.manual_generic_notification(request, note_type: fpiweb.views.MANUAL_NOTICE_TYPE, title: str = None, message_list: tuple = (), action_message: str = '', yes_url: str = 'fpiweb:about', no_url: str = 'fpiweb:about', return_url: str = 'fpiweb:about', status: int = <HTTPStatus.OK: 200>)[source]¶ Provide a generic notification screen for the manual box subsystem.
- Parameters
request – request info from calling view
note_type – type of notice (error or note)
title – title to use for notification
message_list – List of lines to display in notification
action_message – final message or question
yes_url – if question, url for yes action
no_url – if question, url for no action
return_url – if notice, url to go to after notification
status – status code to flag notification if needed
- Returns