<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style> .img-div > img {
width: 30%; padding: 10%; } .img-div {
display: flex; align-items: center; justify-content: center; } </style>
</head>
<body>
<h1>用戶列表</h1>
<div class="img-div">
<img src="/static/img/fearless_contract.jpg"/>
<img src="/static/img/eternal_disaster.jpg"/>
</div>
</body>
</html>
# 上面代碼略
# 根靜態目錄
STATIC_URL = '/static/'
# 解決靜態資源無法找到
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static').replace('\\', '/'),
os.path.join(BASE_DIR, 'app/static').replace('\\', '/'),
]
# 下面代碼略
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style> .img-div > img {
width: 30%; padding: 10%; } .img-div {
display: flex; align-items: center; justify-content: center; } </style>
</head>
<body>
<h1>用戶列表</h1>
<div class="img-div">
<img src="{% static 'img/fearless_contract.jpg' %}"/>
<img src="{% static 'img/eternal_disaster.jpg' %}"/>
</div>
</body>
</html>
# 上面代碼略
# 根靜態目錄
STATIC_URL = '/static/'
# 解決靜態資源無法找到
# STATICFILES_DIRS = [
# os.path.join(BASE_DIR, 'static').replace('\\', '/'),
# os.path.join(BASE_DIR, 'app/static').replace('\\', '/'),
#]
# 下面代碼略
2021 year 3 month Python Analy
# 1. Enter lowercase words and