Code Monkey home page Code Monkey logo

kuiz's Introduction

django實作線上測驗網站

django實作之線上測驗網站, 佈署在 https://yuandata.pythonanywhere.com

測驗頁面

管理員主頁

編輯題目

django 設定說明

django專案設定和啟動步驟。

環境設定

確保開發環境已安裝Python和django。依照以下步驟安裝專案所需依賴套件。

  1. 依賴套件安裝 在終端機(命令提示字元)中,切換至專案目錄,執行以下命令安裝依賴套件:

    pip install -r requirements.txt

資料庫設定

完成依賴套件安裝後,進行資料庫設定。

  1. 建立資料庫遷移 執行以下命令,為模型建立新的資料庫遷移檔案:

    python manage.py makemigrations
  2. 套用資料庫遷移 執行以下命令,套用資料庫遷移以創建資料庫結構:

    python manage.py migrate

建立管理員帳號

為登入django管理後台,需要建立管理員帳號。

執行以下命令並依照提示完成管理員帳號設定:

python manage.py createsuperuser

啟動開發伺服器

完成以上設定,可啟動django開發伺服器運行專案。

執行以下命令啟動伺服器:

python manage.py runserver

伺服器啟動後,透過瀏覽器訪問 http://127.0.0.1:8000/ 查看專案。

kuiz's People

Contributors

yuandata avatar

Stargazers

Stark avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.