Saturday, September 28, 2013

Re: Static files configuration

On 2013-09-28, at 3:27 PM, Jason S <serrix@gmail.com> wrote:

> I can now access my CSS file and i've confirmed it's location by changing its name and confirming the dev server can't see it any more.after I change the file name.
>
> The directory its finding it is under [project]/templates/static/css
> Sorry, no idea why its working but I suspect its permissions based as i'm running udo python manage.py runserver 0.0.0.0:8080
> I think the dev server is only accessing files owned by root? It doesn't sound right though.

Is there another reason you are running as root? I've been doing all development with my normal user account and have seen no issues at all. If you do have permissions problems those should go away if everything is owned by you rather than root.

And you may have enabled django.contrib.staticfiles in your INSTALLED_APPS. I think that helps to find files when you are running the development server. There is a nice chapter in the Django docs on serving static files.

hth

- 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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment