models.filefield, linking same file to two objects

hello everyone,

my website has course model, that contain sections that contain lectures. and each lecture has a video - file.
when I upload a file from the admin panel it gets uploded to an web s3 bucket and the url is saved.

now I want two diffrent lectures to have the same video, how can I do this? how can I give an option at the admin pannel to choose an exitsing upload?


My first thought on this is that to do this from the Django admin, you’ll probably need to create a custom admin form for that model. You can add a checkbox to indicate that the model is supposed to copy the field from another instance, and a drop-down select box to select the instance to copy.

Then, you would likely be able to check the checkbox and copy the field in the clean method for that form.

How can I do it?
say i create a template with buttons and everything, how can I allow only admins to login? can i keep the currect admin “authorization”?)

See ModelAdmin.form

hey, I ended up making a brand new admin pannel, now I have a div where i want to insert the old menu, for example i want to add this section into a div, how can i do it?

or add some of the contect, for example the first checkbox and the second one.