Closing session
Published June 13, 2025
This video is from DjangoCon Europe 2021 in Online.
The organizers shared practical details for the next two days: DjangoCon Europe’s weekend sprints will use a shared spreadsheet to connect contributors with projects, Gather Town will host social time, and attendees were encouraged to engage with sponsors. Three lightning talks then showed ways to build Django features and workflows: a GitLab CI pipeline using Docker Compose to run tests and launch a review app; a GitHub Actions workflow that provisions PostgreSQL and runs Django tests; and a quick Iommi example that generates artist and album tables, forms, editing, sorting, and independent pagination from models.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: Hi folks, we are in the closing of of the first day and we need to tell you some important uh details. Miguel will start over.
Speaker 2: As you might have noticed, we have these amazing t-shirts that you can uh buy from the side. The bit is also displaying them, one on its shoulder. You should just go to the menu to check them out. And uh now David will explain a little bit about the sprints and about the gather time.
Speaker 1: Yeah, we are um we are trying uh The hardbeat, which is organizing the sprints in an online event. Traditionally, Django Khan has uh an amazing uh two days of sprint and uh overall collaboration in an online event that's a bit harder. We try to uh to reserve these two days, Saturday and Sunday, for uh for that kind of collaboration. uh you can find a link for a shared spreadsheet where you can apply for um uh anybody who who has uh the availability once and wants to collaborate in projects can share their details there. Anyone who has a project that needs collaboration can also
Speaker 1: share their details there. We are hoping that the community at all can self-organize around this and we are here to help in any way that we can. As a second note, we want to invite you to play around in Gathertown. It's our little way of uh interacting with each other and uh that's uh what uh will happen next in the social track. Please do acknowledge our sponsors. We wouldn't be here, at least in the same way
Speaker 1: without them. It's hard for any sponsor to sponsor an online event. The engaging in the community is really lower than in a traditional event. And I urge all of you to make the best that you can, talk with them, check what they have to offer. They are here to help. And uh we need all all the help possible uh for that. Um uh we have a good day. uh with the marvelous content um i think everything uh went uh pretty smoothly smoothly uh here here with me you have uh all the all our team that was behind this
Speaker 1: trying to um to make everything uh work well um hope that the next two days are equally uh successful and uh let's um Gathering gather town. See you tomorrow. Bye
Speaker 2: So we hope you are enjoying yourselves with these amazing talks and workshops that we had for the first day of DjangoCon Europe 2021. And now we'll have uh A few minutes where we will have the lightning talks. For those that don't know, you can actually submit a lightning talk. We'll post the URL right now on Slack so you can follow it up And basically you just need to record five minutes of talk and add your name to these uh Google forms and that's it. You don't need to do anything else and You'll be displayed here at by the end of the day. We'll do a session just of lightning talks. So today we have uh three lightning talks. The first one is by
Speaker 2: Dot Jamie. and it's a CI pipeline for Django. After that we have uh Sarah. And uh to talk about run Django tests with uh GitHub actions the that lightning talk and uh finally it would be by anders and the topic is build faster with aomi hope you enjoy
Speaker 3: Hi, I'm going to talk about a continuous integration pipeline for Django. The outline of this talk is an introduction, the tag stack I used, the pipeline stages, and a walkthrough the code. So if I start with the definition of continuous integration as defined by AWS, it's a software development practice where developers regularly merge their code changes into a central repository. After which automated builds and tests are run. So here we expect to build and test our Django application The text arc I used includes a boilerplate Django app, G Unicorn, Anginax, Docker, Docker Compose, and GitLab CI. Now if we consider those stages of the pipeline we have the build, the test, the review, the release
Speaker 3: and deploy. In this talk, I'm just going to focus on the build, test and review stages. So if we have local code that we push to the feature branch This will trigger the continuous integration pipeline and this will lead to the build and the test and the review stages. The build stage would compile your code, but in this case it would just build the Docker image of the app. The test and review stages will run unit tests and Docker container and launch the app with a new code and a container for review. Now let's take a look at the code on GitLab. And this is the code repo on GitLab. It has feature as the default branch. Now let's open this in a code editor. Let's take a look at the file that is responsible for triggering the continuous integration pipeline
Speaker 3: and that is the GitLab. hyphen ci. yaml file. This file has the stages that are going to run. So the first stage is the test stage. It runs on this GitLab runner which I've already configured and it runs the following script. So it basically runs Docker Compose to spin up the Django testing service. The Django testing service is going to run all the unit tests Now this happens when code is pushed to the feature branch only. If we take a look at this the other stage, which is the review stage. It also runs on the same runner and it spins up the Django G Unicorn service and the Anginx service which is going to spin up the app for review from the browser. This also happens when code is pushed to the feature branch.
Speaker 3: Now the Docker Compose YAML file has all the services that we saw. It has the Django testing service which runs the PyTest command. And then it has the Django GUnicorn service which runs Django using GUnicorn and it has the Nginx service that runs an Nginx container that will proxy with the Django service. Now the Nginx and the Django container are going to have the same volume over here and the Django G Unicorn service has the same Docker file as the Django testing service, which is the Docker file in the current working directory. The Androinax service on the other hand has the Docker file in the Angina X folder.
Speaker 3: If we go back to our GitLab repo and go to the pipelines under CICD, you can see here that the pipeline, the latest one has run and it had two stages the test and the review and both of them passed. That is it for creating a very simple continuous integration pipeline for Django. Find me on Twitter if you have any questions.
Speaker 4: Hi, my name is Sarah Deliman. I'm from Paris, France. I use Django for a few years now. I like to improve workflows and I will show you how to get your Django tests passing 3D directions GitHub Actions was introduced two years ago. You can manage all your workflows directly in GitHub, especially in our case for continuous integration. You can run Python in GitActions, but you can also run Docker services in GitActions. This is very useful and simple to create a database and use it to run our tests. To create the workflow, we need to define the name,
Speaker 4: this workflow in my example, define on which event the workflow will be triggered. Here it's on each push commit. You can add an event or change this event to another one. There are multiple events You can find all of them directly in the documentation of GitHub Actions. We have also jobs, which means all the things you want to run in your workflow You can have multiple jobs of course, but here I choose to have only one which is called test. We have also the definition of the runner. Here I choose Ubuntu
Speaker 4: for my workflow, but you can choose another one listed in the documentation. But you have to know that Docker Services only works on Linux distributions. Next, we have the definition of services. I choose to create a Postgres VL database to run my project with. To do that, we need to define the Docker image, Postgres. We have the list of environment variables needed, such as the user, password, name of the database. We have ports to be exposed from the machine. And options. Here I set an F chex to know when Postgres
Speaker 4: is ready for new connections. As you can see, it's really similar to a Docker compuls file with services. Next, we have the definition of the steps. Here I have three steps for my workflow. First one is the setup of Python with Gitab Actions. I choose to set a specific version, but you can choose to set a matrix, which means to run your workflow on multiple versions of Python at the same time, which is very interesting for testing. After that we have the install of dependencies with pipe
Speaker 4: and finally the run of the project with the run of the test With python manage. py test. For the workflow that's it, but we have to change the settings directly in the Django project So this is the settings of my database corresponding to my example. You can define uh multiple settings and if you want to trigger this one only for GitHub actions you can do that with hostname or GitHub workflow environment variables.
Speaker 4: At the end, we have this full workflow, and you're ready to set continuous integration in your project with that. or even to use Docker services with GitHub Actions. That's it for me. You can find the full workflow directly in my GitHub And if you want to know more about testing with GitHub Actions or Docker services, you can find all of that in the documentation of GitHub Actions. Thank you for listening
Speaker 5: Hi, my name is Anders and I'm going to talk about Iomi. We're gonna build a little uh crowd app. So I'm gonna change to the code here. So first I have two models, an artist and an album, very basic, with a foreign key from the album to the artist. I have some URLs that I haven't really built yet. So there's an index, artists, list, albums, create album and edit album. And the views are just empty for now. So they look like this. So we're gonna build something instead, and we're just gonna do for the artist thing, we're just gonna make a table based on the model artist like that
Speaker 5: and we're gonna stop that editing we're gonna go to to albums And we're gonna do the same thing there. Table out of model is album. And then we want to have a little bit more like we want some kind of um create link so actions create equals action atters href is gonna be create That's what we want, and then we also want an edit link for the name column. So columns name Cell at
Speaker 5: cell URL, sorry. It's gonna be based on the row. So we're gonna take the row. getAbsolute URL and then add addit at the end. It's gonna be quick and dirty. Okay, so let the run server restart So we have the albums here, we're just gonna do the create view, edit that thing, warm. create, auto model is an album. Um and then we're gonna do
Speaker 5: the edit page, sorry The edit page. I've already fetched the instance here, so I can do form. edit auto instance equals instance I get the edit thing here. And I'd also like to show um Yeah Well that you can make a bigger page out of parts. So the index page is gonna be a little bit more complex here. We're gonna do create a my page, which is a page And it's gonna have uh edit or oh no create I mean create form dot create
Speaker 5: auto model is uh artist and then uh uh the first table is gonna be a table of uh Automotol artist and then we're gonna have another table which is the albums And I'm gonna make the page size two so we can see the pagination on both of these There we go. And then we just do stop editing on that thing. Wait for the run server to restart. And then you can see that we have pagination that are independent. Sorting is independent. So we can create something And you're gonna
Speaker 5: uh we should have something with an A in it. So we can see it. Maybe. What did I do with the sorting? Ah there we go. That's the thing I created. Yeah, so I hope you find this a bit interesting and check out uh Iomi. Thanks!
Speaker 2: So once again, thank you for watching the lightning toss. I hope you enjoyed. I hope you had a good time and you I hope also that you got inspired to to give your own talk is a a great opportunity the lightning talks to to do the first uh your first talk in a conference and Actually, most of the speakers start this way. So they do a first a lightning talk and then they move on to a bigger normal talk. So don't be shy and uh do sign up because it's gonna be A good experience for sure
The shirts are available through the event menu; they are also shown by the event’s mascot.
Discussed at 0:14Use the shared spreadsheet to list your availability and the projects you want to work on, or add a project that needs help. The organizers hope participants will self-organize over the Saturday and Sunday sprint days.
Discussed at 0:37Record a five-minute talk, add your name using the Google form linked in Slack, and it can be included in a lightning-talk session.
Discussed at 3:20Use a `.gitlab-ci.yml` pipeline to run Docker Compose services for tests and a review app when code is pushed to a feature branch. The example uses a Django test service plus Django/Gunicorn and Nginx containers for the review stage.
Discussed at 4:33Define a workflow triggered by pushes, use a Linux runner with a PostgreSQL Docker service, then set up Python, install dependencies, and run `python manage.py test`. Configure Django’s database settings to match the service, using GitHub Actions environment variables if needed.
Discussed at 8:03The demo uses Iommi’s model-based tables and forms to create artist and album pages, including create and edit actions. It also combines tables on a page with independent sorting and pagination.
Discussed at 12:25Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published June 13, 2025
Published June 13, 2025
Published June 13, 2025
Published June 13, 2025
Published June 13, 2025
Published June 13, 2025