说明:学习完慕课网上的课程「Python升级3.6 强力Django+杀手级Xadmin打造在线教育平台」,成功上线后,做的回顾总结  。感兴趣的也可以自己去入手学习一下

入坑「python」的「django 框架」,「python」版本是 3.6.5,「django」的版本是 2.1.7,「IDE」是「pycharm」付费版(具体的安装请自行 google),使用的数据库是「mysql 8」


1. 新建项目

在「pycharm」中新建项目,选择侧边的「django」,使用默认配置,就可以了,点击创建 ,创建完成后,在下方的「Terminal」输入 pip list 查看一下


项目创建完成,不过需要更新一下「pip」的版本,后面要安装不少依赖包。推荐使用 windows 的「cmd」去执行,pycharm会出错。


2. 安装依赖包,

后台管理程序使用的是「django」的第三方扩展包「xadmin」,由于我们使用的是「django 2」,按装稍微有点麻烦。在虚拟环境的目录下新建一个「requirements.txt」文件,将需要安装的依赖包的信息写入,后面在执行「pip install」的时候可以方便很多。新建后的文件路径「‪F:\django-review\diandain\venv\Scripts\requirements.txt」这个文件在后面的网站部署时也会用到,文件内容如下:

defusedxml==0.5.0
diff-match-patch==20181111
Django==2.1.7
django-crispy-forms==1.7.2
django-formtools==2.1
django-import-export==1.2.0
django-pure-pagination==0.3.0
django-ranged-response==0.2.0
django-reversion==3.0.3
django-simple-captcha==0.5.10
et-xmlfile==1.0.1
future==0.17.1
httplib2==0.9.2
jdcal==1.4
mysql-connector-python==8.0.15
odfpy==1.4.0
openpyxl==2.6.0
Pillow==5.4.1
protobuf==3.6.1
PyMySQL==0.9.3
pytz==2018.9
PyYAML==3.13
six==1.12.0
tablib==0.12.1
unicodecsv==0.14.1
xlrd==1.2.0
xlwt==1.3.0

你可以将内容复制到你的 txt 文件中。然后在虚拟换环境中执行

执行「activate.bat」进入虚拟环境,退出的时候输入「deactivate」


a. 更新 pip 版本

(venv) F:\django-review\diandain\venv\Scripts>python -m pip install --upgrade pip
Collecting pipUsing cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pipFound existing installation: pip 10.0.1Uninstalling pip-10.0.1:Successfully uninstalled pip-10.0.1Rolling back uninstall of pip
Exception:
Traceback (most recent call last):File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\basecommand.py", line 228, in mainstatus = self.run(options, args)File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\commands\install.py", line 335, in runuse_user_site=options.use_user_site,File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\__init__.py", line 49, in install_given_reqs**kwargsFile "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\req_install.py", line 748, in installuse_user_site=use_user_site, pycompile=pycompile,File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\req_install.py", line 961, in move_wheel_fileswarn_script_location=warn_script_location,File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\wheel.py", line 431, in move_wheel_filesgenerated.extend(maker.make(spec))File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 403, in makeself._make_script(entry, filenames, options=options)File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 307, in _make_scriptself._write_script(scriptnames, shebang, script, filenames, ext)File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 243, in _write_scriptlauncher = self._get_launcher('t')File "F:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 382, in _get_launcherresult = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'(venv) F:\django-review\diandain\venv\Scripts>python -m pip install --upgrade pip
F:\django-review\diandain\venv\lib\site-packages\pip\_internal\req\req_install.py:391: UserWarning: Module pip was already imported from F:\django-review\diandain\venv\lib\site-packages\pip\__init__.py, but f:\django-review\diandain\venv\lib\site-packages\pip-10.0.1-py3.6.egg is being added to sys.pathself.satisfied_by = pkg_resources.get_distribution(str(no_marker))
Collecting pipUsing cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pipFound existing installation: pip 10.0.1Uninstalling pip-10.0.1:Successfully uninstalled pip-10.0.1
Successfully installed pip-19.0.3(venv) F:\django-review\diandain\venv\Scripts>

更新过程出现错误,进入「F:\django-review\diandain\venv\Lib\site-packages」 目录中,将「pip-19.0.3.dist-info」文件删除,重新「pip 」的更新命令,就可以完成更新。


b. 执行命令「pip install -r requirements.txt 」完成依赖包的安装

(venv) F:\django-review\diandain\venv\Scripts>pip install -r requirements.txt
Collecting defusedxml==0.5.0 (from -r requirements.txt (line 1))Using cached https://files.pythonhosted.org/packages/87/1c/17f3e3935a913dfe2a5ca85fa5ccbef366bfd82eb318b1f75dadbf0affca/defusedxml-0.5.0-py2.py3-none-any.whl
Collecting diff-match-patch==20181111 (from -r requirements.txt (line 2))Using cached https://files.pythonhosted.org/packages/f0/2a/5ba07def0e9107d935aba62cf632afbd0f7c723a98af47ccbcab753d2452/diff-match-patch-20181111.tar.gz
Requirement already satisfied: Django==2.1.7 in f:\django-review\diandain\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.1.7)
Collecting django-crispy-forms==1.7.2 (from -r requirements.txt (line 4))Using cached https://files.pythonhosted.org/packages/9a/05/6bad05742d185ec2fabfa4deab05cafde286eb3f383fba24b3674340aca2/django_crispy_forms-1.7.2-py2.py3-none-any.whl
Collecting django-formtools==2.1 (from -r requirements.txt (line 5))Using cached https://files.pythonhosted.org/packages/97/3f/b8e04c41c028d5cdad651393abea1f686d846c717d8ab5d5ebe2974f711c/django_formtools-2.1-py2.py3-none-any.whl
Collecting django-import-export==1.2.0 (from -r requirements.txt (line 6))Using cached https://files.pythonhosted.org/packages/62/7a/ddd9aef718243504e7715bda9bb5a100cfc353be37dc819d9914a7073cba/django_import_export-1.2.0-py2.py3-none-any.whl
Collecting django-pure-pagination==0.3.0 (from -r requirements.txt (line 7))Using cached https://files.pythonhosted.org/packages/55/43/50c475f408d3350cec340855970a5ce02ea12f5a53d520315f200b4847a1/django-pure-pagination-0.3.0.tar.gz
Collecting django-ranged-response==0.2.0 (from -r requirements.txt (line 8))Using cached https://files.pythonhosted.org/packages/70/e3/9372fcdca8e9c3205e7979528ccd1a14354a9a24d38efff11c1846ff8bf1/django-ranged-response-0.2.0.tar.gz
Collecting django-reversion==3.0.3 (from -r requirements.txt (line 9))Using cached https://files.pythonhosted.org/packages/c2/90/8ef58524fa4e059498abd7f59010ecbc299253c3d6702dd893506344d0b7/django_reversion-3.0.3-py2.py3-none-any.whl
Collecting django-simple-captcha==0.5.10 (from -r requirements.txt (line 10))Using cached https://files.pythonhosted.org/packages/72/58/5036ffe717eea6d816684fd2c7b09a477cd72186b35d9f4a340bf214d6d5/django-simple-captcha-0.5.10.zip
Collecting et-xmlfile==1.0.1 (from -r requirements.txt (line 11))Using cached https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz
Collecting future==0.17.1 (from -r requirements.txt (line 12))Using cached https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz
Collecting httplib2==0.9.2 (from -r requirements.txt (line 13))Using cached https://files.pythonhosted.org/packages/ff/a9/5751cdf17a70ea89f6dde23ceb1705bfb638fd8cee00f845308bf8d26397/httplib2-0.9.2.tar.gz
Collecting jdcal==1.4 (from -r requirements.txt (line 14))Using cached https://files.pythonhosted.org/packages/a0/38/dcf83532480f25284f3ef13f8ed63e03c58a65c9d3ba2a6a894ed9497207/jdcal-1.4-py2.py3-none-any.whl
Collecting mysql-connector-python==8.0.15 (from -r requirements.txt (line 15))Using cached https://files.pythonhosted.org/packages/d4/d4/aa2d0b8bf8d0188b6c03fc4e730f0d7495b9f61efb87438fe5e7f477198c/mysql_connector_python-8.0.15-py2.py3-none-any.whl
Collecting odfpy==1.4.0 (from -r requirements.txt (line 16))Using cached https://files.pythonhosted.org/packages/85/7d/8f6d1f2a4683be362b101c00232b4c3839e4e4a90e0945d8d43ec6aa671d/odfpy-1.4.0.tar.gz
Collecting openpyxl==2.6.0 (from -r requirements.txt (line 17))Using cached https://files.pythonhosted.org/packages/41/a8/257a30b5b7ce0e548bc03f5be3d4b262140c1f7a506038da63cd1f4d34ad/openpyxl-2.6.0.tar.gz
Collecting Pillow==5.4.1 (from -r requirements.txt (line 18))Using cached https://files.pythonhosted.org/packages/19/05/e7869088bcd791fe63f6d671577d25c4e3d1fecdc21501254621c65cd74b/Pillow-5.4.1-cp36-cp36m-win32.whl
Collecting protobuf==3.6.1 (from -r requirements.txt (line 19))Using cached https://files.pythonhosted.org/packages/23/64/07fe09ea35a7c48b31f9afaa11eb9bab3fe2389a5db70df5601c41e63df3/protobuf-3.6.1-cp36-cp36m-win32.whl
Collecting PyMySQL==0.9.3 (from -r requirements.txt (line 20))Using cached https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl
Requirement already satisfied: pytz==2018.9 in f:\django-review\diandain\venv\lib\site-packages (from -r requirements.txt (line 21)) (2018.9)
Collecting PyYAML==3.13 (from -r requirements.txt (line 22))Using cached https://files.pythonhosted.org/packages/fb/51/0c49c6caafe8d9a27ad9b0ca9f91adda5a5072b9efbbe7585fb97a4c71c4/PyYAML-3.13-cp36-cp36m-win32.whl
Collecting six==1.12.0 (from -r requirements.txt (line 23))Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting tablib==0.12.1 (from -r requirements.txt (line 24))Using cached https://files.pythonhosted.org/packages/e4/9f/cba4e1145ca9ec84d9326f7ce38c6b5f37d9be8bc1af1bd8b19c20374095/tablib-0.12.1.tar.gz
Collecting unicodecsv==0.14.1 (from -r requirements.txt (line 25))Using cached https://files.pythonhosted.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz(venv) F:\django-review\diandain\venv\Scripts>

