当前位置:网站首页>直播app源码,在无法显示图片的基础上添加图片显示功能
直播app源码,在无法显示图片的基础上添加图片显示功能
2022-04-21 17:31:00 【云豹网络科技】
直播app源码,在无法显示图片的基础上添加图片显示功能
在settings.py中添加如下代码
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
在你的主项目的urls.py下添加如下代码
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import staticfiles
from django.contrib.staticfiles.urls import static
from . import settings
在最后添加如下代码
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
以上就是直播app源码,在无法显示图片的基础上添加图片显示功能, 更多内容欢迎关注之后的文章
版权声明
本文为[云豹网络科技]所创,转载请带上原文链接,感谢
https://yunbaozhibo.blog.csdn.net/article/details/124320661
边栏推荐
- 故障分析 | Federated 存储引擎表导致监控线程处于 Opening table 状态
- Ros2 abandonment guide 5: creating topic for ros2
- Considering loose coupling of microservice architecture? Be careful of these traps
- 本田北美产品规划发布!Insight混动停产,CR-V、雅阁即将发布
- OpenHarmony-UI框架适配层浅析(一)
- redis实现乐观锁
- The second spring of NFT sector - everything you need to know about the early layout of Solana's rising NFT ecosystem
- [interview ordinary people vs Expert Series] understanding of B tree and B + tree
- ROS2放弃指南5:创建ros2的topic
- 理想ONE终于换代?全新产品序列定名L8,重度伪装路试照曝光
猜你喜欢

MySQL: 1103 error solution

338-Leetcode 同构字符串

Image Manipulation Detection by Multi-View Multi-Scale Supervision

手机日期插件 (转加上自己喜欢的)

Tips for idea cup filling -- Realizing mouse sliding guide bag

前五章内容思维导图

Image Manipulation Detection by Multi-View Multi-Scale Supervision

Vitis HLS build project and generate IP core (vivado HLS)

.NET Core企业微信网页授权登录

1044. 最长重复子串
随机推荐
MySQL查询语句关键字执行的优先级问题
【微服务】微服务安全 - 如何保护您的微服务基础架构?
R语言使用plot函数可视化数据散点图,自定义设置col参数为因子变量、自定义颜色列表、不同分组的数据点使用不同的颜色显示(color by group)
Detection, tracking, behavior recognition all in one! Industrial pedestrian analysis system is heavy and open source!
FastReport Business Graphics . NET
Control @ schedule on in different environments
数字化时代,企业运维面临现状及挑战分析解读
MOS管和IGBT有什么区别?别傻傻分不清了
[interview ordinary people vs Expert Series] can you talk about CAS mechanism?
About riched32 DLL Trojan horse
Redis has three modes - master-slave replication, sentinel mode and cluster
结构体malloc bug
wx-open-launch-weapp 样式问题
Spark SQL底层执行流程详解
jedis的基本使用
A simple and easy-to-use file upload scheme
[free] download 19860 yuan programming course materials on a platform, only once
SSD_Resnet 飞机与油桶数据集实战
Vivado verifies the IP core generated by Vitis HLS
mysql主键id自定义