Tuesday, January 8, 2013

Re: Can't set static file directory.

I have the same problem, the tutorial speaks about a list of things to do:

I have arrived at the second point. But the static files are not served, i have set up the STATIC ROOT and the STATIC_URL, but what should i add to the template src tag to find the pages? The tutorial speaks about the template context processor, but it doesn't exist in my setting.py file.

TEMPLATE_CONTEXT_PROCESSORS = (      'django.core.context_processors.debug',      'django.core.context_processors.i18n',      'django.core.context_processors.media',      'django.core.context_processors.static',      'django.contrib.auth.context_processors.auth',      'django.contrib.messages.context_processors.messages',  )

i cannot make my css and javascript work, please, can you explain me what is happening behind the interface?
Agnese

Il giorno sabato 5 gennaio 2013 19:38:32 UTC+1, Mārtiņš Jakubovičs ha scritto:
Hello.

I try a lot of things and can't understand, why not working STATIC_ROOT and MEDIA_ROOT in settings.py.

I want, that all my media and static folders is in different place that python files, so I set media, static and templates to different place. Templates TEMPLATE_DIRS works well, bet MEDIA_ROOT and STATIC_ROOT not.

I try setup like this:

/home/domain/www/my_proj/ there is project folder and all apps, and there I place my htdocs folder, in which is static, templates and media folders.

When i set in STATIC_ROOT = '/home/domain/www/my_proj/htdocs/static'

In apache error log i got:

File does not exist: /home/domain/www/my_proj/my_proj/static

I don't get, why django don't want to take new setting...

I use django 1.4.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/fwNEyOLpFb4J.
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