Questions tagged [static-media]

7 questions
22
votes
3 answers

Serving static media during Django development: Why not MEDIA_ROOT?

I read this guide about serving static media with Django during development. I noticed that MEDIA_URL and MEDIA_ROOT were not used in this. Why? What's the difference? I tried doing it with MEDIA_URL and MEDIA_ROOT, and got weird results.
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
11
votes
3 answers

Changing default url to static-media in Flask

I've made a website using Flask and I have no problems getting things to work properly on the built-in development server. I've also been able to get things running on my production server under mod_wgsi. However, I host my static media from a…
Nick Crawford
  • 5,086
  • 2
  • 21
  • 20
1
vote
2 answers

help needed with Lighttpd and Apache cofiguration with Django

I am using Django as web framework and then Apache and Lighttpd as web server and static media server respectively. Lighty serves all my static content well and good, but I need to configure it to serve the new files uploaded by the user. Lighttpd…
Bharath
  • 613
  • 2
  • 7
  • 17
1
vote
2 answers

Speeding up site using gzip and far-future expiration dates

I recently deployed a site http://boardlite.com . One of the tester websites http://www.gidnetwork.com/tools/gzip-test.php suggests that gzip is not enabled for my site. YSlow gives an A grade for Gzip but does not mention that gzip is on. How do I…
avenger
  • 131
  • 2
  • 11
0
votes
0 answers

Docker cache file permission

I use py-staticmaps repository for generate static map image, In normally I run this repo via python .main.py, it is working but I use the repo in Django and docker, I have a problem with cache files,. following error. What can I do? I build it…
Zuxriddin
  • 1
  • 1
  • 2
0
votes
1 answer

Serve static files with Django without STATIC_URL

Hi have an application that uses STATIC_URL in the settings. For example: STATIC_URL = '/static/' these in url patterns: url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), and its usage in a…
QLands
  • 2,424
  • 5
  • 30
  • 50
0
votes
1 answer

Symfony2 Define Media Uploaded Directory in Config file and access it it in controller twig

In my project i have lot of different types of document of user to be uploaded. I am using local drive to save media and ony save the file. What it want is to define the uploaded directory in only configuration file (category wise) access it in…