Djangocon EU: lightning talks (day 2)¶
(One of my summaries of the 2026 Djangocon EU in Athens).
Developing Django’s community - Andy Miller¶
Andy likes these conferences. But getting here and attending costs at least €1000. So conferences are limited to those that can afford it.
The new online community working group that wants to improve the online possibilities of gathering, as those are available to everyone.
Perhaps new virtual social events. Better feeds of what’s happening in the community. So: improve the community for everyone.
More info: https://github.com/django/online-community-working-group
To JWT or not to JWT - Benedikt¶
JSON web tokens are not a one-size-fits-all solution.
JWT is a bas64 encoded string with three parts: header, payload, signature. Marketed as stateless, but revocation always adds state.
Why would you want to use it? Well, third-party identity providers often give you one. And: you can save database queries by embedding info in the token. And you can use it for offline mode in mobile or desktop apps. But there are drawbacks.
Some reasons for using something else: JWTs are immutable, data remains valid until expiration even when the data changes server-side. Stateless revocation is impossible. Logout-from-all-devices requires tracking state, defeating the process.
JWT if your provider uses them.
Regular Session/cookie auth for web apps is often better.
Opaque tokens for mobile/desktop.
Django on the Med / Django Italia - Paolo Melchiorre¶
“Django on the Med” is a sprint. Not a sprint after a conference, but just a sprint. After a conference you often want to get home or you’re tired, so what we get done at a conference sprint is often a bit limited.
What they got done in September at “Django on the Med” is amazing. This year it is in Pescara, Italy. 23-25 September.
Somewhat related: 27 May there’ll be a free “Django off the Med” online workshop at the PyCon Italia conference.
Two ways I used GeneratedField during a rewrite - Anthony Ricaud¶
GeneratedField: google for Paolo, he’s done lots of talks on it (for instance this one).
He used GeneratedField in a migration scenario:
archived = models.GeneratedField(
output_field=models.BooleanField,
db_persist=True,
expression=(models.Q(soft_delete=True | models.Q(....)),
)
The second scenario involved generating a unique “city id” based on two other fields.
django-mediastorage - Alissa Gerhard¶
A media file is data that is stored as a file and accessible to users. FileFields store files attached to models.
Local filesystem is the default and sufficient for most projects. You can use
X-Accell-Redirect to get the proxy (like nginx) to actually serve the file, instead
of Django. But every proxy has its own solution.
django-mediastorage can handle it for you for several different proxies.
There’s a new FileField subclass, ProtectedFileField, to handle authentication requirements.
There’s also integration for django restframework.
There’s still a lot to do, but they’re using it in production themselves.
Django VPS deployments made simple - Jan Raasch¶
Let’s talk about Django’s deployment story.
He demoed deploying a simple Django app to a small virtual server. With python
manage.py deploy --serveral-options.
He used django-simple-deploy and a custom plugin for django-simple-deploy that used ‘kamal’ to do the actual deploying.
Unrelated photo explanation: a trip in November to the Mosel+Eifel region in Germany. Some restored remnants of the Virneburg castle.