You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 20, 2021. It is now read-only.
I managed to find/solve my problem, but I still wanted to ask in case some one have the same problem. I also would like to know if this is a normal behaviour! (I'm pretty new to django..)
I created a django server and I installed dj-static. When I was developping over my computer everything worked great, all the static files was working. Then, when I moved the project over
a server and I realized that some static files didn't work... Long story or short, after some time I found that the problem was the way of starting the server:
it seems that to make dj-static work correctly, the current working directory must be in the mange folder.
For example, my project was under /django, and starting it by doing 'python /django/manage runserver 0.0.0.0:80' if my current directory is /
some static urls failed. But when doing a cd /django and then starting the server it works like a charm.
The text was updated successfully, but these errors were encountered:
I suspect this is actually because of the recommendation (in the README) to use STATIC_ROOT = 'staticfiles, which is a relative path. This should be corrected.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I managed to find/solve my problem, but I still wanted to ask in case some one have the same problem. I also would like to know if this is a normal behaviour! (I'm pretty new to django..)
I created a django server and I installed dj-static. When I was developping over my computer everything worked great, all the static files was working. Then, when I moved the project over
a server and I realized that some static files didn't work... Long story or short, after some time I found that the problem was the way of starting the server:
mange
folder.For example, my project was under
/django
, and starting it by doing'python /django/manage runserver 0.0.0.0:80'
if my current directory is/
some static urls failed. But when doing a
cd /django
and then starting the server it works like a charm.The text was updated successfully, but these errors were encountered: