Repository navigation
Home
Nick Chemsak edited this page Feb 22, 2017
·
6 revisions
- ERD Development
- [Django view templates] (https://github.com/Ambiguous-Squids/Bangazon_initial_site/wiki/Django-Templates)
- [Django DB Models] (https://github.com/Ambiguous-Squids/Bangazon_initial_site/wiki/Django-Models)
- Migrations
- Authentication
You will be building a Django application that will be the first, stable version of the Bangazon Platform product site.
- Products will be created by customers, so make sure that you have a column on the
Productmodel to store which customer created it. - Add a new model named
ProductType. Add a foreign key toProductTypein theProductmodel. It must be non-nullable, which means that you will likely need to provide a default value for your migration to work. The only fields needed are the primary key, andLabel. - Add a model named
PaymentType. - A
Customercan have many payment types. - The
Ordermodel must have a foreign key field to thePaymentTypemodel, but it can be nullable. However, before an order can be completed, there must be a value for thePaymentTypefield.
Make sure you produce a layout with your index.html Django template for the application so that the structure of each page is consistent.
- User registration and login.
- Product creation form for user to sell a product.
- List of all product types.
- Provide a view to show all products that are of a particular product type.
- List all products, with the name text as a hyperlink to the detail view.
- Provide a product detail view.
- List payment types for current customer.
- On the product detail view, have an
Add to Orderbutton that, when clicked, either creates a new order for a customer that doesn't have an active one, or adds to an existing open order. - In the navigation bar, have an affordance that shows the current customer how many items are in their order.
- If the user clicks on their order in the navigation bar, take them to the order detail view, which lists products, their prices, and current total for order.
- On the order detail view, have a button labeled
Complete Order. - When a customer starts to complete an order, show them a list of payment types that are assigned to them. When they select one to add to the order, then the order is complete.
Using the requirements above create a model for each resource, and use migrations to ensure your database structure is up to date.
Django, like Angular, has many built-in helper tags and filters when building the site templates. We strongly recommend reading this documentation while building your templates.