日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > CSS >内容正文

CSS

django css_在应用程序上实现CSS Django的

發布時間:2025/3/11 CSS 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 django css_在应用程序上实现CSS Django的 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

django css

CSS (Cascade Style Sheets) are used to implement design.

CSS(級聯樣式表)用于實現設計。

Step 1: Create a Sandbox, Activate it, Install Django and Create Sample Project

步驟1:創建一個沙箱,將其激活,安裝Django并創建示例項目

Creating Sandbox

創建沙箱

Activating it

激活它

Installing Django

安裝Django

Creating Sample Project [myapp]

創建示例項目[myapp]

Project Structure [myapp]

項目結構[myapp]

Step 2: Add a new folder (i.e. static) in root location (i.e. myapp folder[outer])

步驟2:在根目錄(即myapp文件夾[外部])中添加一個新文件夾(即靜態)

Step 3: Now go to https://getbootstrap.com/docs/3.3/ and download bootstrap files. I am using bootstrap CSS to style myapp

步驟3:現在轉到https://getbootstrap.com/docs/3.3/并下載引導程序文件。 我正在使用Bootstrap CSS樣式化myapp

.minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}} .minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}}

Step 4: Add bootstrap files to static folder

步驟4:將引導文件添加到靜態文件夾

Step 5: Add site.css (my own css) to static folder

步驟5:將site.css(我自己的css)添加到靜態文件夾

Step 6: Add static folder path to settings.pyof admin app (i.e. myapp[inner])

步驟6:將靜態文件夾路徑添加到settings.pyof管理應用程序(即myapp [inner])

Step 7: Add a new folder templates for HTML Templates in project folder (i.e. myapp[outer])

步驟7:在項目文件夾(即myapp [outer])中為HTML模板添加新的文件夾模板

.minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}} .minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}}

Step 8: Add templates location to setting.py in admin app (i.emyapp[inner])

步驟8:在管理應用程式(i.emyapp [inner])中將范本位置新增至setting.py

Step 9: Add a master page (base.html) in templates folder

步驟9:在模板文件夾中添加母版頁(base.html)

Sections of Head Tag of base.html

base.html標題標簽的部分

Sections of Body Tag of base.html

base.html的身體標簽部分

Step 10: Now Add child pages (i.e. index.html, home.html etc)

步驟10:現在添加子頁面(即index.html,home.html等)

Index.html

Index.html

Home.html

Home.html

About.html

About.html

Contact.html

Contact.html

Gallary.html

Gallary.html

Feedback.html

Feedback.html

Register.html

Register.html

Login.html

Login.html

Step 11: Add a controller file (views.py) to manage views in admin app (i.e. myapp[inner])

步驟11:添加控制器文件(views.py)以管理管理應用程序中的視圖(即myapp [inner])

.minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}} .minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}}

Step 12: Add controller actions (functions) to views.py to manage requests.

步驟12:將控制器動作(功能)添加到views.py以管理請求。

Step 13: Add new url to urls.py in admin app (i.e. myapp[inner])

第13步:在管理應用程序(即myapp [inner])中將新的url添加到urls.py中

Step 14: Run the Server

步驟14:運行服務器

Step 15: Open Browser and type http://127.0.0.1:8000

步驟15:打開瀏覽器并輸入http://127.0.0.1:8000

翻譯自: https://www.includehelp.com/Django/implement-css-on-an-app.aspx

django css

總結

以上是生活随笔為你收集整理的django css_在应用程序上实现CSS Django的的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。