Like bruno desthuilliers mentioned in the comments, there is no failover solution.
But it depends on what you need it for. I mean how strict he is (or how good?). I used PROJECT_DIR several times instead of BASE_DIR . As for the settings, I saw one settings.py file and several settings files in the settings directory.
The main problem will be Django, which does not have such strict rules for naming files / modules. You can pretty much name your files no matter how you put the pieces together correctly.
If I'm not mistaken, the only tough Django rule is the models.py file. A Django application must have a file called models.py . But your Django application does not have to contain any application.
If you only need a good enough solution, I would say that manage.py is a good candidate. You can double check and open the file and see if there is django import there. If there is no manage.py , check for requirements.txt and see if Django is included in it. If there is no requirements.txt , check the directory with the requirements name for the text files inside.
Something you could do to find some templates is to browse the repositories tagged with the "django" tag on GitHub . Perhaps use their APIs and clone all repositories (they will only list 2000 repositories 2000) to your local computer or server. Cloning some rails , javascript , etc. Repos also and write down your code step by step. Just do a manage.py search if the result is satisfactory that it is. If not, add a couple more rules and test against the cloned repositories until you find a good enough solution for your problem.
source share