Python-Django Shopping Website
This project was completed by my friend and I and it was put into use in October 2019.
Link: https://usgolife.com
Requirements Analysis
1.1 User Module
1) Registration page
- Check whether the user name has been registered during registration.
- 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.
2) Landing page
- Realize user login function
3) User Center
- The user center information page, which displays the information of the logged-in user, including the user name, phone number, and address, and the product information that the user has recently viewed at the bottom of the page.
- 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.
4) Other
- If the user has logged in, the top of the page displays the user’s order information.
1.2 Commodity module
1) Home
- Dynamically specify homepage carousel product 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 text products of image products).
- When you click on a product, it jumps to the product details page.
2) Product details page
- Display the detailed information of a product.
- The two new product information of the product is displayed at the bottom of the page.
3) Product list page
- Display the list data of a certain category of goods, display by page and support sorting by default, price and popularity.
- The two new product information of the product is displayed at the bottom of the page.
4) Other
- Search product information through the search box.
1.3 Shopping Cart Module
- List page and detail page to add products to the shopping cart.
- After the user logs in, the home page, details page, and list page display the number of items in the user’s shopping cart.
- Shopping cart page: operate 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.
1.4 Order related
- Submit order page: Display 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.
II Development environment and tools
ubuntu18.4 | python>3.6 | Django == 2.2 | pychram | redis
mysql 5.7 | celery | fastDFS | nginx | Django-haystack
whoosh | jieba | alipay | requests
III Configure the project environment
1.Configure mysql database environment
1 | DATABASES = { |
2.Configure cache path–redis database environment
Cache stored in redis database
1 | CACHES = { |
3.Configure session storage mode
Save to cache
1 | SESSION_ENGINE = 'django.contrib.sessions.backends.cache' |
4.Configure Send mail
1 | EMAIL_BACKEND = 'django.core.mail.backends.smto.EmailBackend' |
5.Configure fastDFS and nginx
1 | DEFAULT_FILE_STORAGE - 'utils.fdfs.storage.FDFSStorage' |
6.Configure Celery
1 | app = Celery('celery_tasks.tasks',broker = 'redis://example.com:6379/8') |
For more information, click here.
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment
DisqusValine






