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 - recommended way to serve static files without having to change too much code when deploying?

This link: https://docs.djangoproject.com/en/1.8/howto/static-files/ starts off by explaining a "grossly inefficient and probably insecure, unsuitable for production" way of serving files. It also explains how to use …
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
0 answers

Django / Static Files or images are not loading properly

I apologize if the error was posted earlier but I have not been able to work this through. I have the following django project structure. . ├── db.sqlite3 ├── manage.py ├── rango │   ├── admin.py │   ├── __init__.py │   ├── migrations │   │   ├──…
manugupt1
  • 2,337
  • 6
  • 31
  • 39
0
votes
1 answer

Using admin uploaded images

In admin page I add some image to model Product. In my settings.py file i write this: MEDIA_ROOT = os.path.abspath('media') MEDIA_URL = '/media/' STATIC_URL = '/static/' STATICFILES_DIRS = ( ('static', os.path.abspath('static')), ) Uploaded…
Andrew
  • 423
  • 1
  • 6
  • 16
0
votes
1 answer

Django Heroku static files in production

I've read several related posts to collecting static files in production, but still can't seem to figure out why collectstatic fails. Why would the following code work with DEBUG = false and not DEBUG = true When DEBUG is equal to True the following…
byrdr
  • 5,197
  • 12
  • 48
  • 78
0
votes
2 answers

Django: AJAX + CSRF POST gives 403

I have a simple code where I make a POST call to URL in Django with CSRF token included. When I paste the javascript code in the template within