I'm using development server . and when i use  <link 
href="{{STATIC_URL}}css/bootstrap.css" rel="stylesheet" media="screen"> it 
seems work correctly but when I use <link href="{% static 
'css/bootstrap.min.css' %}css/bootstrap.css" rel="stylesheet" 
media="screen">  my project file and directory structure is like :

   1. root project folder
   1. app folder
   2. static
      1. css
         1. bootstarp.css
         2. js
      3. img
      3. media 
   4. template
      1. app 
      1. base.html
         


On Friday, March 14, 2014 7:49:32 PM UTC+3:30, Tom Evans wrote:
>
> On Fri, Mar 14, 2014 at 2:33 AM, Camilo Torres 
> <camilo...@gmail.com<javascript:>> 
> wrote: 
> > python manage.py startapp testapp 
> > 
> > Inside the newly created test app directory, create static/css/ and put 
> your 
> > file there. Now try to reload your template to see if the template 
> loads. 
> > 
> > This may make it work for you, but in your case, is not the final 
> solution. 
> > You may need to actually put these static files that are 'site global' 
> in a 
> > central location in your filesystem, let's say: 
> /var/www/static/(css|js|etc) 
> > 
> > To do that, you need to add a setting to your settings.py: 
> > 
> > STATICFILES_DIRS = ( 
> >     '/var/www/static/', 
> > ) 
> > 
> > That way you put all of your static site wide files inside 
> subdirectories in 
> > a common path. 
>
> This advice is wrong, do not copy your static files from 
> <appname>/static to a folder listed in STATICFILES_DIRS. 
>
> STATICFILES_DIRS is a list of _additional_ project folders that are 
> searched for files _in addition_ to your application static files. 
>
> However, you do need to copy the files from your application static 
> directories _and_ your project static file directories to the 
> directory specified by STATIC_ROOT. You do not do this manually, the 
> management command collectstatic does this for you. You also only need 
> to do this in production, in development (using runserver), the static 
> files are served for you by runserver. 
>
> For complete info on static files, there is an excellent step-by-step doc: 
>
> https://docs.djangoproject.com/en/1.6/howto/static-files/ 
>
> Cheers 
>
> Tom 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3b32d61d-3465-4c00-87a5-f11dfb33e702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to