Xavier, you have a good point, my understanding of STATICFILES is
still foggy, and I do have confusion between media and static files.
However, I have to make some progress on the rest of
my code. I will revisit this when I have some cycles, but for sure,
when I try to use a non-development server, such as apache.
Thanks
Nara
On Oct 1, 1:00 pm, Jian Chang <changjia...@gmail.com> wrote:
> Did you set Debug=False?
> 在 2011-9-27 上午4:21,"nara" <nar...@gmail.com>写道:
>
>
>
>
>
>
>
> > I am having trouble getting STATICFILES to work. I have read the docs,
> > and followed the instructions, but I never get my css files to load.
> > My current workaround is to put all the css inline in my template
> > file, but that should not be a permanent solution.
>
> > I am running the django dev version, and I am using the built-in
> > server. Here are my changes:
>
> > 1. I placed my media (css) files under /home/nara/media
> > 2. I added '/home/nara/media' under STATICFILES_DIRS
> > (django.contrib.staticfiles is already in INSTALLED_APPS)
> > 3. I added {{STATIC_URL}} (no spaces) in front of the reference to
> > static files in my template file.
> > 4. I restarted the server.
>
> > No further changes. I don't have additional copies of the static files
> > anywhere else, such
> > us under my project, or app.
>
> > Looking at the result in firebug within firefox, I get an HTTP
> > response of 200 on my css files
> > (happen to be css/blueprint/screen.css and print.css), but the files
> > are null. Clearing
> > the cache, restarting Firefox etc. do not help.
>
> > I have been fighting this issue for several days now, and have tried
> > many things,
> > but the above description is for my current state.
>
> > Thanks
> > Nara
>
> > --
> > You received this message because you are subscribed to the Google Groups
>
> "Django users" group.> To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
>
> django-users+unsubscribe@googlegroups.com.> For more options, visit this group at
>
> http://groups.google.com/group/django-users?hl=en.
>
>
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment