Prototypes Sharing and Services Full Django in a Single File
summary
Demonstrates how to run full Django in a single file with working views, models, admin, migrations, and a Django Ninja API by wrapping Django startup and app registration into a Nanojango tool that monkey‑patches Django’s model metaclass and app registry to avoid import loops. Shows run and convert commands (convert auto‑refactors the single file into a standard project), supports async views, embedded templates, integrations (Django Style, Nano Pages, Django Distill), and a Pyodide‑based playground runs in the browser. A colleague’s Nanojango API is about 30% shorter than the FastAPI original.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:29Django in a single file
- 3:33Reimplementing Flask with Nanojango
- 3:55Adding API support like FastAPI
- 4:39Django models in a single file
- 5:43Python tricks in Nanojango
- 9:14Running Nanojango scripts
- 9:57Registering models without structure
- 11:40Fixing Django’s metaclass
- 13:25Monkey patching Django’s core
- 15:59Scaling to full Django
- 16:41Converting to a full project
- 17:44Integrating with other packages
- 19:51Practical uses
- 20:54Real-world examples
- 22:40Nanojango playground
- 24:05Conclusion
related talks
24mIs Django too Complicated
29mScaling Django to 500 apps
26mDjango Unstrained
32mAngularJS + Django = A Perfect Match
26mAPI Maybe: Bootstrapping a Web Application circa 2024 with Carlton Gibson
44mLevel Up Your Django Frontend: Integrate Web Components into Django Templates with Vue
56mDjangoCon 2008 Lightning Talks
28mLightning talks
