python - 我应该怎么做才能让我的照片出现在 Django only safari 中?
问题描述
我制作了我的macbook磁盘格式。在格式之后,我包含了我的项目。但是,照片不会显示在项目页面上。如果我去一个特定的产品,(单页)这是一张照片。标志也是可见的。图片不只是集体展示给我。
Safari 没有看到“css/mdb.min.css”
也许我没有安装任何东西?之前,一切正常。
这里图片展示 product.html
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ product.name }} - PVB {% endblock %}
{% block content %}
<main class="mt-5 pt-4">
<div class="container dark-grey-text mt-5">
<!--Grid row-->
<div class="row wow fadeIn">
<!--Grid column-->
<div class="col-md-6 mb-4">
<img src="{{ product.photo.url }}" class="img-fluid" alt="">
</div>
<!--Grid column-->
<div class="col-md-6 mb-4">
<!--Content-->
<div class="p-4">
<div>
<h2>{{product.product_name}}</h2><hr>
<h5><p>Description</p></h5>
<p class="text-justify"><h6>{{product.description}}</h6></p>
<p class="text-justify"><h6>Weight: {{product.weight}}g</h6></p><hr>
</div>
</div>
</div>
</div>
<hr>
</div>
</main>
{% endblock %}
这里没有 products.html
{% extends 'base.html' %}
{% load static %}
{% block title %} Offer - PVB {% endblock %}
{% block content %}
<section id="marks">
<div class="container">
<header>
<h1>Our Offer</h1>
</header>
</div>
</section>
<!-- Offers -->
<section class="text-center mb-4 py-4">
<div class="container">
<div class="row">
{% if products %}
{% for product in products %}
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4">
<div class="card">
<div class="view overlay">
<img src="{{ product.photo.url }}" class="card-img-top" alt="">
<a href="{% url 'product' product.id %}">
<div class="mask rgba-white-slight"></div>
</a>
</div>
<div class="card-body text-center">
<h6 class="grey-text">{{ product.category }}</h6>
<h5>
<strong>
<a href="{% url 'product' product.id %}" class="text-product">{{ product.product_name }}</a>
</strong>
</h5>
</div>
</div>
</div>
<!--Grid column-->
{% endfor %}
{% else %}
<div class="col-sm-12 sm-12">
<p>No Products Available</p>
</div>
{% endif %}
</div>
</div>
</section>
{% endblock %}
解决方案
检查您的媒体文件夹,可能是空的
推荐阅读
- elasticsearch - Spring弹性搜索集成:引起:java.lang.NoSuchMethodError:org.elasticsearch.common.settings.Settings$Builder.put([Ljava/lang/Object;)
- linux - 如何为每个运行的脚本设置计时器
- javascript - 如何防止html页面被缓存?
- python - 读取文本文件并将单词作为排序列表返回
- html - 更改 Bootstrap Navbar 的默认背景颜色
- firebase - Flutter:Stream已经被监听了
- sql - 使用多个表获取记录计数
- c++ - 没有调用单例的构造函数
- autodesk-forge - 将 DWG 文件转换为 SVF 文件后会发生什么情况?
- python - Python pandas连接列csv