MxTheo / travelingguestbook

Thank the stranger for the conversation you had. If that person also thanks a stranger with the same code, then a chain of conversations emerges
https://www.bedanktvoorhetcontact.nl
MIT License
2 stars 0 forks source link

Unable to link CSS stylesheet #13

Closed MxTheo closed 3 months ago

MxTheo commented 3 months ago

Unable to link the css stylesheet in the html pages. I ran the collectstatic. However, MissingValueError is still raised. The stylesheet cannot be found, although FindStatic is able to find the stylesheet. The CSS file from sociable_detail does work. Without the static tag it does not raise a server error (500) anymore. However, it is still unable to find the css stylesheet. Putting the link in the main template also raises a server error (500)

Putting the styling within the HTML does work.

Anyone can help?

MxTheo commented 3 months ago

Whitenoise compression bug. See https://stackoverflow.com/questions/26829435/collectstatic-command-fails-when-whitenoise-is-enabled/32347324#32347324 Removed STORAGES = {

...

"staticfiles": {
    "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},

} from the settings.py

MxTheo commented 3 months ago

What I can do better next time to find the cause of the bug: Find everything that could be related to the bug. I knew it had something to do with static files, but I did not know what. If I searched all files with the name static, then I would have found that there is a setting with serving static files. This was the problem

MxTheo commented 1 month ago

Don't use underscore _ in css file naming!