/lighteddjango

轻量级django实践

Primary LanguageJavaScript

lighteddjango

  • 轻量级django实践 | bookname:轻量级django
  • 所涉及到的django、python、drf、backbone相关工具,都是时下(2019-03-13)最新版本,具体版本可以到项目中查看

dom.html:

是target和currentTarget一个区别验证的实践页面

notice

  • DB I use mysql. not postgresql in book.
  • In JS (sting) "4" === (int) 4 is false, the type of each other should be in consistent
  • Downgrade Tornado==4.2, due to tornadoredis imcompatible with tornado==6.0.2
  • redis on windows, obtain redis startswith Redis*/ in my project or there is a link for download:https://github.com/MicrosoftArchive/redis/releases

how does it run:

  • 获得项目后,在虚拟环境中执行pip install -r requirements.txt.
  • 编辑settings文件,设置好本地数据库信息
  • 在虚拟环境中迁移数据库(python manage.py makemigrations, python manage.py migrate
  • 启动本地服务python manage.py runserver 127.0.0.1,打开页面进行访问。
  • url: localhost:8000/api 数据drf-api及相关操作
  • If you want to obtain full features, see below at others.

others:

  • If you finish section 8:tornado communicate with django, then you should setup redis and run it to get the whole features. Then you should run python watercooler.py --debug in your project enviroment, it will listen on localhost:8080 as a websocket server.
  • There's a original examples from this book at this link: https://github.com/lightweightdjango/examples

exhibition:

  • login view: loginpage
  • home view: homepage
  • sprint-create view: sprintaddpage
  • sprint-detail view: sprintdetailpage
  • task-create-update view: taskcreateupdatepage
  • GIF: display

TODO:

  • Using python3.7 features.
  • Using JS ES6 syntax.