django media url tag
问题 Does django have media tag similar to static and url and how to setup it? {% static 'styles/boo.css' %} {% url 'some_app:some_name' %} Is this possible: {% media 'what here' %}? How to setup it? 回答1: You need {% get_media_prefix %}. The way to set it up is explained in the docs: you have to set the MEDIA_ROOT and the MEDIA_URL in your settings and add the MEDIA_URL to your urls.py . 回答2: No there is no media template tag. Having set MEDIA_ROOT and MEDIA_URL you can use a media file in a