1π
What you need is not βmediaβ, rather βstaticβ files. βmediaβ is aimed at serving user images etc., while βstaticβ is designed to contain static content (such as CSS styles, JS scripts, images used by CSS, logo etc.).
Detailed guide is here: https://docs.djangoproject.com/en/dev/howto/static-files/
Basically you need to put static files of lightbox interface somewhere in /static/
directory within your Django app. During deployment you will need to collect static files to the separate directory using collectstatic
management command.
If you will use {{ STATIC_URL }}
within template, the paths will be generated correctly (STATIC_URL
within templates having request context contains the URL of your static files directory). Just make sure you use proper settings for static files (mostly STATIC_URL
and STATIC_DIR
, details are under the link I have given).