As I put in my second post. Static serving is not working (by default) when
you turn debugging off unless you provide --insecure option on manage.py
runserver command. That is by design. Though with you should see improperly
configured exception raised if you try to use forcefully static serving
vi
Yeah. during, debug=true, it is serving fine from static_root. But not when
debug is false.
On Monday, September 10, 2012 2:01:03 AM UTC+5:30, Jani Tiainen wrote:
>
> I suppose that your frontend webserver is serving files from url /static/
> from path that STATIC_ROOT points to?
>
> On Sun, Sep
There is another case - tests. The TestCase forces DEBUG=False, therefore
staticfiles application, included to the project in accordance with the
documentation, works in the development server, but unexpectedly does't
serve static in test scenarios. Why the serving static files in the
developme
Hi Singh,
I have configured static file for my projects as follows.
In settings.py
import os
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = '/site_media/'
STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://m
Also just a note, if you're using manage.py runserver without debug = TRUE
setting, static file serving is not taking place. you can use --insecure
option to mark that you really want to do staticfile serving still from
django.
https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#django-
I suppose that your frontend webserver is serving files from url /static/
from path that STATIC_ROOT points to?
On Sun, Sep 9, 2012 at 10:23 PM, Karambir Singh Nain wrote:
> I have a fairly simple django project having some views, templates and
> static files like css and images. My settings fil
I have a fairly simple django project having some views, templates and
static files like css and images. My settings file include :
STATIC_ROOT = '/home/karambir/Codes/projects/cdi/cdi/static'
STATIC_URL = '/static/'
STATICFILES_DIRS = (
'/home/karambir/Codes/projects/cdi/cdi/data',
)
TEMPL
7 matches
Mail list logo