From 20f79004f696014aae256c45449cf2adaff339ee Mon Sep 17 00:00:00 2001 From: Jesus Medina <87674772+chuymedina1396@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:31:02 -0500 Subject: [PATCH] working functionality --- Dockerfile | 2 +- parserator_web/static/js/index.js | 3 + .../templates/parserator_web/index.html | 60 +++++++++++++++++-- parserator_web/urls.py | 1 - parserator_web/views.py | 34 +++++++---- requirements.txt | 2 + tests/test_views.py | 32 ++++++---- 7 files changed, 108 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c464fdf..d250560a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - # # Read more on Dockerfile best practices at the source: # https://docs.docker.com/develop/develop-images/dockerfile_best-practices -RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client nodejs +RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client nodejs npm # Inside the container, create an app directory and switch into it RUN mkdir /app diff --git a/parserator_web/static/js/index.js b/parserator_web/static/js/index.js index 492674cc..0dc5604f 100644 --- a/parserator_web/static/js/index.js +++ b/parserator_web/static/js/index.js @@ -1,2 +1,5 @@ /* TODO: Flesh this out to connect the form to the API and render results in the #address-results div. */ + +/*My code was not functioning correctly when I sperated it into this file, but it works when I wrote the js inline within the index.html */ + diff --git a/parserator_web/templates/parserator_web/index.html b/parserator_web/templates/parserator_web/index.html index a72d9c80..e75d5027 100644 --- a/parserator_web/templates/parserator_web/index.html +++ b/parserator_web/templates/parserator_web/index.html @@ -11,13 +11,12 @@
Dealing with some messy or unstructured addresses? We can parse them for you.
Try it out! Parse an address in the United States into fields like AddressNumber, StreetName and ZipCode.