3 ms·
I remember watching a beautiful talk from some pycon whose details I can’t remember about using django as if it was a micro-framework. It basically boils down
by znpy 4y ago
I remember watching a beautiful talk from some pycon whose details I can’t remember about using django as if it was a micro-framework.
It basically boils down to rejecting the folder structure that django-admin sets up for you, importing stuff yourself and doing some basic initialisation/configuration.
Once you do that, django kinda somehow behaves like a micro-framework, with the significant difference that you can import and use the advanced features if you want/need to.
- ingenieroariel 4y agoHere is an example of a single file Django project I started around eight years ago that does what you mention: https://github.com/planetfederal/registry/blob/149a2b958dd05d80e6a5f36a89d2ea0c82b86912/registry.py https://github.com/planetfederal/registry/blob/149a2b958dd05...
- rsanek 4y agoI guess I prefer to keep it light and use a true microframework like flask for this use case. I find I can similarly import Flask extensions without bringing in a full heavy framework