• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux django-media-utils Download

django-media-utils

June 30, 2009
A Django software tool to easily manage and handle static assets like images, videos, and CSS files within a web application.
Version 0.1.0
License BSD License
Platform Linux
Supported Languages English
Homepage launchpad.net
Developed by Carl Meyer
Django-media-utils is a highly useful tool that provides a wide range of utilities for managing static files in Django projects. Its most useful feature is the serve_app_media view, which enables you to serve static assets from media folders in all installed apps during development.

To use this feature, you simply need to add a line like this to your root URLconf:

if DEBUG:(r'^media/(?P.+)$', 'media_utils.views.serve_app_media')

Once this is done, the files in the specified app's media folder will become readily available at the media/ URL as if they were located at MEDIA_ROOT. The view checks the media files in a specific order: files at MEDIA_ROOT take precedence, then apps are checked in order of INSTALLED_APPS listing. This is same as the app_directories template loader.

To ensure its ideal functioning and maintenance, it is best to place your app's static files in my_app/media/my_app/. With this, they will be served at the URL /media/my_app/. It is imperative to note that this view is intended for use during development only. Therefore, it is important to appropriately configure your web server to serve media in production.

The link_media management command is a useful tool available in the django-media-utils package. This command simplifies linking of all your media files, including those in the application directories, saving you the hassle of manually setting up symlinks or web server alias directives to mimic the functionality of the serve_app_media view.

Once your website is moved into the production phase, you can have your web server serve static files directly off the file system by running the link_media management command. This tool automatically creates symbolic links to all your media files from a specific webserver directory. For instance, the command './manage.py link_media /var/www/my_site_media' creates symbolic links to all your static files in my_site_media.

The link_media command resolves any name clashes by first checking the project MEDIA_ROOT, followed by app files in INSTALLED_APPS. The tool is non-destructive by default, meaning it does not remove or alter existing files or symbolic links in the specified directory. However, if you wish to delete all files and subdirectories in your specific directory prior to creating new symbolic links, use the --clean option. It is critical to note that link_media is only suitable for operating systems that support symbolic links.
What's New

Version 0.1.0: N/A

Free Download 9.4K
306
  • Share on:

Most Popular

  1. SlideMap 1.2.2
    103
  2. Quicksilver Forums 1.4.2
    87
  3. CherryTV 0.1
    79
  4. WikEd
    78
  5. porm r2
    73
  6. Intel Software Development Emulator 1.70
    69
  7. xstereograph 2.1
    69
  8. fuseftp 0.8
    63
  9. Proxy filesystem for FUSE 1.0.0
    62
  10. Siesta::UserGuide 0.66
    62

Related Downloads

Oxygen (KDE 4.2) for GNOME
The Oxygen theme from KDE4 is now available for GNOME, providing a ...
Skippy
Skippy is a pager software designed for X11 that enables full-screen display. ...
Hinversi
Hinversi is a software implementation of the popular board game Othello/Reversi, offering ...
Google Assistant - Surf Canyon
This software allows users to customize web search results to ensure relevance.
Independent FTP Daemon
iFTPd is an open source Java-based FTP server, also known as Independent ...
JITT64
Java Ice Team Tracker is a software tool that tracks team productivity ...
mplex13818
Mplex13818 is a real-time ISO 13818 stream multiplexer that can handle program, ...
Trafix
Trafix is a free and animated simulation software that imitates the behavior ...
Sambascan2
Sambascan2 is a bash-script that scans for SMB-shares in a specified network. ...
Bio::MAGE::AuditAndSecurity
The AuditAndSecurity container module is designed for classes within the MAGE package. ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.