Code Monkey home page Code Monkey logo

django-mall's Introduction

Django-Mall

Django天天生鲜商城项目根据传智播客教程编写,除了复现代码之外,做了一定的优化(忘记密码根据邮箱重置),旨在熟悉与理解Django框架。

在本地运行项目

  • 克隆项目到本地
git clone https://github.com/ennl2py/Django-Mall.git
  • 创建虚拟环境
  • 安装项目依赖
pip install -r requirements.txt
  • 迁移数据库

在下一行代码运行前,请根据你的数据库实际情况,修改项目文件夹ttshengxiansettings.py文件中的DATABASES配置(本例采用的是MySQL数据库,并用PyMysql进行管理)

python manage.py migrate
  • 创建后台管理员账户
python manage.py createsuperuser
  • 运行开发服务器
python manage.py runserver
  • 添加商品分类及相应分类对应的商品

在浏览器输入:127.0.0.1:8000/admin,登录到后台,商品分类根据前端设计只需要添加6个,分别为新鲜水果、海鲜水产、猪牛羊肉、禽类蛋品、新鲜蔬菜、速冻食品6个,分类添加完毕后,添加商品即可。

  • 项目预览

在浏览器输入:127.0.0.1:8000,查看效果。

django-mall's People

Contributors

ennl2py avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.