Django-based mall development project notes

Django-based mall development project notes
1. Environment
setup 1. Install Python: Go to the official website of Python to download the latest version of Python for installation. When installing, remember to check to add Python to the system environment variables
. 2. Enter pip install virtualenv on the command line
3. Specify Directory installation of virtual environment: enter virtualenv venv (virtual environment name) on the command line
4. Open Pycharm to create a Django project
2. Know e-commerce
2.1
B2B-Business to Business B2B (Business to Business) refers to the supply and demand of e-commerce transactions It is a merchant (or enterprise, company), and they (they) use Internet technology or various business network platforms to complete the process of business transactions. E-commerce is a specific and main form of modern B2B marketing.
Case: Alibaba
2.2 C2C-person-to-person
C2C is Customer (Consumer) to Customer (Consumer), which means e-commerce behavior between consumers. For example, a consumer has a computer, conducts transactions through the Internet, and sells it to another consumer. This type of transaction is called C2C e-commerce.
Case: Taobao,
Guazi Second-hand Car 2.3 B2C-Business to Individual
B2C is the abbreviation of Business-to-Customer, and its Chinese abbreviation is "Business-to-Customer". "Business-to-customer" is a model of e-commerce, that is, a commercial retail model that sells products and services directly to consumers. This form of e-commerce is generally dominated by online retail, and mainly uses the Internet to carry out online sales activities. B2C means that companies provide consumers with a new type of shopping environment through the Internet-online stores, and consumers conduct online shopping and online payment through the Internet.
Case:
Vipshop 2.4
C2B-Consumer to Business (Consumer to Business) is a new business model in the Internet economy era. This model has changed the relationship between the original producers (enterprises and institutions) and consumers. It is a kind of consumer contribution value (Create Value), and enterprise and institution consumption value (Consume Value).
The C2B model is the exact opposite of the well-known demand supply model (DSM). The real C2B should first generate consumer demand and then enterprise production, that is, first consumers put forward demands, and then manufacturers organize production according to demand. Usually, consumers customize products and prices according to their own needs, or actively participate in product design, production, and pricing. Products and prices reflect the individual needs of consumers, and manufacturers conduct customized production.
Case: Haier Mall
2.5
O2O-Online To Offline O2O, or Online To Offline (online to offline/online to offline), refers to the combination of offline business opportunities with the Internet, making the Internet a platform for offline transactions. The concept originated in the United States. The concept of O2O is very broad, which can involve both online and offline, and can be commonly referred to as O2O.
Case:
Meituan, Ele.me 2.6 F2C-Factory to individual
F2C refers to Factory to customer, that is, an e-commerce model from manufacturer to consumer.
2.7 B2B2C-Enterprise-Enterprise-Personal
B2B2C is an e-commerce type of online shopping business model, B is the abbreviation of BUSINESS, C is the abbreviation of CUSTOMER, the first B refers to the supplier of goods or services, the second B refers to enterprises engaged in e-commerce, and C refers to consumers.
The first BUSINESS is not limited to brand suppliers, film and television production companies, and book publishers. Any product supplier or service provider can become the first BUSINESS; the second B is an e-commerce company in the B2B2C model. Simultaneous integration of goods and services and consumer terminals through unified operation and management is a bridge between suppliers and consumers, providing high-quality services for suppliers and consumers, and an Internet e-commerce service provider. C represents consumers, consumers who shop on the unified e-commerce platform constructed by the second B;
B2B2C is derived from the evolution and improvement of the current B2B and B2C models, which perfectly combines B2C and C2C, through the B2B2C model of electronics Business enterprises build their own logistics supply chain system and provide unified services.
Case: Jingdong Mall
Summary: The project we are developing this time is a B2C type mall.
3. Project process

4. Demand analysis
4.1 User module
Registration page When
registering, check whether the user name has been registered.
Complete the registration of user information.
Send an email to the user's registered mailbox, and the user clicks the activation link in the email to complete the activation of the user account.
Login page
Realize user login function.
User Center
User Center Information Page: Displays the information of the logged-in user, including the user name, phone number, and address. At the same time, the bottom of the page displays the product information that the user has recently viewed.
User Center Address Page: Displays the default receiving address of the logged-in user, and the user’s receiving address can be added in the form at the bottom of the page.
User Center Order Page: Display the order information of the logged-in user.
Others
If the user is already logged in, the information of the logged-in user is displayed at the top of the page.
4.2 Commodity related
1. Homepage
Dynamically specify the homepage carousel commodity information.
Dynamically specify home page activity information.
Dynamically obtain and display product category information.
Dynamically specify each category of products displayed on the homepage (including image products and text products).
When you click on a product, jump to the product details page.
2. Product details page
shows the detailed information of a product.
The bottom left of the page shows 2 new product information of this category.
3. The product list page
displays the list data of a certain category of products, displayed in pages and supports sorting by default, price, and popularity.
The bottom left of the page shows 2 new product information of this category.
4. Other
Search product information through the page search box.
4.3 Shopping cart related
Items are added to the shopping cart on the list page and detail page.
After the user logs in, the home page, details page, and list page display the number of items in the shopping cart of the logged-in user.
Shopping cart page: operations on the products in the user's shopping cart. If you select an item, increase or decrease the number of items in the shopping cart.
4.4 Order related Page for
submitting an order: Displays the product information that the user is about to purchase.
Click Submit Order to complete the creation of the order.
The user center order page displays the user's order information.
Click Pay to complete the payment of the order.
Five, architecture design

Six, database design

6.1 Understanding the concept of SKU and SPU
SPU is the smallest unit of product information aggregation. It is a collection of reusable and easy-to-retrieve standardized information that describes the characteristics of a product. In layman's terms, commodities with the same attribute values ​​and characteristics can be called an SPU. SPU is an abstract concept.
SKU is the smallest physically indivisible unit of inventory. When in use, it should be handled according to different formats and different management modes. It is the most commonly used in clothing and footwear. SKU is a specific product.
Case: iphone7 is an SPU, iphone7 with color, style, and package is an SKU.
Seven, model design After
designing the database, add model code in the models.py file of each module

Guess you like

Origin blog.csdn.net/whm156399/article/details/108576467