A 20mb executable zip file with Python 3.6 and Django 2.2.

Works on Windows, Linux, MacOSX (13.0) with x86_64 and aarch64 (yes, Apple M1 and Raspberry Pi).


curl -O
chmod +x


./ -m django startproject mysite
cd mysite
../ migrate
../ runserver


Just for fun, not for production usage. Not affiliated with the Cosmopolitan Libc project or Django.

This is a homage to for those old enough to remember.


And now for something completely different

There is a built in single file project with a hello world inside the zip. You can find it at .python/, just extract it and modify to your heart's content.

./ -m project runserver
unzip -d . .python
# check out all the files and hack on anything, including .python/ or .python/django
zip -r .python

Challenge accepted?

1. Can you figure out how to modify to be and run the management command by default? If you do it, it would be possible to share your project with others and have them just doublelick for a terminal or runserver.

./ runserver

2. ./ runserver has awful performance, I wonder if we could just steal code from Redbean to make it fly.

3. Newer Python and newer Django? It is possible to have a with Django 4 and Python 3.11. Solved by Gautham who was the first to port Python to Cosmopolitan.
Please note that this Python and the one that use are different, the later has been heavily optimized by jart to run well on cosmo, the former is as close as upstream as you can get. Choose your destiny.

curl -O

If you find a solution to any of the challenges, please mention @ingenieroariel on Twitter and I will add a link here.