[Answer]-Access Django App from subdomain redirect


Can you show us the code that states which are the static files directories and an example where you use a static file in a template?

Is it possible you’re loading the static dirs from a wrong path?
Or maybe you use refer to the files incorrectly in the template?

try doing:

my_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))

this will get you the project root.

after that(make modifications if your project structure is different):
STATIC_ROOT = os.path.join(my_path, ‘static’)

and this should work with your STATIC_URL definition

Leave a comment