Email or username:

Password:

Forgot your password?
Simon Willison

Here's a detailed write-up of my new project: DJP: A plugin system for Django - which I introduced yesterday at #djangoconUS simonwillison.net/2024/Sep/25/

8 comments
tante

@simon So reading this, it's basically Django Apps without the manual fiddling to integrate?

Simon Willison

New in DJP 0.2: @carlton suggested it would be useful if plugins could say “this middleware needs to be inserted directly before/after this other middleware” - that’s now supported:

djp.Position("my_plugin.middleware.MyPluginMiddleware", before="django.middleware.common.CommonMiddleware")

github.com/simonw/djp/releases

Carlton Gibson 🇪🇺

@simon the diagnosis of the bug from the LLM there is pretty high quality.

Linked on the issue :

github.com/simonw/djp/issues/1

Simon Willison

DJP 0.3 adds another plugin hook: asgi_wrapper(), which gives plugins a chance to wrap Django’s ASGI application in their own custom ASGI wrapper

My first plugin that uses that is django-plugin-datasette, built today at the #djangoconUS sprints

It adds a Datasette instance to a Django app, at /-/datasette/, which serves any SQLite databases it finds in settings.DATABASES

More details here: simonwillison.net/2024/Sep/26/

Go Up