title: Django: object Id exists but the object has been deleted from media files
body: <p>I am a newbie with Django trying a simple code to upload and delete a file. Following the instructions given at the accepted answer of <a href="https://stackoverflow.com/questions/5871730/need-a-minimal-django-file-upload-example">Need a minimal Django file upload example</a>, I was able to create a successful version to upload a file. However, while trying to delete individual files, I did some blunder, and later fixed it. </p>
  
  <p>The problem is that the files I deleted while testing the first version of deletion code  no longer exist as document files, but their IDs still exist somewhere in the memory (I can't figure out where). Although I managed to fix the code, I still get 'Delete' buttons next to the already deleted files (without names), and I can get document IDs when the user presses these buttons. </p>
  
  <p>I have tried restarting the server and deleting the 'Media' folder from storage, but these buttons still exist. I still can't figure out where these reference IDs are stored. I just want a fresh version of the page to be launched without the buttons corresponding to already deleted files.</p>
  
  <p>Any help would be really appreciated.
  Thanks in advance.</p>