djngo.com

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).

2024 Update: More and more software can now be built with jart/cosmopolitan and ahgamut/superconfigure ( including Apache Arrow and SDL2) stay tuned for a new release of the Python 3.11 version this year.

Installation

curl -O https://djngo.com/djngo.com
#2c7f825e66d39b229d5288cb62be330a1cd399d57da5a2e9cc1b2bb4871bd2fa djngo.com
chmod +x djngo.com

Usage

./djngo.com -m django startproject mysite
cd mysite
../djngo.com manage.py migrate
../djngo.com manage.py runserver

Comments

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

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

Links

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/project.py, just extract it and modify to your heart's content.

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

Challenge accepted?

1. Can you figure out how to modify djngo.com to be project.com 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.

./project.com runserver

2. ./manage.py 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 djngo.com 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 djngo.com 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 https://djngo.com/djngo4-py311.com

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