I want to write a very small Django application in a single file, requiring all the appropriate modules and stuff, and then be able to run that as a normal Python script, like this:
$ python myapp.py
You can assume I won't render HTML, so I don't need templates (I'll return JSON or some other auto-generated string).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…