I have the name of files in the list with folders. The list contains 2000 file names like this
Countries/US/newyork/file1.pdf
Countries/Australia/Sydney/file1.pdf
Countries/Canada/Toronto/bla/blabla/file2.pdf
and so on.
I want to index those files in database so that i can have hierarchical directory structure.
IN my Django app i want to display first the root level menus like
countries --- US , Australia, canada
Then i someone click on country then it get the second level of folders and so on and in end i want to see files if there are no more folders.
rather than querying my storage evry time , i want to store all that info in my database so that my web pages are displayed from DB and when user click download then i get the file from my Storage
i am not able to find how should i make the Model or database table for that