100% Guaranteed Results


FullStack – Homework 6 Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

Part 1: Flask-SQLite3
The goal for this lab/homework is to make you comfortable translating your database models into actual code. We will be using SQLite3 to help us.
Setting up the scene:
We are working as part of ACME Aircraft Parts Company, and are managing the customer database for them. As part of our application, we take the customer data and enter that information into the database to be able to efficiently manage all customer information. Also, we should be able to place orders for each customer through this application.
Please note the following are example requirements that your HW should accomplish o As a user of this webpage I want to be able to enter customer information
o Along with the customer information, I should also be able to add address information for the customer
o On home.html, I should be able to place orders for customers.

We’ll walk through the example together in class which will give you an idea of how this all works together. Your goal for this lab and homework is to create the remaining models, forms, and routes as specified below.
This means that you must:
• Create the following tables with the properties listed (with appropriate data types) and relationships:
o customer: (customer_id, first_name, last_name, company, email, phone)
o address: (id, street_address, city, state, country, zip_code) o order: (order_id, name_of_part, manufacturer_of_part) o customer has a one-to-many relationship to address
§ a customer can have many addresses
§ an address can only have one customer o customer has a many-to-many relationship to order
§ a customer can have many orders
§ Hint: This might require you to create a separate table which includes the relationship between the customer and order – (id, order_id, customer_id)
• Create the forms, templates, routes, etc necessary to input this data into the database.
• Required Templates:
o Base.html
o Customer.html – Customer and Address input form
o Home.html – will display the Customer and Order data – Create a view to showcase the data into your database (see the current implementation of “home.html” for example).
o Order.html – Order Details input form
• Once you create your schema.sql file, run the below command to create your database o sqlite3 app.db < schema.sql

Helpful Documentation
Remember to run update_database.py whenever you make changes to the models.py file. This will update the database with your changes. However, it will delete any data in the database.
– SQLite3 Python
– Accessing SQLite3 Command Shell
– Flask-WTF (flask plugin for creating forms easily)

Reviews

There are no reviews yet.

Be the first to review “FullStack – Homework 6 Solved”

Your email address will not be published. Required fields are marked *

Related products