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
Finished the review-and-submit.html page, allowing users to see a full summary of their product, including pictures added,
after entering details on the add product page.
Added the ability for checkboxes on the detailed-description-specs.html and shipping-and-delivery.html pages to retain their values
even after refresh or navigation. Previously, these checkboxes would reset upon page refresh or when navigating away and back.
Note:
The submit button on the review-and-submit.html page is currently inactive because the necessary backend code has not yet been implemented.
Data persistence is maintained across page refreshes, including any checkbox selections. However, there is an issue with the images on the images-and-media.html page. When an image is uploaded, it is stored in the session, but its reference is not persistent in the form fields.
Details:
After uploading an image and clicking Next, if you return to the images-and-media.html page, the image title will not appear in the
form fields. Despite this, the image data remains in the session, meaning you can still see the previously entered data on
the review-and-submit.html page. However, to navigate back to the review-and-submit.html page, you must use the URL directly.
If you attempt to go to the review page by clicking Next, the form will prompt you to upload an image again.
This occurs because the image data, although present in the session, is not recognized as a persistent file object.
Clarifications on the reason why this happens:
Storing Images in Sessions: The Images are complex objects and as a result cannot be directly stored in a session
(which is typically used for serialized data like strings, integers, etc.). Instead, what is stored are image file paths
or references to temporary storage locations.
Losing Image State on Refresh: Since the form fields do not recognize a stored path or URL string as a file object,
the image does not reappear in the form field when you navigate back to the images-and-media.html page.
This is why the form fields appear empty even though the image data is still stored in the session.
Navigating via URL: You can still see the uploaded image data on the review-and-submit.html page by
navigating directly to the URL. However, the form handling mechanism does not automatically reload the file inputs,
so the form expects new uploads if you try to navigate using the standard flow.
Cause of the Issue: The problem arises because images cannot be stored directly in a request session—they are memory objects,
not simple data types. To persist images thus allowing the user to see their images, they need to be stored in a temporary folder
with a reference to their location.
However, this results in the image being stored as a URL string rather than a file memory object. As a consequent of this,
the form doesn't recognize it as a valid file input, leading to the observed persistence issue.
Todo:
Implement the model to store the product data when the user submits the form.
Activate the submit button on the review page once the backend functionality is complete.
Feat: Complete
review-and-submit.html
pageFinished the
review-and-submit.html
page, allowing users to see a full summary of their product, including pictures added, after entering details on the add product page.Added the ability for checkboxes on the
detailed-description-specs.html
andshipping-and-delivery.html
pages to retain their values even after refresh or navigation. Previously, these checkboxes would reset upon page refresh or when navigating away and back.Note:
The
submit
button on thereview-and-submit.html
page is currently inactive because the necessary backend code has not yet been implemented.Data persistence is maintained across page refreshes, including any checkbox selections. However, there is an issue with the images on the
images-and-media.html
page. When an image is uploaded, it is stored in the session, but its reference is not persistent in the form fields.Details:
Next
, if you return to theimages-and-media.html
page, the image title will not appear in the form fields. Despite this, the image data remains in the session, meaning you can still see the previously entered data on thereview-and-submit.html
page. However, to navigate back to thereview-and-submit.html
page, you must use the URL directly. If you attempt to go to the review page by clickingNext
, the form will prompt you to upload an image again. This occurs because the image data, although present in the session, is not recognized as a persistent file object.Clarifications on the reason why this happens:
images-and-media.html
page. This is why the form fields appear empty even though the image data is still stored in the session.review-and-submit.html
page by navigating directly to the URL. However, the form handling mechanism does not automatically reload the file inputs, so the form expects new uploads if you try to navigate using the standard flow.Cause of the Issue: The problem arises because images cannot be stored directly in a request session—they are memory objects, not simple data types. To persist images thus allowing the user to see their images, they need to be stored in a temporary folder with a reference to their location. However, this results in the image being stored as a URL string rather than a file memory object. As a consequent of this, the form doesn't recognize it as a valid file input, leading to the observed persistence issue.
Todo: