xNS5 / rentalreviewsdata

GNU General Public License v3.0
1 stars 0 forks source link

Create Delete Document function in seed.py #34

Open xNS5 opened 3 weeks ago

xNS5 commented 3 weeks ago

There are some instances where I want to be able to delete specific documents and have the database remove them from the respective collections. For example, I'm currently thinking to combine the FAQ and Contact pages into one as I'm essentially going to just have a MAILTO link in the contact page instead of a dedicated contact form. I'd like to delete contact.json as I'm not really using it anymore, but that wouldn't be presently reflected in the current update logic I have. I'd like to figure out a way to have update recognize when a file or list of files was deleted and update the relevant collections to remove that specific document.

This isn't a super necessary feature to have at the moment, so it's going to be low priority for now.

xNS5 commented 3 weeks ago

This seems like a good working example of how to accomplish this: https://stackoverflow.com/questions/69015812/gitpython-how-to-detect-if-file-is-deleted