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

Django static file inheritance

Perhaps I'm coming at my problem with a WordPress mindset but what i'd like to achieve is the notion of a parent/child theme for Django projects. I think I can solve the template issue by defining two template directories TEMPLATE_DIRS = ( …
Colin
  • 255
  • 1
  • 10
0
votes
1 answer

Django 1.5 does not Get static files in development

I am new to Django and really confused about this. Here are relevant parts in settings.py: import os PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) STATIC_URL = 'http://http://127.0.0.1:8000/static/' STATICFILES_DIRS = ( …
supermario
  • 2,625
  • 4
  • 38
  • 58
0
votes
1 answer

django-pagedown seems to be overriding the default Django admin styling -- did I do something wrong with `collectstatic`?

I've just installed django-pagedown according to this post. I added in all the code and once I did a ./manage.py collectstatic, I noticed that when I navigated to any DetailPage in the admin (e.g. to add/edit an object), the styling changes. For…
3cheesewheel
  • 9,133
  • 9
  • 39
  • 59
0
votes
1 answer

Why is Django (./manage runserver) serving files I've deleted?

In my development environment I've deleted my static files directory (rm -rf [PROJECT_NAME]/static/), emptied my browser's cache, restarted the server and still when I load a page, the static files (my JS, CSS, etc.) are still there (e.g.…
Jeff Bowen
  • 5,904
  • 1
  • 28
  • 41
0
votes
2 answers

django static files through apache in windows

I have configured apache to serve my project. But I can't yet configure it to serve static files. Till now in my httpd.conf I have appended the code that django documentation provides and its like this: WSGIScriptAlias /…
Robin
  • 5,366
  • 17
  • 57
  • 87
0
votes
1 answer

Django - Dynamically include JS/CSS based on installed apps

Does anybody know a way to adjust the included JS/CSS resources in a template based on the apps you've installed? Let's say we have a basic feature in app x using template.html, and this requires foo.js which is provided in the static files for the…
shauns
  • 69
  • 5
0
votes
2 answers

Django: ImproperlyConfigured: The storage backend of the staticfiles finder doesn't have a valid location

I was using Django and the static files cannot load, the error is: ImproperlyConfigured: The storage backend of the staticfiles finder doesn't have a valid location. Here is the…
Robert
  • 2,189
  • 6
  • 31
  • 38
0
votes
1 answer

Django css not rendering from amazon server- 304 not modified

I am using a amazon server to host my Django app. It used to work fine but after some changes in the css files the app is not rendering those files anymore. I ran python manage.py collectstatic. Through firebug I can see the css files through up the…
name
  • 571
  • 1
  • 7
  • 11
0
votes
1 answer

django two 'static' path in my url?

My static file setting is STATIC_URL = 'static/' STATIC_ROOT = os.path.join(PROJECT_PATH, 'static') and i install ckeditor in my project, and in urls.py : url(r'static/(?P.*)$', 'django.views.static.serve', {'document_root':…
Jack Zhang
  • 2,534
  • 5
  • 25
  • 34
0
votes
2 answers

Django staticfiles and CSS and javaScript

I'm using django 1.3 for production and want to use static file's in my CSS and javaScript but it doesn't work , I don't have any problem in my HTML ! how must solve this problem ? I didn't find any solution in django doc . I use this code for…
Shervin Gharib
  • 728
  • 2
  • 14
  • 29
0
votes
1 answer

How to add this to my static folder?

Below is what I have in my head section in my base html page. This script works- just like how I want it to. How do I add the script to static folder? Like I want to create a seperate js folder and make file for this script.
trant trum
  • 219
  • 5
  • 14
0
votes
1 answer

Slugify within a static tag in django templates

In one of my templates I use {% for key, value in dict.items %} ... ... {% endfor %} but the output is not the one expected so I guess that one cannot use template filters within a…
alekosot
  • 661
  • 9
  • 19
0
votes
0 answers

Why use absolute paths for Django's static and template directories?

I don't understand why they want us to use absolute paths when we try to add static directories in django. I mean, these two work exactly the same: STATICFILES_DIRS = ( 'static', ) as this : STATICFILES_DIRS = ( os.path.join(BASE_DIR,…
Games Brainiac
  • 80,178
  • 33
  • 141
  • 199
0
votes
2 answers

Loading images in a static file

So I have completed the Django tutorial, play around with it some, and feel that I have a good understanding of Django. The only problem I am facing is that when I try to display a static page for a landing page, I cannot seem to get any images to…
bahudso
  • 159
  • 1
  • 11
0
votes
2 answers

How to server Static Files with Django 1.4 on Windows?

I need to link a CSS file to a simple hmtl page and it just doesn't work! I have red the Docs and watched like 10 Videos that develop on Linux Systems, but non of them come along with the Config of Windows! for some reason the version I'm using…
0bserver07
  • 3,390
  • 1
  • 28
  • 56