Skip to content
This repository was archived by the owner on May 20, 2021. It is now read-only.
This repository was archived by the owner on May 20, 2021. It is now read-only.

When starting django server out of the root path, statics paths can fail #45

@rsm-gh

Description

@rsm-gh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions