diff --git a/Day01/hello.py b/Day01-15/Day01/hello.py similarity index 100% rename from Day01/hello.py rename to Day01-15/Day01/hello.py diff --git a/Day01/res/python-idle.png b/Day01-15/Day01/res/python-idle.png similarity index 100% rename from Day01/res/python-idle.png rename to Day01-15/Day01/res/python-idle.png diff --git a/Day01/res/python-ipython.png b/Day01-15/Day01/res/python-ipython.png similarity index 100% rename from Day01/res/python-ipython.png rename to Day01-15/Day01/res/python-ipython.png diff --git a/Day01/res/python-jupyter-1.png b/Day01-15/Day01/res/python-jupyter-1.png similarity index 100% rename from Day01/res/python-jupyter-1.png rename to Day01-15/Day01/res/python-jupyter-1.png diff --git a/Day01/res/python-jupyter-2.png b/Day01-15/Day01/res/python-jupyter-2.png similarity index 100% rename from Day01/res/python-jupyter-2.png rename to Day01-15/Day01/res/python-jupyter-2.png diff --git a/Day01/res/python-pycharm.png b/Day01-15/Day01/res/python-pycharm.png similarity index 100% rename from Day01/res/python-pycharm.png rename to Day01-15/Day01/res/python-pycharm.png diff --git a/Day01/res/python-sublime.png b/Day01-15/Day01/res/python-sublime.png similarity index 100% rename from Day01/res/python-sublime.png rename to Day01-15/Day01/res/python-sublime.png diff --git a/Day01/初识Python.md b/Day01-15/Day01/初识Python.md similarity index 100% rename from Day01/初识Python.md rename to Day01-15/Day01/初识Python.md diff --git a/Day02/centigrade.py b/Day01-15/Day02/centigrade.py similarity index 100% rename from Day02/centigrade.py rename to Day01-15/Day02/centigrade.py diff --git a/Day02/circle.py b/Day01-15/Day02/circle.py similarity index 100% rename from Day02/circle.py rename to Day01-15/Day02/circle.py diff --git a/Day02/leap.py b/Day01-15/Day02/leap.py similarity index 100% rename from Day02/leap.py rename to Day01-15/Day02/leap.py diff --git a/Day02/operator.py b/Day01-15/Day02/operator.py similarity index 100% rename from Day02/operator.py rename to Day01-15/Day02/operator.py diff --git a/Day02/string.py b/Day01-15/Day02/string.py similarity index 100% rename from Day02/string.py rename to Day01-15/Day02/string.py diff --git a/Day02/variable1.py b/Day01-15/Day02/variable1.py similarity index 100% rename from Day02/variable1.py rename to Day01-15/Day02/variable1.py diff --git a/Day02/variable2.py b/Day01-15/Day02/variable2.py similarity index 100% rename from Day02/variable2.py rename to Day01-15/Day02/variable2.py diff --git a/Day02/variable3.py b/Day01-15/Day02/variable3.py similarity index 100% rename from Day02/variable3.py rename to Day01-15/Day02/variable3.py diff --git a/Day02/variable4.py b/Day01-15/Day02/variable4.py similarity index 100% rename from Day02/variable4.py rename to Day01-15/Day02/variable4.py diff --git a/Day02/variable5.py b/Day01-15/Day02/variable5.py similarity index 100% rename from Day02/variable5.py rename to Day01-15/Day02/variable5.py diff --git a/Day02/语言元素.md b/Day01-15/Day02/语言元素.md similarity index 100% rename from Day02/语言元素.md rename to Day01-15/Day02/语言元素.md diff --git a/Day03/.py b/Day01-15/Day03/.py similarity index 100% rename from Day03/.py rename to Day01-15/Day03/.py diff --git a/Day03/convert.py b/Day01-15/Day03/convert.py similarity index 100% rename from Day03/convert.py rename to Day01-15/Day03/convert.py diff --git a/Day03/grade.py b/Day01-15/Day03/grade.py similarity index 100% rename from Day03/grade.py rename to Day01-15/Day03/grade.py diff --git a/Day03/piecewise.py b/Day01-15/Day03/piecewise.py similarity index 100% rename from Day03/piecewise.py rename to Day01-15/Day03/piecewise.py diff --git a/Day03/rolldice.py b/Day01-15/Day03/rolldice.py similarity index 100% rename from Day03/rolldice.py rename to Day01-15/Day03/rolldice.py diff --git a/Day03/tax.py b/Day01-15/Day03/tax.py similarity index 100% rename from Day03/tax.py rename to Day01-15/Day03/tax.py diff --git a/Day03/triangle.py b/Day01-15/Day03/triangle.py similarity index 100% rename from Day03/triangle.py rename to Day01-15/Day03/triangle.py diff --git a/Day03/verify.py b/Day01-15/Day03/verify.py similarity index 100% rename from Day03/verify.py rename to Day01-15/Day03/verify.py diff --git a/Day03/分支结构.md b/Day01-15/Day03/分支结构.md similarity index 100% rename from Day03/分支结构.md rename to Day01-15/Day03/分支结构.md diff --git a/Day04/for1.py b/Day01-15/Day04/for1.py similarity index 100% rename from Day04/for1.py rename to Day01-15/Day04/for1.py diff --git a/Day04/for2.py b/Day01-15/Day04/for2.py similarity index 100% rename from Day04/for2.py rename to Day01-15/Day04/for2.py diff --git a/Day04/for3.py b/Day01-15/Day04/for3.py similarity index 100% rename from Day04/for3.py rename to Day01-15/Day04/for3.py diff --git a/Day04/for4.py b/Day01-15/Day04/for4.py similarity index 100% rename from Day04/for4.py rename to Day01-15/Day04/for4.py diff --git a/Day04/for5.py b/Day01-15/Day04/for5.py similarity index 100% rename from Day04/for5.py rename to Day01-15/Day04/for5.py diff --git a/Day04/for6.py b/Day01-15/Day04/for6.py similarity index 100% rename from Day04/for6.py rename to Day01-15/Day04/for6.py diff --git a/Day04/while1.py b/Day01-15/Day04/while1.py similarity index 100% rename from Day04/while1.py rename to Day01-15/Day04/while1.py diff --git a/Day04/while2.py b/Day01-15/Day04/while2.py similarity index 100% rename from Day04/while2.py rename to Day01-15/Day04/while2.py diff --git a/Day04/循环结构.md b/Day01-15/Day04/循环结构.md similarity index 100% rename from Day04/循环结构.md rename to Day01-15/Day04/循环结构.md diff --git a/Day05/chicken.py b/Day01-15/Day05/chicken.py similarity index 100% rename from Day05/chicken.py rename to Day01-15/Day05/chicken.py diff --git a/Day05/craps.py b/Day01-15/Day05/craps.py similarity index 100% rename from Day05/craps.py rename to Day01-15/Day05/craps.py diff --git a/Day05/fibonacci.py b/Day01-15/Day05/fibonacci.py similarity index 100% rename from Day05/fibonacci.py rename to Day01-15/Day05/fibonacci.py diff --git a/Day05/guess.py b/Day01-15/Day05/guess.py similarity index 100% rename from Day05/guess.py rename to Day01-15/Day05/guess.py diff --git a/Day05/lily.py b/Day01-15/Day05/lily.py similarity index 100% rename from Day05/lily.py rename to Day01-15/Day05/lily.py diff --git a/Day05/palindrome.py b/Day01-15/Day05/palindrome.py similarity index 100% rename from Day05/palindrome.py rename to Day01-15/Day05/palindrome.py diff --git a/Day05/perfect.py b/Day01-15/Day05/perfect.py similarity index 100% rename from Day05/perfect.py rename to Day01-15/Day05/perfect.py diff --git a/Day05/prime.py b/Day01-15/Day05/prime.py similarity index 100% rename from Day05/prime.py rename to Day01-15/Day05/prime.py diff --git a/Day05/table.py b/Day01-15/Day05/table.py similarity index 100% rename from Day05/table.py rename to Day01-15/Day05/table.py diff --git a/Day05/总结和练习.md b/Day01-15/Day05/总结和练习.md similarity index 100% rename from Day05/总结和练习.md rename to Day01-15/Day05/总结和练习.md diff --git a/Day06/function1.py b/Day01-15/Day06/function1.py similarity index 100% rename from Day06/function1.py rename to Day01-15/Day06/function1.py diff --git a/Day06/function2.py b/Day01-15/Day06/function2.py similarity index 100% rename from Day06/function2.py rename to Day01-15/Day06/function2.py diff --git a/Day06/function3.py b/Day01-15/Day06/function3.py similarity index 100% rename from Day06/function3.py rename to Day01-15/Day06/function3.py diff --git a/Day06/function4.py b/Day01-15/Day06/function4.py similarity index 100% rename from Day06/function4.py rename to Day01-15/Day06/function4.py diff --git a/Day06/function5.py b/Day01-15/Day06/function5.py similarity index 100% rename from Day06/function5.py rename to Day01-15/Day06/function5.py diff --git a/Day06/function6.py b/Day01-15/Day06/function6.py similarity index 100% rename from Day06/function6.py rename to Day01-15/Day06/function6.py diff --git a/Day06/函数和模块的使用.md b/Day01-15/Day06/函数和模块的使用.md similarity index 100% rename from Day06/函数和模块的使用.md rename to Day01-15/Day06/函数和模块的使用.md diff --git a/Day07/avgscore.py b/Day01-15/Day07/avgscore.py similarity index 100% rename from Day07/avgscore.py rename to Day01-15/Day07/avgscore.py diff --git a/Day07/dict1.py b/Day01-15/Day07/dict1.py similarity index 100% rename from Day07/dict1.py rename to Day01-15/Day07/dict1.py diff --git a/Day07/dict2.py b/Day01-15/Day07/dict2.py similarity index 100% rename from Day07/dict2.py rename to Day01-15/Day07/dict2.py diff --git a/Day07/fibonacci.py b/Day01-15/Day07/fibonacci.py similarity index 100% rename from Day07/fibonacci.py rename to Day01-15/Day07/fibonacci.py diff --git a/Day07/findmax.py b/Day01-15/Day07/findmax.py similarity index 100% rename from Day07/findmax.py rename to Day01-15/Day07/findmax.py diff --git a/Day07/list1.py b/Day01-15/Day07/list1.py similarity index 100% rename from Day07/list1.py rename to Day01-15/Day07/list1.py diff --git a/Day07/list2.py b/Day01-15/Day07/list2.py similarity index 100% rename from Day07/list2.py rename to Day01-15/Day07/list2.py diff --git a/Day07/list3.py b/Day01-15/Day07/list3.py similarity index 100% rename from Day07/list3.py rename to Day01-15/Day07/list3.py diff --git a/Day07/lottery.py b/Day01-15/Day07/lottery.py similarity index 100% rename from Day07/lottery.py rename to Day01-15/Day07/lottery.py diff --git a/Day07/marquee.py b/Day01-15/Day07/marquee.py similarity index 100% rename from Day07/marquee.py rename to Day01-15/Day07/marquee.py diff --git a/Day07/res/fibonacci-blocks.png b/Day01-15/Day07/res/fibonacci-blocks.png similarity index 100% rename from Day07/res/fibonacci-blocks.png rename to Day01-15/Day07/res/fibonacci-blocks.png diff --git a/Day07/res/ipython-timeit.png b/Day01-15/Day07/res/ipython-timeit.png similarity index 100% rename from Day07/res/ipython-timeit.png rename to Day01-15/Day07/res/ipython-timeit.png diff --git a/Day07/res/python-set.png b/Day01-15/Day07/res/python-set.png similarity index 100% rename from Day07/res/python-set.png rename to Day01-15/Day07/res/python-set.png diff --git a/Day07/scoretable.py b/Day01-15/Day07/scoretable.py similarity index 100% rename from Day07/scoretable.py rename to Day01-15/Day07/scoretable.py diff --git a/Day07/set1.py b/Day01-15/Day07/set1.py similarity index 100% rename from Day07/set1.py rename to Day01-15/Day07/set1.py diff --git a/Day07/set2.py b/Day01-15/Day07/set2.py similarity index 100% rename from Day07/set2.py rename to Day01-15/Day07/set2.py diff --git a/Day07/tic-tac-toe.py b/Day01-15/Day07/tic-tac-toe.py similarity index 100% rename from Day07/tic-tac-toe.py rename to Day01-15/Day07/tic-tac-toe.py diff --git a/Day07/tuple.py b/Day01-15/Day07/tuple.py similarity index 100% rename from Day07/tuple.py rename to Day01-15/Day07/tuple.py diff --git a/Day07/yanghui.py b/Day01-15/Day07/yanghui.py similarity index 100% rename from Day07/yanghui.py rename to Day01-15/Day07/yanghui.py diff --git a/Day07/字符串和常用数据结构.md b/Day01-15/Day07/字符串和常用数据结构.md similarity index 100% rename from Day07/字符串和常用数据结构.md rename to Day01-15/Day07/字符串和常用数据结构.md diff --git a/Day08/access.py b/Day01-15/Day08/access.py similarity index 100% rename from Day08/access.py rename to Day01-15/Day08/access.py diff --git a/Day08/circle.py b/Day01-15/Day08/circle.py similarity index 100% rename from Day08/circle.py rename to Day01-15/Day08/circle.py diff --git a/Day08/clock.py b/Day01-15/Day08/clock.py similarity index 100% rename from Day08/clock.py rename to Day01-15/Day08/clock.py diff --git a/Day08/guess.py b/Day01-15/Day08/guess.py similarity index 100% rename from Day08/guess.py rename to Day01-15/Day08/guess.py diff --git a/Day08/hack.py b/Day01-15/Day08/hack.py similarity index 100% rename from Day08/hack.py rename to Day01-15/Day08/hack.py diff --git a/Day08/rect.py b/Day01-15/Day08/rect.py similarity index 100% rename from Day08/rect.py rename to Day01-15/Day08/rect.py diff --git a/Day08/res/object-feature.png b/Day01-15/Day08/res/object-feature.png similarity index 100% rename from Day08/res/object-feature.png rename to Day01-15/Day08/res/object-feature.png diff --git a/Day08/res/oop-zhihu.png b/Day01-15/Day08/res/oop-zhihu.png similarity index 100% rename from Day08/res/oop-zhihu.png rename to Day01-15/Day08/res/oop-zhihu.png diff --git a/Day08/student.py b/Day01-15/Day08/student.py similarity index 100% rename from Day08/student.py rename to Day01-15/Day08/student.py diff --git a/Day08/test.py b/Day01-15/Day08/test.py similarity index 100% rename from Day08/test.py rename to Day01-15/Day08/test.py diff --git a/Day08/面向对象编程基础.md b/Day01-15/Day08/面向对象编程基础.md similarity index 100% rename from Day08/面向对象编程基础.md rename to Day01-15/Day08/面向对象编程基础.md diff --git a/Day09/association.py b/Day01-15/Day09/association.py similarity index 100% rename from Day09/association.py rename to Day01-15/Day09/association.py diff --git a/Day09/car1.py b/Day01-15/Day09/car1.py similarity index 100% rename from Day09/car1.py rename to Day01-15/Day09/car1.py diff --git a/Day09/car2.py b/Day01-15/Day09/car2.py similarity index 100% rename from Day09/car2.py rename to Day01-15/Day09/car2.py diff --git a/Day09/clock.py b/Day01-15/Day09/clock.py similarity index 100% rename from Day09/clock.py rename to Day01-15/Day09/clock.py diff --git a/Day09/dependency.py b/Day01-15/Day09/dependency.py similarity index 100% rename from Day09/dependency.py rename to Day01-15/Day09/dependency.py diff --git a/Day09/diamond.py b/Day01-15/Day09/diamond.py similarity index 100% rename from Day09/diamond.py rename to Day01-15/Day09/diamond.py diff --git a/Day09/employee.py b/Day01-15/Day09/employee.py similarity index 100% rename from Day09/employee.py rename to Day01-15/Day09/employee.py diff --git a/Day09/multi.py b/Day01-15/Day09/multi.py similarity index 100% rename from Day09/multi.py rename to Day01-15/Day09/multi.py diff --git a/Day09/pet.py b/Day01-15/Day09/pet.py similarity index 100% rename from Day09/pet.py rename to Day01-15/Day09/pet.py diff --git a/Day09/rational.py b/Day01-15/Day09/rational.py similarity index 100% rename from Day09/rational.py rename to Day01-15/Day09/rational.py diff --git a/Day09/res/uml-components.png b/Day01-15/Day09/res/uml-components.png similarity index 100% rename from Day09/res/uml-components.png rename to Day01-15/Day09/res/uml-components.png diff --git a/Day09/res/uml-example.gliffy b/Day01-15/Day09/res/uml-example.gliffy similarity index 100% rename from Day09/res/uml-example.gliffy rename to Day01-15/Day09/res/uml-example.gliffy diff --git a/Day09/res/uml-example.png b/Day01-15/Day09/res/uml-example.png similarity index 100% rename from Day09/res/uml-example.png rename to Day01-15/Day09/res/uml-example.png diff --git a/Day09/shape.py b/Day01-15/Day09/shape.py similarity index 100% rename from Day09/shape.py rename to Day01-15/Day09/shape.py diff --git a/Day09/triangle.py b/Day01-15/Day09/triangle.py similarity index 100% rename from Day09/triangle.py rename to Day01-15/Day09/triangle.py diff --git a/Day09/面向对象进阶.md b/Day01-15/Day09/面向对象进阶.md similarity index 100% rename from Day09/面向对象进阶.md rename to Day01-15/Day09/面向对象进阶.md diff --git a/Day10/ball.py b/Day01-15/Day10/ball.py similarity index 100% rename from Day10/ball.py rename to Day01-15/Day10/ball.py diff --git a/Day10/gui1.py b/Day01-15/Day10/gui1.py similarity index 100% rename from Day10/gui1.py rename to Day01-15/Day10/gui1.py diff --git a/Day10/gui2.py b/Day01-15/Day10/gui2.py similarity index 100% rename from Day10/gui2.py rename to Day01-15/Day10/gui2.py diff --git a/Day10/gui3.py b/Day01-15/Day10/gui3.py similarity index 100% rename from Day10/gui3.py rename to Day01-15/Day10/gui3.py diff --git a/Day10/res/ball-game.png b/Day01-15/Day10/res/ball-game.png similarity index 100% rename from Day10/res/ball-game.png rename to Day01-15/Day10/res/ball-game.png diff --git a/Day10/res/ball.png b/Day01-15/Day10/res/ball.png similarity index 100% rename from Day10/res/ball.png rename to Day01-15/Day10/res/ball.png diff --git a/Day10/turtle1.py b/Day01-15/Day10/turtle1.py similarity index 100% rename from Day10/turtle1.py rename to Day01-15/Day10/turtle1.py diff --git a/Day10/图形用户界面和游戏开发.md b/Day01-15/Day10/图形用户界面和游戏开发.md similarity index 100% rename from Day10/图形用户界面和游戏开发.md rename to Day01-15/Day10/图形用户界面和游戏开发.md diff --git a/Day11/.py b/Day01-15/Day11/.py similarity index 100% rename from Day11/.py rename to Day01-15/Day11/.py diff --git a/Day11/csv1.py b/Day01-15/Day11/csv1.py similarity index 100% rename from Day11/csv1.py rename to Day01-15/Day11/csv1.py diff --git a/Day11/csv2.py b/Day01-15/Day11/csv2.py similarity index 100% rename from Day11/csv2.py rename to Day01-15/Day11/csv2.py diff --git a/Day11/ex1.py b/Day01-15/Day11/ex1.py similarity index 100% rename from Day11/ex1.py rename to Day01-15/Day11/ex1.py diff --git a/Day11/ex2.py b/Day01-15/Day11/ex2.py similarity index 100% rename from Day11/ex2.py rename to Day01-15/Day11/ex2.py diff --git a/Day11/ex3.py b/Day01-15/Day11/ex3.py similarity index 100% rename from Day11/ex3.py rename to Day01-15/Day11/ex3.py diff --git a/Day11/ex4.py b/Day01-15/Day11/ex4.py similarity index 100% rename from Day11/ex4.py rename to Day01-15/Day11/ex4.py diff --git a/Day11/example.csv b/Day01-15/Day11/example.csv similarity index 100% rename from Day11/example.csv rename to Day01-15/Day11/example.csv diff --git a/Day11/file1.py b/Day01-15/Day11/file1.py similarity index 100% rename from Day11/file1.py rename to Day01-15/Day11/file1.py diff --git a/Day11/file2.py b/Day01-15/Day11/file2.py similarity index 100% rename from Day11/file2.py rename to Day01-15/Day11/file2.py diff --git a/Day11/file3.py b/Day01-15/Day11/file3.py similarity index 100% rename from Day11/file3.py rename to Day01-15/Day11/file3.py diff --git a/Day11/file4.py b/Day01-15/Day11/file4.py similarity index 100% rename from Day11/file4.py rename to Day01-15/Day11/file4.py diff --git a/Day11/json1.py b/Day01-15/Day11/json1.py similarity index 100% rename from Day11/json1.py rename to Day01-15/Day11/json1.py diff --git a/Day11/json2.py b/Day01-15/Day11/json2.py similarity index 100% rename from Day11/json2.py rename to Day01-15/Day11/json2.py diff --git a/Day11/mm.jpg b/Day01-15/Day11/mm.jpg similarity index 100% rename from Day11/mm.jpg rename to Day01-15/Day11/mm.jpg diff --git a/Day11/pi_million_digits.txt b/Day01-15/Day11/pi_million_digits.txt similarity index 100% rename from Day11/pi_million_digits.txt rename to Day01-15/Day11/pi_million_digits.txt diff --git a/Day11/res/file-open-mode.png b/Day01-15/Day11/res/file-open-mode.png similarity index 100% rename from Day11/res/file-open-mode.png rename to Day01-15/Day11/res/file-open-mode.png diff --git a/Day11/teacher.csv b/Day01-15/Day11/teacher.csv similarity index 100% rename from Day11/teacher.csv rename to Day01-15/Day11/teacher.csv diff --git a/Day11/文件和异常.md b/Day01-15/Day11/文件和异常.md similarity index 100% rename from Day11/文件和异常.md rename to Day01-15/Day11/文件和异常.md diff --git a/Day11/致橡树.txt b/Day01-15/Day11/致橡树.txt similarity index 100% rename from Day11/致橡树.txt rename to Day01-15/Day11/致橡树.txt diff --git a/Day12/res/tel-start-number.png b/Day01-15/Day12/res/tel-start-number.png similarity index 100% rename from Day12/res/tel-start-number.png rename to Day01-15/Day12/res/tel-start-number.png diff --git a/Day12/str1.py b/Day01-15/Day12/str1.py similarity index 100% rename from Day12/str1.py rename to Day01-15/Day12/str1.py diff --git a/Day12/str2.py b/Day01-15/Day12/str2.py similarity index 100% rename from Day12/str2.py rename to Day01-15/Day12/str2.py diff --git a/Day12/test3.py b/Day01-15/Day12/test3.py similarity index 100% rename from Day12/test3.py rename to Day01-15/Day12/test3.py diff --git a/Day12/test4.py b/Day01-15/Day12/test4.py similarity index 100% rename from Day12/test4.py rename to Day01-15/Day12/test4.py diff --git a/Day12/test5.py b/Day01-15/Day12/test5.py similarity index 100% rename from Day12/test5.py rename to Day01-15/Day12/test5.py diff --git a/Day12/字符串和正则表达式.md b/Day01-15/Day12/字符串和正则表达式.md similarity index 100% rename from Day12/字符串和正则表达式.md rename to Day01-15/Day12/字符串和正则表达式.md diff --git a/Day13/asyncio1.py b/Day01-15/Day13/asyncio1.py similarity index 100% rename from Day13/asyncio1.py rename to Day01-15/Day13/asyncio1.py diff --git a/Day13/asyncio2.py b/Day01-15/Day13/asyncio2.py similarity index 100% rename from Day13/asyncio2.py rename to Day01-15/Day13/asyncio2.py diff --git a/Day13/asyncio3.py b/Day01-15/Day13/asyncio3.py similarity index 100% rename from Day13/asyncio3.py rename to Day01-15/Day13/asyncio3.py diff --git a/Day13/coroutine1.py b/Day01-15/Day13/coroutine1.py similarity index 100% rename from Day13/coroutine1.py rename to Day01-15/Day13/coroutine1.py diff --git a/Day13/coroutine2.py b/Day01-15/Day13/coroutine2.py similarity index 100% rename from Day13/coroutine2.py rename to Day01-15/Day13/coroutine2.py diff --git a/Day13/generator1.py b/Day01-15/Day13/generator1.py similarity index 100% rename from Day13/generator1.py rename to Day01-15/Day13/generator1.py diff --git a/Day13/generator2.py b/Day01-15/Day13/generator2.py similarity index 100% rename from Day13/generator2.py rename to Day01-15/Day13/generator2.py diff --git a/Day13/multiprocess1.py b/Day01-15/Day13/multiprocess1.py similarity index 100% rename from Day13/multiprocess1.py rename to Day01-15/Day13/multiprocess1.py diff --git a/Day13/multiprocess2.py b/Day01-15/Day13/multiprocess2.py similarity index 100% rename from Day13/multiprocess2.py rename to Day01-15/Day13/multiprocess2.py diff --git a/Day13/multiprocess3.py b/Day01-15/Day13/multiprocess3.py similarity index 100% rename from Day13/multiprocess3.py rename to Day01-15/Day13/multiprocess3.py diff --git a/Day13/multiprocess4.py b/Day01-15/Day13/multiprocess4.py similarity index 100% rename from Day13/multiprocess4.py rename to Day01-15/Day13/multiprocess4.py diff --git a/Day13/multithread1.py b/Day01-15/Day13/multithread1.py similarity index 100% rename from Day13/multithread1.py rename to Day01-15/Day13/multithread1.py diff --git a/Day13/multithread2.py b/Day01-15/Day13/multithread2.py similarity index 100% rename from Day13/multithread2.py rename to Day01-15/Day13/multithread2.py diff --git a/Day13/multithread3.py b/Day01-15/Day13/multithread3.py similarity index 100% rename from Day13/multithread3.py rename to Day01-15/Day13/multithread3.py diff --git a/Day13/multithread4.py b/Day01-15/Day13/multithread4.py similarity index 100% rename from Day13/multithread4.py rename to Day01-15/Day13/multithread4.py diff --git a/Day13/multithread5.py b/Day01-15/Day13/multithread5.py similarity index 100% rename from Day13/multithread5.py rename to Day01-15/Day13/multithread5.py diff --git a/Day13/multithread6.py b/Day01-15/Day13/multithread6.py similarity index 100% rename from Day13/multithread6.py rename to Day01-15/Day13/multithread6.py diff --git a/Day13/res/macos-monitor.png b/Day01-15/Day13/res/macos-monitor.png similarity index 100% rename from Day13/res/macos-monitor.png rename to Day01-15/Day13/res/macos-monitor.png diff --git a/Day13/singlethread1.py b/Day01-15/Day13/singlethread1.py similarity index 100% rename from Day13/singlethread1.py rename to Day01-15/Day13/singlethread1.py diff --git a/Day13/singlethread2.py b/Day01-15/Day13/singlethread2.py similarity index 100% rename from Day13/singlethread2.py rename to Day01-15/Day13/singlethread2.py diff --git a/Day13/test2.py b/Day01-15/Day13/test2.py similarity index 100% rename from Day13/test2.py rename to Day01-15/Day13/test2.py diff --git a/Day13/test3.py b/Day01-15/Day13/test3.py similarity index 100% rename from Day13/test3.py rename to Day01-15/Day13/test3.py diff --git a/Day13/进程和线程.md b/Day01-15/Day13/进程和线程.md similarity index 100% rename from Day13/进程和线程.md rename to Day01-15/Day13/进程和线程.md diff --git a/Day14/chatclient.py b/Day01-15/Day14/chatclient.py similarity index 100% rename from Day14/chatclient.py rename to Day01-15/Day14/chatclient.py diff --git a/Day14/chatserver.py b/Day01-15/Day14/chatserver.py similarity index 100% rename from Day14/chatserver.py rename to Day01-15/Day14/chatserver.py diff --git a/Day14/fileclient.py b/Day01-15/Day14/fileclient.py similarity index 100% rename from Day14/fileclient.py rename to Day01-15/Day14/fileclient.py diff --git a/Day14/fileserver.py b/Day01-15/Day14/fileserver.py similarity index 100% rename from Day14/fileserver.py rename to Day01-15/Day14/fileserver.py diff --git a/Day14/guido.jpg b/Day01-15/Day14/guido.jpg similarity index 100% rename from Day14/guido.jpg rename to Day01-15/Day14/guido.jpg diff --git a/Day14/mmdownloader.py b/Day01-15/Day14/mmdownloader.py similarity index 100% rename from Day14/mmdownloader.py rename to Day01-15/Day14/mmdownloader.py diff --git a/Day14/res/TCP-IP-model.png b/Day01-15/Day14/res/TCP-IP-model.png similarity index 100% rename from Day14/res/TCP-IP-model.png rename to Day01-15/Day14/res/TCP-IP-model.png diff --git a/Day14/res/after-browser.jpg b/Day01-15/Day14/res/after-browser.jpg similarity index 100% rename from Day14/res/after-browser.jpg rename to Day01-15/Day14/res/after-browser.jpg diff --git a/Day14/res/arpanet.png b/Day01-15/Day14/res/arpanet.png similarity index 100% rename from Day14/res/arpanet.png rename to Day01-15/Day14/res/arpanet.png diff --git a/Day14/res/before-browser.jpg b/Day01-15/Day14/res/before-browser.jpg similarity index 100% rename from Day14/res/before-browser.jpg rename to Day01-15/Day14/res/before-browser.jpg diff --git a/Day14/res/browers.jpg b/Day01-15/Day14/res/browers.jpg similarity index 100% rename from Day14/res/browers.jpg rename to Day01-15/Day14/res/browers.jpg diff --git a/Day14/res/browser-market-place.jpeg b/Day01-15/Day14/res/browser-market-place.jpeg similarity index 100% rename from Day14/res/browser-market-place.jpeg rename to Day01-15/Day14/res/browser-market-place.jpeg diff --git a/Day14/res/how-data-is-processed.jpg b/Day01-15/Day14/res/how-data-is-processed.jpg similarity index 100% rename from Day14/res/how-data-is-processed.jpg rename to Day01-15/Day14/res/how-data-is-processed.jpg diff --git a/Day14/res/osi_rm.gif b/Day01-15/Day14/res/osi_rm.gif similarity index 100% rename from Day14/res/osi_rm.gif rename to Day01-15/Day14/res/osi_rm.gif diff --git a/Day14/res/osimodel.png b/Day01-15/Day14/res/osimodel.png similarity index 100% rename from Day14/res/osimodel.png rename to Day01-15/Day14/res/osimodel.png diff --git a/Day14/res/tcpipprotocols.png b/Day01-15/Day14/res/tcpipprotocols.png similarity index 100% rename from Day14/res/tcpipprotocols.png rename to Day01-15/Day14/res/tcpipprotocols.png diff --git a/Day14/res/telnet.png b/Day01-15/Day14/res/telnet.png similarity index 100% rename from Day14/res/telnet.png rename to Day01-15/Day14/res/telnet.png diff --git a/Day14/socket1.py b/Day01-15/Day14/socket1.py similarity index 100% rename from Day14/socket1.py rename to Day01-15/Day14/socket1.py diff --git a/Day14/socket2.py b/Day01-15/Day14/socket2.py similarity index 100% rename from Day14/socket2.py rename to Day01-15/Day14/socket2.py diff --git a/Day14/socket3.py b/Day01-15/Day14/socket3.py similarity index 100% rename from Day14/socket3.py rename to Day01-15/Day14/socket3.py diff --git a/Day14/socket4.py b/Day01-15/Day14/socket4.py similarity index 100% rename from Day14/socket4.py rename to Day01-15/Day14/socket4.py diff --git a/Day14/socket5.py b/Day01-15/Day14/socket5.py similarity index 100% rename from Day14/socket5.py rename to Day01-15/Day14/socket5.py diff --git a/Day14/timeclient.py b/Day01-15/Day14/timeclient.py similarity index 100% rename from Day14/timeclient.py rename to Day01-15/Day14/timeclient.py diff --git a/Day14/timeserver.py b/Day01-15/Day14/timeserver.py similarity index 100% rename from Day14/timeserver.py rename to Day01-15/Day14/timeserver.py diff --git a/Day14/网络编程入门.md b/Day01-15/Day14/网络编程入门.md similarity index 100% rename from Day14/网络编程入门.md rename to Day01-15/Day14/网络编程入门.md diff --git a/Day15/网络应用开发.md b/Day01-15/Day15/网络应用开发.md similarity index 100% rename from Day15/网络应用开发.md rename to Day01-15/Day15/网络应用开发.md diff --git a/Day41-55/Django2实战02.md b/Day41-55/Django2实战02.md index f3f76f1..b0546d8 100644 --- a/Day41-55/Django2实战02.md +++ b/Day41-55/Django2实战02.md @@ -63,7 +63,7 @@ pymysql.install_as_MySQLdb() ``` -3. 运行manage.py并指定migrate参数实现数据库迁移,为应用程序创建对应的数据表,当然在此之前需要先启动MySQL数据库服务器并创建名为oa的数据库,在MySQL中创建数据库的语句如下所示。 +3. 运行manage.py并指定migrate参数实现数据库迁移,为应用程序创建对应的数据表,当然在此之前需要**先启动MySQL数据库服务器并创建名为oa的数据库**,在MySQL中创建数据库的语句如下所示。 ```SQL drop database if exists oa; @@ -120,6 +120,7 @@ no = models.IntegerField(primary_key=True, db_column='eno', verbose_name='员工编号') name = models.CharField(max_length=20, db_column='ename', verbose_name='员工姓名') job = models.CharField(max_length=10, verbose_name='职位') + # 自参照完整性多对一外键关联 mgr = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, blank=True, verbose_name='主管编号') sal = models.DecimalField(max_digits=7, decimal_places=2, verbose_name='月薪') comm = models.DecimalField(max_digits=7, decimal_places=2, null=True, blank=True, verbose_name='补贴') @@ -155,16 +156,145 @@ ### 在后台管理模型 1. 创建超级管理员账号。 -2. 登录后台管理系统。 + + ```Shell + (venv)$ python manage.py createsuperuser + Username (leave blank to use 'hao'): jackfrued + Email address: jackfrued@126.com + Password: + Password (again): + Superuser created successfully. + ``` + +2. 启动Web服务器,登录后台管理系统。 + + ```Shell + (venv)$ python manage.py runserver + ``` + + 访问,会来到如下图所示的登录界面。 + + ![](./res/admin-login.png) + + 登录后进入管理员操作平台。 + + ![](./res/admin-welcome.png) + + 至此我们还没有看到之前创建的模型类,需要在应用的admin.py文件中模型进行注册。 + 3. 注册模型类。 + + ```Shell + (venv)$ cd hrs + (venv)$ vim admin.py + ``` + + ```Python + from django.contrib import admin + + from hrs.models import Emp, Dept + + admin.site.register(Dept) + admin.site.register(Emp) + + ``` + + 注册模型类后,就可以在后台管理系统中看到它们。 + + ![](./res/admin-model.png) + 4. 对模型进行CRUD操作。 + + 可以在管理员平台对模型进行C(新增)R(查看)U(更新)D(删除)操作,如下图所示。 + + 添加新的部门。 + + ![](./res/admin-model-create.png) + + 查看所有部门。 + + ![](./res/admin-model-read.png) + + 更新和删除部门。 + + ![](./res/admin-model-delete-and-update.png) + 5. 注册模型管理类。 + 再次修改admin.py文件,通过注册模型管理类,可以在后台管理系统中更好的管理模型。 + + ```Python + from django.contrib import admin + + from hrs.models import Emp, Dept + + + class DeptAdmin(admin.ModelAdmin): + + list_display = ('no', 'name', 'location') + ordering = ('no', ) + + + class EmpAdmin(admin.ModelAdmin): + + list_display = ('no', 'name', 'job', 'mgr', 'sal', 'comm', 'dept') + search_fields = ('name', 'job') + + + admin.site.register(Dept, DeptAdmin) + admin.site.register(Emp, EmpAdmin) + + ``` + + ![](./res/admin-model-depts.png) + + ![](./res/admin-model-emps.png) + + 为了更好的查看模型数据,可以为Dept和Emp两个模型类添加`__str__`魔法方法。 + + ```Python + from django.db import models + + + class Dept(models.Model): + """部门类""" + + # 此处省略上面的代码 + + def __str__(self): + return self.name + + # 此处省略下面的代码 + + + class Emp(models.Model): + """员工类""" + + # 此处省略上面的代码 + + mgr = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, blank=True, verbose_name='直接主管') + + # 此处省略下面的代码 + + # 此处省略上面的代码 + + def __str__(self): + return self.name + + # 此处省略下面的代码 + + ``` + + 修改代码后刷新查看Emp模型的页面,效果如下图所示。 + + ![](./res/admin-model-emps-modified.png) + ### 使用ORM完成模型的CRUD操作 -我们先在shell中演示如何利用Django中内置的ORM框架对模型进行CRUD(Create / Read / Update / Delete)操作。 +在了解了Django提供的模型管理平台之后,我们来看看如何从代码层面完成对模型的CRUD(Create / Read / Update / Delete)操作。我们可以通过manage.py开启Shell交互式环境,然后使用Django内置的ORM框架对模型进行CRUD操作。 ```Shell +(venv)$ cd .. (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 @@ -173,25 +303,100 @@ Type "help", "copyright", "credits" or "license" for more information. >>> ``` - - #### 新增 - - -#### 删除 - - +```Shell +>>> +>>> from hrs.models import Dept, Emp +>>> dept = Dept(40, '研发2部', '深圳') +>>> dept.save() +``` #### 更新 - +```Shell +>>> +>>> dept.name = '研发3部' +>>> dept.save() +``` #### 查询 +查询所有对象。 +```Shell +>>> +>>> Dept.objects.all() +, , , ]> +``` -最后,我们通过上面掌握的知识来实现部门展示以及根据部门获取部门对应员工信息的功能,效果如下图所示,对应的代码可以访问。 +过滤数据。 + +```Shell +>>> +>>> Dept.objects.filter(name='研发3部') # 查询部门名称为“研发3部”的部门 +]> +>>> +>>> Dept.objects.filter(name__contains='研发') # 查询部门名称包含“研发”的部门(模糊查询) +, ]> +>>> +>>> Dept.objects.filter(no__gt=10).filter(no__lt=40) # 查询部门编号大于10小于40的部门 +, ]> +``` + +查询单个对象。 + +```Shell +>>> +>>> Dept.objects.get(pk=10) + +>>> Dept.objects.get(no=20) + +>>> Dept.objects.get(no__exact=30) + +``` + +排序数据。 + +```Shell +>>> +>>> Dept.objects.order_by('no') # 查询所有部门按部门编号升序排列 +, , , ]> +>>> Dept.objects.order_by('-no') # 查询所有部门按部门编号降序排列 +, , , ]> +``` + +切片数据。 + +```Shell +>>> +>>> Dept.objects.order_by('no')[0:2] # 按部门编号排序查询1~2部门 +, ]> +>>> Dept.objects.order_by('no')[2:4] # 按部门编号排序查询3~4部门 +, ]> +``` + +高级查询。 + +```Shell +>>> +>>> Emp.objects.filter(dept__no=10) # 根据部门编号查询该部门的员工 +, , ]> +>>> Emp.objects.filter(dept__name__contains='销售') # 查询名字包含“销售”的部门的员工 +]> +>>> Dept.objects.get(pk=10).emp_set.all() # 通过部门反查部门所有的员工 +, , ]> +``` + +> 说明:由于员工与部门之间存在外键关联,所以也能通过部门反向查询该部门的员工(从一对多关系中“一”的一方查询“多”的一方),默认情况下反查属性名是`类名小写_set`(例子中的`emp_set`),当然也可以在创建模型时通过`related_name`指定反查属性的名字。 + +#### 删除 + +```Shell + +``` + +最后,我们通过上面掌握的知识来实现部门展示以及根据部门获取部门对应员工信息的功能,效果如下图所示,对应的代码可以访问<>。 ### Django模型最佳实践 diff --git a/Day41-55/res/admin-login.png b/Day41-55/res/admin-login.png new file mode 100644 index 0000000..15ea232 Binary files /dev/null and b/Day41-55/res/admin-login.png differ diff --git a/Day41-55/res/admin-model-create.png b/Day41-55/res/admin-model-create.png new file mode 100644 index 0000000..5d07891 Binary files /dev/null and b/Day41-55/res/admin-model-create.png differ diff --git a/Day41-55/res/admin-model-delete-and-update.png b/Day41-55/res/admin-model-delete-and-update.png new file mode 100644 index 0000000..87d709c Binary files /dev/null and b/Day41-55/res/admin-model-delete-and-update.png differ diff --git a/Day41-55/res/admin-model-depts.png b/Day41-55/res/admin-model-depts.png new file mode 100644 index 0000000..7214544 Binary files /dev/null and b/Day41-55/res/admin-model-depts.png differ diff --git a/Day41-55/res/admin-model-emps-modified.png b/Day41-55/res/admin-model-emps-modified.png new file mode 100644 index 0000000..27c6205 Binary files /dev/null and b/Day41-55/res/admin-model-emps-modified.png differ diff --git a/Day41-55/res/admin-model-emps.png b/Day41-55/res/admin-model-emps.png new file mode 100644 index 0000000..b9b7953 Binary files /dev/null and b/Day41-55/res/admin-model-emps.png differ diff --git a/Day41-55/res/admin-model-read.png b/Day41-55/res/admin-model-read.png new file mode 100644 index 0000000..135437b Binary files /dev/null and b/Day41-55/res/admin-model-read.png differ diff --git a/Day41-55/res/admin-model.png b/Day41-55/res/admin-model.png new file mode 100644 index 0000000..12fa9e0 Binary files /dev/null and b/Day41-55/res/admin-model.png differ diff --git a/Day41-55/res/admin-welcome.png b/Day41-55/res/admin-welcome.png new file mode 100644 index 0000000..2371ffe Binary files /dev/null and b/Day41-55/res/admin-welcome.png differ diff --git a/README.md b/README.md index aa52472..6fe0059 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ - Don't be one of the leeches. - Either stand out or kicked out. -### Python语言基础 +### Day01~15 - [Python语言基础](./Day01-15) #### Day01 - [初识Python](./Day01/初识Python.md) @@ -156,13 +156,11 @@ - 电子邮件 - SMTP协议 / POP3协议 / IMAP协议 / smtplib模块 / poplib模块 / imaplib模块 - 短信服务 - twilio模块 / 国内的短信服务 -#### Day16~Day20 - [Python进阶知识 ](./Day16-20/Python进阶知识.md) +### Day16~Day20 - [Python语言进阶 ](./Day16-20/Python语言进阶.md) -### Web前端+Linux基础+数据库基础 - -#### [Day21~30](./Day21-30/Web前端概述.md) +### [Day21~30](./Day21-30/Web前端概述.md) - 用HTML标签承载页面内容 - 用CSS渲染页面 @@ -170,7 +168,7 @@ - jQuery入门和提高 - Bootstrap在Web项目中的应用 -#### [Day31-35](./Day31-35/玩转Linux操作系统.md) +### [Day31-35](./Day31-35/玩转Linux操作系统.md) - 操作系统发展史和Linux概述 - Linux基础命令 @@ -182,7 +180,7 @@ - 网络访问和管理 - 其他相关内容 -#### Day36-40 +### Day36-40 - [关系型数据库MySQL](./Day36-40/关系型数据库MySQL.md) - 关系型数据库概述 @@ -201,7 +199,7 @@ - Redis高级操作和集群 - 在Python中操作Redis -### Python的Web框架 - Django +### Day41~55 - [Django](./Day41-55) #### Day41 - [Django实战(01) - 快速上手](./Day41-55/Django2实战01.md) @@ -232,7 +230,7 @@ - Web应用安全保护 -### Python的Web框架 - Flask +### Day56~65 - [Flask](./Day56-65) #### Day56 - [Flask安装和入门](./Day56-65/Flash安装和入门.md) @@ -249,7 +247,7 @@ - 性能和测试 - 项目部署 -### 爬虫 +### Day66~75 - [爬虫](./Day66-75) #### Day66 - [爬虫简介和相关工具](./Day66-75/爬虫简介和相关工具.md) @@ -271,11 +269,11 @@ #### Day75 - [Scrapy的应用(3)](./Day66-75/Scrapy的应用3.md) -### 数据处理和机器学习 +### Day76~90 - 数据处理和机器学习 -### 团队项目开发 +### Day91~100 - 团队项目开发