PyCon UK 2023

Interactive web pages with Django or Flask, without writing Javascript
09-22, 15:00–15:30 (Europe/London), Assembly Room

Bring your Django, Flask, etc. pages to life using htmx.

No Javascript, nor refreshing the page. Create, update and delete data; change the date range for a chart; drill down using a sequence of dropdowns; create an interactive search box, an infinite scrolling page or a sortable drag & drop table.


Python has many excellent back-end frameworks, but we can't use it yet for mainstream front-end development. How do we bring our web pages to life without having to write Javascript, and without learning a front end framework like React or AngularJS?

The htmx library uses simple tag attributes to add behaviour to HTML tags. It gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML for modern user interfaces.

Learn how, without refreshing the page, you can: create, update and delete data; change the date range for a chart; drill down using a sequence of dropdowns; and create an interactive search box.

Discover how to use htmx with any Python web framework. The examples will mostly use Django, plus a single example of how to use the same ideas in Flask.

You will also see how to create an infinite scrolling page, a sortable drag and drop table, and more.


Is your proposal suitable for beginners? – yes

(10-100 words)
Coen is a freelance Python developer and trainer. He has been passionate about computers and programming since the late ‘70s when he built his first ‘computer’.

After about 20 years in IT, Coen tried something different, trained as a business coach, hosted a large community of coaches and organised 5 conferences. But he quickly got pulled back into building websites and other IT services for coaches and others.

For the last 15 years Coen has been teaching and programming in Python, and playing a lot of boardgames, running crazy distances and learning French.