Fullstack Fruit & Veg Shop: A web application developed with HTML, CSS, and JavaScript for the frontend, and Django for the backend. Features include user authentication, a product catalogue, shopping cart functionality, and order management. and much more
Created a forms folder and moved forms.py into it.
Created a base_form_helper.py and placed it in the forms folder.
Extracted measurement fields from details-description-specs in DetailedFormDescription in forms.py and created a BaseMeasurementForm,
which is now located in base_form_helper.py. This base form will be used by all forms requiring measurement fields, specifically in
detailed-description-specs.html and shipping-and-delivery.html. The fields include:
Height
Length
Width
Weight
The BaseMeasurementForm is inherited by other forms, allowing them to use its fields and avoid repetitive declarations.
Added a get_shipping_options() function in product_category_utils.py to render checkbox elements for shipping and delivery options,
and integrated this with the shipping-and-delivery.html page.
Introduced utility functions:
upload_to
save_file_temporarily
create_unique_file_name
create_timestamped_directory
These functions address the issue that files cannot be stored in request.session because it is a memory-based object and cannot serialize files. Instead, the new functions handle file storage by temporarily saving files from images-and-media to a designated temporary directory. Once the files are reviewed and finalised, they are then moved to their appropriate folder within the media directory.
Forms Implemented:
basic-production-information.html
detailed-description-specs.html
pricing-inventory.html
images-and-media.html
shipping-and-delivery.html
To Do:
Convert the remaining forms to use Django forms and tags.
forms
folder and movedforms.py
into it.base_form_helper.py
and placed it in theforms
folder.Extracted measurement fields from
details-description-specs
inDetailedFormDescription
informs.py
and created aBaseMeasurementForm
, which is now located inbase_form_helper.py
. This base form will be used by all forms requiring measurement fields, specifically indetailed-description-specs.html
andshipping-and-delivery.html
. The fields include:The
BaseMeasurementForm
is inherited by other forms, allowing them to use its fields and avoid repetitive declarations.Added a
get_shipping_options()
function inproduct_category_utils.py
to render checkbox elements for shipping and delivery options, and integrated this with theshipping-and-delivery.html
page.Introduced utility functions:
upload_to
save_file_temporarily
create_unique_file_name
create_timestamped_directory
These functions address the issue that files cannot be stored in
request.session
because it is a memory-based object and cannot serialize files. Instead, the new functions handle file storage by temporarily saving files fromimages-and-media
to a designated temporary directory. Once the files are reviewed and finalised, they are then moved to their appropriate folder within the media directory.Forms Implemented:
basic-production-information.html
detailed-description-specs.html
pricing-inventory.html
images-and-media.html
shipping-and-delivery.html
To Do: