pretalx / pretalx

Conference planning tool: CfP, scheduling, speaker management
https://pretalx.com
Apache License 2.0
739 stars 206 forks source link

404 for the cfp / agenda css #903

Closed ThomasWaldmann closed 4 years ago

ThomasWaldmann commented 4 years ago

does that ring any bells?

WARNING 2020-03-27 18:16:24,288 django.request log Not Found: /media/democon/agenda.5fc07c8e3641cb01.css
WARNING 2020-03-27 18:16:24,294 django.request log Not Found: /media/democon/cfp.60d621a29d974a77.css

having that in 2 different installations now, done by 2 different admins.

in mine, i did a gunicorn based install into a virtual env.

the files are there in data/media and strace says that the python process does not even try to open them.

also, there are no permission issues, all stuff is owned by pretalx and has appropriate permissions.

ThomasWaldmann commented 4 years ago

Works with debug = True, breaks with = False.

rixx commented 4 years ago

[deleted]

rixx commented 4 years ago

Ah, wait, I misread – if the files are there, you'll have to deliver them to the browser. In development mode, pretalx does this for you, but in production mode, you'll have to deliver them via the web server of your choice, just like the static files.

ThomasWaldmann commented 4 years ago

[deleted]

ThomasWaldmann commented 4 years ago

Considering that it looks like a lot of people fall into that trap and that this somehow counteracts running with debug = False, maybe just pretalx should always serve these files?

One can still catch the request before it reaches pretalx to optimize then, but at least it does not break in mysterious ways if you don't.

ThomasWaldmann commented 4 years ago

As the minimum, there could be a comment in pretalx.cfg right above debug = False that this implicates media and static not being served by the python code.

rixx commented 4 years ago

As the minimum,

The documentation outlines how to serve static files in step 7 of the installation guide. If you think that additional hints are needed there, we'll happily take a look at your pull request.