Djangocon EU: improving runserver with django-prodserver - Andrew Miller

Tags: django, djangocon

(One of my summaries of the 2026 Djangocon EU in Athens).

Original title: improving one of Django’s most used APIs — and it’s not the one you’re thinking of. (I’m using a more descriptive title for my blog entry.)

APIs are everywhere. Django rest framework, but also the models layer. And: manage.py runserver, he considers that an API. Everybody runs it. So: can we improve it?

“Runserver” doesn’t sound the same as “devserver” or “rundevserver”. It doesn’t advertise that it is only intended for development. A name change could help there. But… Django really likes to be stable. It is probably too entrenched to change.

Production is missing a cohesive API. You normally run something like gunicorn myapp.wsgi 0.0.0.0:8000 --workers 4

He tried to get improvements in. Since 5.2, there’s a warning when you start runserver: “it is only intended for development”. But you might miss it when you get lots of log messages. Other people complained about the extra two lines.

He started django-prodserver. pip install django-prodserver[gunicorn]. You can then run manage.py prodserver (and manage.py devserver, he snuck that in).

You have to add a bit of configuration to your settings file:

PRODUCTION_PROCESSES = {
    "web": {
        "BACKEND": "django_prodserver.backends.gunicorn.GunicornServer",
        "ARGS": {"bind": "0.0.0.0:8000",},  # add number of workers and so.
    },
}

Run it with manage.py prodserver web. You can add more processes, for instance for a background worker process.

It is the first version. He wants feedback, especially on the naming. manage.py prodserver web or just manage.py web? And manage.py worker? manage.py serve --prod?

Django isn’t just a framework, it is a set of APIs. We can prototype new APIs in packages.

https://reinout.vanrees.org/images/2026/kat4.jpeg

Unrelated photo explanation: a cat I encountered in Athens on an evening stroll in the neighbourhood behind the hotel.