更新了大纲结构

pull/6/head
jackfrued 2018-05-27 08:39:31 +08:00
parent 95f78d2d49
commit 41b9856e51
159 changed files with 168 additions and 28 deletions

View File

@ -0,0 +1,2 @@
## Python进阶知识

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 146 KiB

View File

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 210 KiB

View File

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 318 KiB

View File

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 426 KiB

View File

Before

Width:  |  Height:  |  Size: 411 KiB

After

Width:  |  Height:  |  Size: 411 KiB

View File

@ -1,4 +0,0 @@
## Django 2.x实战(05) - 会话及其应用

View File

Before

Width:  |  Height:  |  Size: 483 KiB

After

Width:  |  Height:  |  Size: 483 KiB

View File

Before

Width:  |  Height:  |  Size: 408 KiB

After

Width:  |  Height:  |  Size: 408 KiB

View File

Before

Width:  |  Height:  |  Size: 399 KiB

After

Width:  |  Height:  |  Size: 399 KiB

View File

Before

Width:  |  Height:  |  Size: 562 KiB

After

Width:  |  Height:  |  Size: 562 KiB

View File

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 437 KiB

View File

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 336 KiB

View File

Before

Width:  |  Height:  |  Size: 465 KiB

After

Width:  |  Height:  |  Size: 465 KiB

View File

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 468 KiB

View File

Before

Width:  |  Height:  |  Size: 309 KiB

After

Width:  |  Height:  |  Size: 309 KiB

View File

@ -47,7 +47,7 @@
其他的配置可以参考官方文档中[数据库配置](https://docs.djangoproject.com/zh-hans/2.0/ref/databases/#third-party-notes)的部分。 其他的配置可以参考官方文档中[数据库配置](https://docs.djangoproject.com/zh-hans/2.0/ref/databases/#third-party-notes)的部分。
NAME属性代表数据库的名称如果使用SQLite它对应着一个文件在这种情况下NAME的属性值应该是一个绝对路径。如果使用其他关系型数据库还要配置对应的USER、PASSWORD、HOST、PORT等属性。 NAME属性代表数据库的名称如果使用SQLite它对应着一个文件在这种情况下NAME的属性值应该是一个绝对路径。如果使用其他关系型数据库还要配置对应的HOST主机、PORT端口、USER用户名、PASSWORD口令等属性。
2. 安装MySQL客户端工具Python 3中使用PyMySQLPython 2中用MySQLdb。 2. 安装MySQL客户端工具Python 3中使用PyMySQLPython 2中用MySQLdb。
@ -92,7 +92,7 @@
Applying sessions.0001_initial... OK Applying sessions.0001_initial... OK
``` ```
4. 可以看到Django帮助我们创建了10张二维这些都是使用Django框架需要的东西除了这些之外我们还应该为我们自己的应用创建数据模型。如果要在hrs应用中实现对部门和员工的管理我们可以创建如下所示的数据模型。 4. 可以看到Django帮助我们创建了10张表这些都是使用Django框架需要的东西稍后我们就会用到这些表。除此之外我们还应该为我们自己的应用创建数据模型。如果要在hrs应用中实现对部门和员工的管理我们可以创建如下所示的数据模型。
```Shell ```Shell
(venv)$ cd hrs (venv)$ cd hrs
@ -162,6 +162,19 @@
### 使用ORM完成模型的CRUD操作 ### 使用ORM完成模型的CRUD操作
我们先在shell中演示如何利用Django中内置的ORM框架对模型进行CRUDCreate / Read / Update / Delete操作。
```Shell
(venv)$ python manage.py shell
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>
```
#### 新增 #### 新增

View File

@ -0,0 +1,4 @@
## Django 2.x实战(05) - Cookie和会话

View File

@ -0,0 +1,4 @@
## Django 2.x实战(06) - 日志和缓存

View File

@ -0,0 +1,4 @@
## Django 2.x实战(07) - 文件上传和通用视图

View File

@ -0,0 +1,4 @@
## Django 2.x实战(08) - 用户/角色/权限和中间件

View File

@ -0,0 +1,4 @@
## Django 2.x实战(09) - RESTful架构和应用(上)

View File

@ -0,0 +1,4 @@
## Django 2.x实战(10) - RESTful架构和应用(下)

View File

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 560 B

View File

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

View File

Before

Width:  |  Height:  |  Size: 614 KiB

After

Width:  |  Height:  |  Size: 614 KiB

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 296 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Some files were not shown because too many files have changed in this diff Show More