feat: 首页配置封面图上传预览,修复系列活动跳转,活动卡片样式优化
All checks were successful
Deploy to Server / deploy (push) Successful in 1m56s
All checks were successful
Deploy to Server / deploy (push) Successful in 1m56s
This commit is contained in:
@@ -50,10 +50,11 @@ class Activity(models.Model):
|
||||
@property
|
||||
def display_banner_url(self):
|
||||
"""
|
||||
获取Banner显示的URL,优先使用上传的图片
|
||||
获取Banner显示的URL,优先使用上传的图片,返回相对路径避免容器内部地址
|
||||
"""
|
||||
if self.banner:
|
||||
return self.banner.url
|
||||
if self.banner and self.banner.name:
|
||||
from django.conf import settings
|
||||
return settings.MEDIA_URL + self.banner.name
|
||||
return self.banner_url
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user