Skip to content
Example project for my DjangoCon EU 2019 talk about the ORM
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
products Initial commit Apr 10, 2019
docker-compose.yml Initial commit Apr 10, 2019

Pushing the ORM to its limit

This repository contains an example project with code from my DjangoCon EU 2019 talk "Pushing the ORM to its limit". It contains code to demonstrate various ORM features and tricks to work around quirks with the ORM.


This project requires Django 2.2 or newer, as specified in requirements.txt.

To install the requirements run the following in an virtualenv:

pip install -r requirements.txt

Next I have set up a Docker Compose file to run the database, so you can set that up if you have docker:

docker-compose up

Finally migrate the database and create some sample data:

./ migrate
./ create_sample_data

The interesting bits

There's not too much code here, as the goal is to show off the database related code. The interesting files are:

I have not set up any views or configured the admin, so I recommend using the Django shell to explore the models:

./ shell
You can’t perform that action at this time.