Giter VIP home page Giter VIP logo

Comments (2)

MaoningGuan avatar MaoningGuan commented on June 14, 2024

找不到config/index.html这个文件的路径,你检查一下'DIRS': [os.path.join(BASE_DIR, 'templates/')],这里的路径是否设置正确。
image
你可以看这些错误提示信息,看django加载templates文件的路径是否是你设置的路径。

from typeidea.

weepelf0 avatar weepelf0 commented on June 14, 2024

非常感谢老师抽空回复,目前这个问题得到了解决;
可能因为我使用的是Django3.0版本,vscode中配置了anaconda虚拟环境,以及macOS系统的原因,
目前解决的办法是通过手写'DIRS': [os.path.join(BASE_DIR, 'templates/')]中【BASE_DIR】替换为本地的绝对路径,
重新运行后可以正确加载本地的样式文件了。
(因为初次使用github,问题本身的排版比较丑,再次感谢老师的耐心阅读和解答)

from typeidea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.