Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台首页静态资源不存在 #10

Open
ghost opened this issue Mar 26, 2023 · 7 comments
Open

后台首页静态资源不存在 #10

ghost opened this issue Mar 26, 2023 · 7 comments

Comments

@ghost
Copy link

ghost commented Mar 26, 2023

后台首页的这几个静态资源不存在,看不到效果了。

[26/Mar/2023 15:03:06] "GET /static/lib/jquery/dist/jquery.min.js HTTP/1.1" 404 1947
[26/Mar/2023 15:03:06] "GET /static/lib/admin-lte/dist/css/adminlte.min.css HTTP/1.1" 404 1977
[26/Mar/2023 15:03:06] "GET /static/lib/font-awesome/css/all.min.css HTTP/1.1" 404 1956
[26/Mar/2023 15:03:06] "GET /static/lib/bootstrap/dist/js/bootstrap.min.js HTTP/1.1" 404 1974
[26/Mar/2023 15:03:06] "GET /static/lib/admin-lte/dist/js/adminlte.min.js HTTP/1.1" 404 1971
[26/Mar/2023 15:03:06] "GET /static/lib/chart.js/dist/chart.min.js HTTP/1.1" 404 1950```
@Deali-Axy
Copy link
Owner

请按照项目文档的指引安装前端依赖~

@ganjiayi
Copy link

前端依赖都要这么安装吗?项目部署的时候怎么装?

@ghost
Copy link
Author

ghost commented May 29, 2023

前端依赖都要这么安装吗? 项目部署的时候怎么装?

我是网上下载这几个文件放进去

@Deali-Axy
Copy link
Owner

前端依赖都要这么安装吗?项目部署的时候怎么装?

依然是使用 npm/yarn 等工具先初始化项目依赖

项目部署的时候要先执行 Django 的静态文件收集命令

python manage.py collectstatic

然后把 static_collect 目录上传到服务器

@tuling1900
Copy link

怎样把 static_collect 目录上传到服务器

@tuling1900
Copy link

后台默认账号和密码是多少

@Deali-Axy
Copy link
Owner

后台默认账号和密码是多少

使用Django的命令可以创建管理员账号

python manage.py createsuperuser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants