media

Django MEDIA_URL and MEDIA_ROOT

Django MEDIA_URL and MEDIA_ROOT Question: I’m trying to upload an image via the Django admin and then view that image either in a page on the frontend or just via a URL. Note this is all on my local machine. My settings are as follows: MEDIA_ROOT = ‘/home/dan/mysite/media/’ MEDIA_URL = ‘/media/’ I have set the …

Total answers: 18

How do I find the length of media with gstreamer?

How do I find the length of media with gstreamer? Question: How do I find the playback time of media with gstreamer? Asked By: joeforker || Source Answers: Here’s a simple Python script to get the duration of anything gstreamer can decode. Note that all times in gstreamer are in nanoseconds. duration.py: #!/usr/bin/env python # …

Total answers: 4

Django upload_to outside of MEDIA_ROOT

Django upload_to outside of MEDIA_ROOT Question: My deployment script overwrites the media and source directories which means I have to move the uploads directory out of the media directory, and replace it after the upload has been extracted. How can I instruct django to upload to /uploads/ instead of /media/? So far I keep getting …

Total answers: 2

Django: how do you serve media / stylesheets and link to them within templates

Django: how do you serve media / stylesheets and link to them within templates Question: Variations of this question have been asked, but I’m still unable to get my stylesheets to load correctly when my templates are rendered. I’m attempting to serve static media from the Django process during development – which is strongly discouraged …

Total answers: 7