c. 安装「xadmin」

这里需要说明一下,无法通过 pip 的方式进行安装适配「django 2」版本的「xadmin」,解决方法是使用「 git」进行安装。当然你的电脑上要安装有「git」,「git 」的安装请自行 google。

关于「xadmin」,可以前往「https://github.com/sshwsfc/xadmin」查看文档获取帮助

在命令行中输入如下命名「pip install git+git://github.com/sshwsfc/xadmin.git@django2」,运行结果如下

(venv) F:\django-review\diandain\venv\Scripts>pip install git+git://github.com/sshwsfc/xadmin.git@django2
Collecting git+git://github.com/sshwsfc/xadmin.git@django2Cloning git://github.com/sshwsfc/xadmin.git (to revision django2) to c:\users\刘小北\appdata\local\temp\pip-req-build-w4no9p3j
Switched to a new branch 'django2'
Branch 'django2' set up to track remote branch 'django2' from 'origin'.
Requirement already satisfied: setuptools in f:\django-review\diandain\venv\lib\site-packages\setuptools-39.1.0-py3.6.egg (from xadmin==2.0.1) (39.1.0)
Requirement already satisfied: django>=2 in f:\django-review\diandain\venv\lib\site-packages (from xadmin==2.0.1) (2.1.7)
Collecting django-crispy-forms>=1.6.0 (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/9a/05/6bad05742d185ec2fabfa4deab05cafde286eb3f383fba24b3674340aca2/django_crispy_forms-1.7.2-py2.py3-none-any.whl
Collecting django-reversion>=2.0.0 (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/c2/90/8ef58524fa4e059498abd7f59010ecbc299253c3d6702dd893506344d0b7/django_reversion-3.0.3-py2.py3-none-any.whl
Collecting django-formtools>=1.0 (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/97/3f/b8e04c41c028d5cdad651393abea1f686d846c717d8ab5d5ebe2974f711c/django_formtools-2.1-py2.py3-none-any.whl
Collecting django-import-export>=0.5.1 (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/62/7a/ddd9aef718243504e7715bda9bb5a100cfc353be37dc819d9914a7073cba/django_import_export-1.2.0-py2.py3-none-any.whl
Collecting httplib2==0.9.2 (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/ff/a9/5751cdf17a70ea89f6dde23ceb1705bfb638fd8cee00f845308bf8d26397/httplib2-0.9.2.tar.gz
Collecting future (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz
Collecting six (from xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Requirement already satisfied: pytz in f:\django-review\diandain\venv\lib\site-packages (from django>=2->xadmin==2.0.1) (2018.9)
Collecting tablib (from django-import-export>=0.5.1->xadmin==2.0.1)Downloading https://files.pythonhosted.org/packages/7b/c7/cb74031b330cd94f3580926dc707d148b4ba9138449fc9f433cb79e640d8/tablib-0.13.0-py3-none-any.whl (75kB)100% |████████████████████████████████| 81kB 97kB/s
Collecting diff-match-patch (from django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/f0/2a/5ba07def0e9107d935aba62cf632afbd0f7c723a98af47ccbcab753d2452/diff-match-patch-20181111.tar.gz
Collecting openpyxl>=2.4.0 (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Downloading https://files.pythonhosted.org/packages/5f/f8/a5d3a4ab669f99154f87ab531192dd84ac79aae62efab662bd2d82a72194/openpyxl-2.6.1.tar.gz (173kB)100% |████████████████████████████████| 174kB 110kB/s
Collecting pyyaml (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/fb/51/0c49c6caafe8d9a27ad9b0ca9f91adda5a5072b9efbbe7585fb97a4c71c4/PyYAML-3.13-cp36-cp36m-win32.whl
Collecting xlwt (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/44/48/def306413b25c3d01753603b1a222a011b8621aed27cd7f89cbc27e6b0f4/xlwt-1.3.0-py2.py3-none-any.whl
Collecting backports.csv (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Downloading https://files.pythonhosted.org/packages/8e/26/a6bd68f13e0f38fbb643d6e497fc3462be83a0b6c4d43425c78bb51a7291/backports.csv-1.0.7-py2.py3-none-any.whl
Collecting odfpy (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/85/7d/8f6d1f2a4683be362b101c00232b4c3839e4e4a90e0945d8d43ec6aa671d/odfpy-1.4.0.tar.gz
Collecting xlrd (from tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl
Collecting jdcal (from openpyxl>=2.4.0->tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/a0/38/dcf83532480f25284f3ef13f8ed63e03c58a65c9d3ba2a6a894ed9497207/jdcal-1.4-py2.py3-none-any.whl
Collecting et_xmlfile (from openpyxl>=2.4.0->tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz
Collecting defusedxml (from odfpy->tablib->django-import-export>=0.5.1->xadmin==2.0.1)Using cached https://files.pythonhosted.org/packages/87/1c/17f3e3935a913dfe2a5ca85fa5ccbef366bfd82eb318b1f75dadbf0affca/defusedxml-0.5.0-py2.py3-none-any.whl
Installing collected packages: django-crispy-forms, django-reversion, django-formtools, jdcal, et-xmlfile, openpyxl, pyyaml, xlwt, backports.csv, defusedxml, odfpy, xlrd, tablib, diff-match-patch, django-import-export, httplib2, future, six, xadminRunning setup.py install for et-xmlfile ... doneRunning setup.py install for openpyxl ... doneRunning setup.py install for odfpy ... doneRunning setup.py install for diff-match-patch ... doneRunning setup.py install for httplib2 ... doneRunning setup.py install for future ... doneRunning setup.py install for xadmin ... done
Successfully installed backports.csv-1.0.7 defusedxml-0.5.0 diff-match-patch-20181111 django-crispy-forms-1.7.2 django-formtools-2.1 django-import-export-1.2.0 django-reversion-3.0.3 et-xmlfile-1.0.1 future-0.17.1 httplib2-0.9.2 jdcal-1.4 odfpy-1.4.0 openpyxl-2.6.1 pyyaml-3.13 six-1.12.0 tablib-0.13.0 xadmin-2.0.1 xlrd-1.2.0 xlwt-1.3.0(venv) F:\django-review\diandain\venv\Scripts>

安装的时间可能有点久,要耐心等待一下。


d. 扩展包

网页分页「django-pure-pagination」和验证码「django-simple-captcha」,后面需要用到这两个扩展包

这两个扩展包的使用方法,可以在 github 上搜索查看他们的文档

分别执行 pip 安装即可

(venv) F:\django-review\diandain\venv\Scripts>pip install django-pure-pagination
Collecting django-pure-paginationUsing cached https://files.pythonhosted.org/packages/55/43/50c475f408d3350cec340855970a5ce02ea12f5a53d520315f200b4847a1/django-pure-pagination-0.3.0.tar.gz
Installing collected packages: django-pure-paginationRunning setup.py install for django-pure-pagination ... done
Successfully installed django-pure-pagination-0.3.0(venv) F:\django-review\diandain\venv\Scripts>pip install  django-simple-captcha
Collecting django-simple-captchaUsing cached https://files.pythonhosted.org/packages/72/58/5036ffe717eea6d816684fd2c7b09a477cd72186b35d9f4a340bf214d6d5/django-simple-captcha-0.5.10.zip
Requirement already satisfied: six>=1.2.0 in f:\django-review\diandain\venv\lib\site-packages (from django-simple-captcha) (1.12.0)
Requirement already satisfied: Django>=1.8 in f:\django-review\diandain\venv\lib\site-packages (from django-simple-captcha) (2.1.7)
Collecting Pillow!=5.1.0,>=2.2.2 (from django-simple-captcha)Using cached https://files.pythonhosted.org/packages/19/05/e7869088bcd791fe63f6d671577d25c4e3d1fecdc21501254621c65cd74b/Pillow-5.4.1-cp36-cp36m-win32.whl
Collecting django-ranged-response==0.2.0 (from django-simple-captcha)Using cached https://files.pythonhosted.org/packages/70/e3/9372fcdca8e9c3205e7979528ccd1a14354a9a24d38efff11c1846ff8bf1/django-ranged-response-0.2.0.tar.gz
Requirement already satisfied: pytz in f:\django-review\diandain\venv\lib\site-packages (from Django>=1.8->django-simple-captcha) (2018.9)
Installing collected packages: Pillow, django-ranged-response, django-simple-captchaRunning setup.py install for django-ranged-response ... doneRunning setup.py install for django-simple-captcha ... done
Successfully installed Pillow-5.4.1 django-ranged-response-0.2.0 django-simple-captcha-0.5.10(venv) F:\django-review\diandain\venv\Scripts>

3. 简单的测试

进入目录 「(venv)F:\django-review\diandain>」,运行命令「python manage.py runserver」

(venv) F:\django-review\diandain>python manage.py runserver
Performing system checks...System check identified no issues (0 silenced).You have 15 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
March 11, 2019 - 11:54:28
Django version 2.1.7, using settings 'diandain.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

进入浏览器,在地址栏输入「http://127.0.0.1:8000/」,查看效果。

如果看到这个页面,那么我们的安装就算完成了

django 学习笔记 安装相关推荐

  1. django 学习笔记

    django 学习笔记 启动虚拟机: workon bj18_py3 创建一个项目: django-admin.py startproject mysite 启动开发用服务器:从外层项目 mysite ...

  2. Django学习笔记---第一天

    Django学习笔记 1.Django的安装 //如果不指定版本号,默认安装最新版 pip3 install django==1.11.8 关于Django的版本和python的版本依赖关系,请看下图 ...

  3. 千锋Django学习笔记

    千锋Django学习笔记 文章目录 千锋Django学习笔记 写在前面 1. MVC和MTV 2. Django简介 3. MTV简单流程 4. 和Model的简单对接 5. Model 6. Tem ...

  4. 梅科尔工作室-Django学习笔记(二次学习)(3)

    本次学习的是如何用django实现前端鸿蒙OS登录 下面介绍一下本次的操作过程. 1.首先创立MySQL数据并将数据库导入到django当中 其中:导入数据库的操作: 2.配置urls 对应新建的pe ...

  5. 分享:Django学习笔记(4)---ManyToMany 添加、删除关联、查询

    Django学习笔记(4)---ManyToMany 添加.删除关联.查询 http://my.oschina.net/u/572994/blog/105280

  6. django学习笔记03

    原创博客地址:django学习笔记03 第一章,模型层 查询集API 一.QuerySet何时被提交 迭代 QuerySet是可迭代的,在首次迭代查询集时执行实际的数据库查询 切片:如果使用切片的&q ...

  7. django学习笔记02

    原创博客地址:django学习笔记02 第一章:模型层 1.8 查询操作 一.创建对象 1 2 3 4 5 >>> from blog.models import Blog > ...

  8. django学习笔记01

    原创博客地址:django学习笔记01 基于教程,刘江的博客教程Django教程:https://www.liujiangblog.com/course/django/87 第一章:模型层 1.1 模 ...

  9. Django学习笔记(五)

    Django学习笔记(五) MVC和MTV对比 传统的MVC(Model-View-Controller) M 模型层,主要是对数据库层的封装 V 视图层,向用户展示结果 C 控制层,用于请求,获取数 ...

最新文章

  1. 关于召开全国大学生智能车竞赛--百度智慧交通项目 技术交流活动通知(北方站)
  2. 物理综合:关于UDSM后端设计总结
  3. C# 公共控件及程序制作流程
  4. 《系统集成项目管理工程师》必背100个知识点-84积极影响的风险的应对策略
  5. 如何快速掌握一门新技术/语言/框架…
  6. 批量scp脚本——从多台机器拷贝文件
  7. Shell下的环境变量
  8. C++中default标识的构造函数的说明
  9. JDK自带的Timer类
  10. 深入理解JAVA中的NIO
  11. 链表的相关面试题(完整)(C语言)
  12. AD ---- 活动目录的日常管理操作(3)
  13. apache phoenix的JAVA JDBC操作
  14. 使用树莓派gpio连接ps2手柄模块(附程序)
  15. 计算机专业Java毕业设计思路分享(项目+设计+源码)
  16. Redis(八):进阶篇 - 事务
  17. zynq-7000系列基于zynq-zed的vivado初步设计之linux下控制PL扩展的GPIO
  18. 三维动画制作参考文献推荐汇总
  19. V831 MP4播放+船新版本
  20. Sublime中文乱码问题!今天星期四~

热门文章

  1. 5张图告诉你:同样是职场人,差距怎么这么大?
  2. 利用canvas绘制图片加水印
  3. java redis订单_采用redis生成唯一且随机的订单号
  4. Bipartite Graph
  5. Arduino与Proteus仿真实例-LM35温度传感器驱动仿真
  6. 2013买房靠不靠谱?---“秒杀”三件最蛋疼的房事儿是关键
  7. s17王者服务器维护几点,王者荣耀S17赛季更新维护结束了吗 王者荣耀更新失败怎么办...
  8. 微信小程序input为数字键盘
  9. 数据库原理和概念学习DAY4——概念数据模型设计
  10. U盘空间充足但复制文件到U盘提示文件过大无法复制解决方案