用Python建設(shè)網(wǎng)站。
時間:2023-07-11 13:42:02 | 來源:網(wǎng)站運營
時間:2023-07-11 13:42:02 來源:網(wǎng)站運營
用Python建設(shè)網(wǎng)站。: python做網(wǎng)站方法步驟:
1、導(dǎo)入django包
可直接在pycharm下載,或者pip/easy_install
Django是一個開放源代碼的Web應(yīng)用框架,由Python寫成。采用了MTV的框架模式,即模型M,視圖V和模版T。它最初是被開發(fā)來用于管理勞倫斯出版集團旗下的一些以新聞內(nèi)容為主的網(wǎng)站的,即是CMS(內(nèi)容管理系統(tǒng))軟件。了解更多加群764261140
2、設(shè)置環(huán)境變量
path 添加 C:/Python27/Lib/site-packages/django/bin;C:/Python27/Scripts
3、新建一個工程
D:/>django-admin.py startproject mysite
4、工程下新建一個app
D:/mysite> python manage.py startapp blog
5、初始化admin后臺數(shù)據(jù)庫
D:/mysite>python manage.py migrate
6、啟動服務(wù)
D:/mysite>python manage.py runserver
注:
HTML、Javacript 和 CSS 都是必學(xué)的三大門功課。Python簡單、好入門、可以干好多事情。小到寫腳本、大到做網(wǎng)站、數(shù)據(jù)分析等等。60分鐘從認知到實踐python爬蟲