0

I have always been a little confused about the correct place for a static folder for my Django project. Should one be located at the project level? or at the application level? Increasingly through looking at tutorials it seems that most suggest keeping a static folder at the project level.

My problem is that I can't seem to correctly link to a bootstrap Stylesheet that is in another directory at the project level.

I am able to link to the CSS files in my survey application at A using

<link href = "/static/css/bootstrap.min.css" rel = "stylesheet"> 

However none of the below will link to B

<link href = "../static/css/bootstrap.min.css" rel = "stylesheet">
<link href = "../../static/css/bootstrap.min.css" rel = "stylesheet">
<link href = "../../../static/css/bootstrap.min.css" rel = "stylesheet">

What is the correct way of linking to the bootstrap.min.cssstylesheet at B below?

I don't want to start using full file paths as that will require changes on deployment and additional upkeep

Below is my project structure.

enter image description here

4dgaurav
  • 11,360
  • 4
  • 32
  • 59
Deepend
  • 4,057
  • 17
  • 60
  • 101
  • Are you looking for this? http://stackoverflow.com/questions/5537268/django-admin-page-missing-css – karthikr Jun 23 '14 at 19:47
  • Where is your url handler, like app.yaml? Does the static directory 'B' need to be outside the project? Can you post `__init__.py` in `survey`? – GAEfan Jun 23 '14 at 21:54
  • No, the static directory B does not need to be outside the application (It is inside the project) But as I mentioned in my question these seems to be the standard so I want to use the same. My __init__.py file is blank – Deepend Jun 23 '14 at 22:07

0 Answers0