it looks like you don't have the right template ! You sure you have the
right path?


2013/4/4 Vibhu Rishi <vibhu.ri...@gmail.com>

> I am not sure where I am going wrong, but the CSS files are just not
> getting picked up. I have just started a project and am using the dev
> server with the runserver command.
>
> Here's my relevant settings.py :
>
>
> STATIC_ROOT = os.path.join(os.path.dirname(__file__),'/static/')
> STATIC_URL = '/static/'
>
> My directory structure :
> .
> ├── homepage
> │   └── templates
> │       └── homepage
> ├── qj
> └── static
>     ├── css
>     ├── img
>     └── js
>
> qj is where my settings.py file is.
> static is where i have the css. I am using bootstrap css files. I want it
> to be at the top location as these files are going to be used in all the
> apps that i will be writing.
> homepage is where i have the index page that I am trying to link the css
> to. the html is as follows :
>
> $ cat homepage/templates/homepage/index.html
>
> <!DOCTYPE html>
> <html>
>   <head>
>   {% load static %}
>     <title>Hello World!</title>
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
>  <!-- Bootstrap -->
> <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"
> media="screen">
>   </head>
>   <body>
>   <h1>Hello World</h1>
>  <script src="http://code.jquery.com/jquery.js";></script>
>     <script src="static/js/bootstrap.min.js"></script>
>   </body>
> </html>
>
> I am trying both the {% static <url> %} and the hardcoded static/js to see
> if it is working. The following is the output i get on loading the / page:
>
> [04/Apr/2013 12:23:38] "GET / HTTP/1.1" 200 413
> [04/Apr/2013 12:23:38] "GET /static/css/bootstrap.min.css HTTP/1.1" *404*1667
> [04/Apr/2013 12:23:38] "GET /static/js/bootstrap.min.js HTTP/1.1" *404*1661
>
> It just is not picking up the css or the js file. What am I doing wrong ?
>
> Regards,
> Vibhu
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to