Questions tagged [django-staticfiles]

A Django app that provides helpers for serving static files.

django-staticfiles is a Django app that provides helpers for serving static files.

1241 questions
0
votes
1 answer

Heroku/Django Do I need to turn on maintenance mode when collecting static files

I've noticed that when i run python manage.py collectstatic --noinput users start seeing scrambled pages. After following on this, i found out that during the process i get 404 on css files, hence the scrambled view. I've read the docs on Heroku…
Neara
  • 3,693
  • 7
  • 29
  • 40
0
votes
1 answer

Django - possible to display ImageField objects in static folder?

This is my settings.py: STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( '/home/userName/project/app/static', ) Suppose my view is passing an ImageField object to the template. So as described here in the…
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
1 answer

How to override grappelli js file in django

I'm using grappelli and I have two files in it I need to modify: admin/js/SelectBox.js admin/js/SelectFilter2.js I thought it would be a good idea to put it into my app static…
rush
  • 2,484
  • 2
  • 19
  • 31
0
votes
2 answers

Django dj-static error when serving JS files

2014-02-08T00:17:59.628381+00:00 app[web.1]: Traceback (most recent call last): 2014-02-08T00:17:59.628381+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/wsgiref/handlers.py", line 85, in run 2014-02-08T00:17:59.628381+00:00 app[web.1]:…
Josh K
  • 28,364
  • 20
  • 86
  • 132
0
votes
2 answers

What is the best way to get past the "manage.py collectstatic" in django-ckeditor setup?

On https://github.com/shaunsephton/django-ckeditor, the set of instructions to set up django-ckeditor includes: 4. Run the collectstatic management command: $ ./manage.py collectstatic This'll copy static CKEditor require media resources into the…
Christos Hayward
  • 5,777
  • 17
  • 58
  • 113
0
votes
2 answers

Static files not being served from seperate django staticfile application

I'm using webfaction to make a simple static website. I think I have done everything correctly, but still my static files (i.e css, images) are not being served. I used this guide to set things up:…
ohhh
  • 972
  • 9
  • 24
0
votes
1 answer

Static and Media files in django 1.5

I am making a site, I am the only one that will be uploading anything to the site. It seems like its more complicated to have two separate directories media and static would it be unreasonable to just funnel everything into static? I have not yet…
Zacharoo
  • 113
  • 1
  • 10
0
votes
2 answers

put django template tag in static file

I want to put some template tag for configuration in js static file, and it will get included by in html file. How do I pre-compile the file ? is there any way like ruby 's js.erb file?
Wen
  • 401
  • 5
  • 13
0
votes
2 answers

django static files do not work for one application only

My django application works well except for one application, all the static files are not loaded. That happens on this url: http://localhost/db_mgmt/add/dg/. The template is loaded, but no css, no js. When I look at one of the errors, the browser…
rom
  • 3,592
  • 7
  • 41
  • 71
0
votes
3 answers

static files copied, css not being used

It's a bit weird how paths look, but it's my first Django app, I'm learning :) setting.py STATIC_ROOT = os.path.join(SITE_ROOT, 'static') STATIC_URL = '/static/' STATICFILES_DIRS = ( ('assets',…
Fengson
  • 4,751
  • 8
  • 37
  • 62
0
votes
1 answer

Searching static folders in django development mode

I have troubles searching for static files in multiple folders in development mode. Of course I'm aware of the trivial approach to use os.path.listdir or other methods to perform a search, but I am looking for a way to keep development and…
Dr.Elch
  • 2,105
  • 2
  • 17
  • 23
0
votes
1 answer

Django - separating shared & dedicated static files on dev machine

I've gone through https://docs.djangoproject.com/en/dev/howto/static-files/ & related Q&A on stackoverflow regarding placement of static files on Django. Each project app has its own dedicated js & css files. Plus there are shared js & css files…
user
  • 17,781
  • 20
  • 98
  • 124
0
votes
1 answer

Django Static folder access issue

I want to access the images in the static folder the image name is coming dynamically. I am using this syntax: "{% static 'theme/one page base/bgimages/"+num+".jpg' %}" where num is a random number calculated at runtime using javascript. but it is…
Nidhi
  • 217
  • 1
  • 4
  • 14
0
votes
2 answers

Django.staticfiles doesn't collect admin files

I noticed that staticfiles doesn't copy the admin's static files to STATIC_ROOT. I was under the impression (and I can't find references for that just now) that once you include django.contrib.staticfiles to your INSTALLED_APPS, it would…
gregoltsov
  • 2,269
  • 1
  • 22
  • 37
0
votes
2 answers

STATIC_URL Not Working on Django 1.5

I cannot load .css and .js files. This is what I get on the server as output: [29/Oct/2013 11:33:26] "GET /static/srt/css/django-admin-widgets.css HTTP/1.1" 404 1700 [29/Oct/2013 11:33:26] "GET /static/srt/js/django-admin.multiselect.js HTTP/1.1"…
Hec
  • 824
  • 1
  • 5
  • 24