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
Changed the detailed-description-specs.html and SEO-and-meta-information.html to use Django forms and tags
Refactor form handling and country data processing due to an error and
RemovedformBuilder.js and its functions (populateSelectField, loadFile, createOption) due to integration issues with Django forms and invalid choice errors.
Replaced JavaScript-based form handling with Django forms and template tags to improve compatibility and maintainability.
Expected Behaviour with populateSelectField, loadFile, createOption js function:
Country options are correctly populated in select fields from the static file.
Users can select options and fill in all the required fields before submitting the form.
Form advances to the next page upon valid submission.
Current Behaviour due to the use of `populateSelectField, loadFile, createOption js funtions:
Country options are correctly populated in select fields from the static file.
Users can select options and fill in any necessary data.
Form does not advances to the next page upon valid submission instead displays an error stating that chosen country is invalid.
Changed the
detailed-description-specs.html and SEO-and-meta-information.html
to use Django forms and tagsRefactor form handling and country data processing due to an error and
formBuilder.js
and its functions (populateSelectField
,loadFile
,createOption
) due to integration issues with Django forms and invalid choice errors.Expected Behaviour with
populateSelectField
,loadFile
,createOption
js function:Current Behaviour due to the use of
`populateSelectField
,loadFile
,createOption
js funtions:Issues Fixed:
Added static country list
static/data/countries.txt
sourced from[https://github.com/umpirsky/country-list
](https://github.com/umpirsky/country-list%60) for form options.Implemented
country_parser.py
in theutils/account
directory with the following functions:parse_country_file
: Parses the static file to extract country codes and names.extract_country_and_code_from_string
: Extracts code and name from each line.get_file_path
: Finds the static file path using Django's static file system.AdditionalInformationForm
to properly handle country options and validate user selections.The form now correct handles the data option and allows the page to advance to the next page if all data is correct