File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ class Meta:
4040 'storage_condition' ,
4141 'primary_package_material' ,
4242 'secondary_package_material' ,
43- 'is_supplemented_food' ,
44- 'is_tds' ,
43+ 'source_batch' ,
4544 'is_variety_pack' ,
4645 'is_individually_packaged' ,
4746 'has_preparation_instructions' ,
@@ -94,8 +93,9 @@ class Meta:
9493 'secondary_package_material' : forms .Select (attrs = {
9594 'class' : 'form-select'
9695 }),
97- 'is_supplemented_food' : forms .CheckboxInput (attrs = {'class' : 'form-check-input' }),
98- 'is_tds' : forms .CheckboxInput (attrs = {'class' : 'form-check-input' }),
96+ 'source_batch' : forms .Select (attrs = {
97+ 'class' : 'form-select'
98+ }),
9999 'is_variety_pack' : forms .CheckboxInput (attrs = {'class' : 'form-check-input' }),
100100 'is_individually_packaged' : forms .CheckboxInput (attrs = {'class' : 'form-check-input' }),
101101 'has_preparation_instructions' : forms .CheckboxInput (attrs = {'class' : 'form-check-input' }),
Original file line number Diff line number Diff line change 3737 ("other" , "Other" ),
3838]
3939
40+ BATCH_CHOICES = [
41+ ("2025_snapcan" ,"SNAP-CAN 2025" ),
42+ ("tds" ,"Total Diet Study" ),
43+ ("2025_supp_food" ,"2025 Supplemented Food Collection" ),
44+ ("2025_frozen_entrees" ,"2025 Frozen Entrees Collection" ),
45+ ]
46+
4047
4148def get_upload_path (instance , filename ):
4249 model_name = instance .__class__ .__name__ .lower ()
@@ -116,6 +123,12 @@ class Product(models.Model):
116123 help_text = _ ("Secondary packaging (optional)" )
117124 )
118125
126+ source_batch = models .CharField (
127+ choices = BATCH_CHOICES ,
128+ null = True ,
129+ help_text = _ ("Product collection batch" )
130+ )
131+
119132 num_units = models .IntegerField (blank = True , null = True , help_text = _ ("Number of individual units (optional)" ))
120133
121134 is_variety_pack = models .BooleanField (
Original file line number Diff line number Diff line change @@ -148,19 +148,14 @@ <h5 class="section-heading">Product Flags</h5>
148148 < div class ="form-section ">
149149 < h5 class ="section-heading "> Data Processing</ h5 >
150150
151- < div class ="form-check ">
152- {{ form.is_supplemented_food }}
153- < label class ="form-check-label " for ="{{ form.is_supplemented_food.id_for_label }} ">
154- {{ form.is_supplemented_food.label }}
155- </ label >
156- </ div >
157-
158- < div class ="form-check ">
159- {{ form.is_tds }}
160- < label class ="form-check-label " for ="{{ form.is_tds.id_for_label }} ">
161- Is part of Total Diet Study
162- </ label >
151+ < div style ="margin-bottom: 10px; ">
152+ < label for ="{{ form.source_batch.id_for_label }} " class ="form-label "> Product Batch</ label >
153+ {{ form.source_batch }}
154+ {% if form.source_batch.errors %}
155+ < div class ="invalid-feedback d-block "> {{ form.source_batch.errors.0 }}</ div >
156+ {% endif %}
163157 </ div >
158+
164159
165160 < div class ="form-check ">
166161 {{ form.needs_manual_verification }}
You can’t perform that action at this time.
0 commit comments