django和python版本選擇
目前django版本已經到了1.10,應該馬上會升到2.0版本,2.0版本后將會徹底放棄python2的支持,僅支持python3,所以為了跟上節奏,本專題將python35和django1.10版本。
django和python的安裝比較簡單,相信都沒有問題。這里先略過,以后有時間再來補上。大致過程如下:
安裝python35
安裝django1.10
安裝數據庫mysql
參考:http://jingyan.baidu.com/article/f3ad7d0ffc061a09c3345bf0.html
安裝mysql-python
驗證安裝是否正常
# python和django版本驗證
C:\Users\max352>python35
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.__version__
'1.10.2'
>>> exit()
# mysql驗證
C:\Users\max352>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 423
Server version: 5.6.34 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
編輯器/IDE選擇
根據個人愛好,選擇自己常用的就OK。對于python開發人員,我比較推薦pycharm,對django開發的支持非常友好,如果你還沒有用過其他IDE的話,推薦你嘗試一下。這是一個收費的IDE,如果不差錢還是購買一個吧,支持一下開發人員。
準備好基本的開發環境,就可以開始我們的代碼之旅了。