我是第一次使用 pinax 模板。我正在关注文档。
我开始了这个元素。是否提到了所有内容 here .
问题是页面已显示,但未加载 css 和 javascript 文件。
浏览器控制台给出错误提示
Failed to load resource: the server responded with a status of 404 (Not Found) app.css
Failed to load resource: the server responded with a status of 404 (Not Found) site.js
我在这里遗漏了什么吗?是否还有文档中没有的其他操作?
最佳答案
编辑:确保在继续之前安装了节点。
安装 Pinax 元素的新流程(自 2018 年 1 月 3 日起运行):
# First, activate your virtualenv or similar
. ~/.virtualenvs/myproject/bin/activate
# Second, install Pinax command line tool
pip install pinax-cli
# Install Pinax project
pinax start {project type} {custom name}
cd {custom name}
# Install your project's dependencies from 'package.json' into node_modules/
npm install
# Install Django/Pinax dependencies
pip install -r requirements.txt
# Prepare for Django
python manage.py migrate
python manage.py loaddata sites
python manage.py createsuperuser
# Run a proxy on port 3000
npm run dev # this will run webpack with watch and compile code as it changes
# Browse to http://127.0.0.1:3000
注意:元素中的 README.md 文件应该为您提供正确的安装说明。
关于css - 找不到 Pinax app.css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47853246/