Is there a way to clear the cache of a django form field in the admin page?

My problem is that, on the website I created using django and hosted with apache, after modifying some models through the admin interface I noticed that there is a URLField that whenever the page is reloaded after I make changes this field always loads in the browser with a value in it (even though that field is null in the database) and whenever I forget to check that field and save the model the field will contain that "cached" value that was loaded with the page and save it in the database, and I don't want that. There is also this piece of code in the ModelAdmin class for the model with the described problem that I thought it was the cause of the problem but I don't think it's from this

    def get_form(self, request, obj=None, change=False, **kwargs):
        form = super(ResourceAdmin, self).get_form(request, obj, change, **kwargs)
        if obj and obj.yt_video_id:
            form.base_fields['youtube_url'].initial = f'https://www.youtube.com/watch?v={obj.yt_video_id}'
        return form

I tried CTRL + F5 since I heard that this way of refreshing clears the cached resources for that website but it didn't work. Is there a way of getting rid of that value that loads in the field whenever I am changing a model on the admin page?

Back to Top