Re: Static files not loading when debug is false

2012-09-10 Thread Jani Tiainen
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

Re: Static files not loading when debug is false

2012-09-10 Thread Karambir Singh Nain
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

Re: Static files not loading when debug is false

2012-09-10 Thread e.generalov
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

Re: Static files not loading when debug is false

2012-09-09 Thread Stephen Anto
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

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
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-

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
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

Static files not loading when debug is false

2012-09-09 Thread Karambir Singh Nain
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