Login

Tag "media"

Snippet List

media_url context variable

with this you can have context variables which know the media url and the urls of all your applications, if you need it. save the code as myapp/context_processors.py and add the following line to `TEMPLATE_CONTEXT_PROCESSORS` setting "mysite.myapp.context_processors.url_info", For each application you need to know the url set `MYAPP_URL` and add it to dict.

  • url
  • media
  • context
Read More

16 snippets posted so far.