第1.2章 運行django

來源:互聯網
上載者:User

新建立的django項目,目錄如下 manage.py
通django項目一起工作的工具。 settings.py
包含項目的預設設定,包括資料庫資訊、調試標誌以及其他一些重要的變數。 urls.py
將url模式映射到應用程式上的設定檔。


通過python manage.py runserver運行,

也可以按照下圖進行設定,運行manage.py

Performing system checks...System check identified no issues (0 silenced).You have 13 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.November 28, 2016 - 10:05:36Django version 1.10.2, using settings 'mysite.settings'Starting development server at http://127.0.0.1:8000/Quit the server with CTRL-BREAK.


上圖顯示頁面請求成功,在後台可以看到日誌,從左至右有4個部分:時間戳記、請求、HTTP狀態代碼、以及位元組數。
[28/Nov/2016 10:05:49] "GET / HTTP/1.1" 200 1767

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.