main
syk1209wwz0306 6 months ago
parent 303b85a011
commit 4903aa1da5

@ -8,10 +8,7 @@
/* ... 保留原有的样式定义 ... */ /* ... 保留原有的样式定义 ... */
</style> </style>
'''<a href="{% url 'detail' movie.pk %}">
<img src="{% static 'movie/poster/'|add:movie.imdb_id|add:".jpg" %}" alt="{{ movie.name }}">
</a>
'''
<!-- 展示电影信息 --> <!-- 展示电影信息 -->
<div class="container"> <div class="container">

@ -26,14 +26,17 @@
<div class="container"> <div class="container">
<!-- 展示电影图片 --> <!-- 展示电影图片 -->
{% for movie in movies %} {% for movie in movies %}
<div class="item"> <a href="{% url 'movie:detail' movie.pk %}" class="item">
<div class="poster_div"> <div class="poster_div">
<img src="/static/movie/poster/{{ movie.imdb_id }}.jpg" alt="{{ movie.name }}"> <img src="/static/movie/poster/{{ movie.imdb_id }}.jpg" alt="">
<p>{{ movie.name }}</p> <p>{{ movie.name }}
</div> <strong style="color:#e09015">{{ movie.get_score }}</strong>
</div> </p>
{% endfor %} </div>
</a>
{% endfor %}
</div> </div>
<!-- 分页导航 --> <!-- 分页导航 -->

Loading…
Cancel
Save