Closing session
Published June 13, 2025
This video is from DjangoCon Europe 2021 in Online.
The lightning talks cover five topics: using Python data classes to make external API requests and responses explicit, serving a TensorFlow/Keras object-detection model from Django, and helping beginners contribute to open source through Django Snippets. The speakers argue that typed request and response objects improve documentation, testing, autocomplete, and type checking; that a pre-trained TensorFlow Hub model can be connected to a simple Django image-upload form; and that Django Snippets offers an approachable starting point for new contributors. The final speaker challenges the mainstream scientific consensus on human-caused climate change, arguing that emissions falling during 2020 lockdowns did not reduce atmospheric COâ‚‚ and attributing climate research conclusions partly to funding incentives; these claims conflict with established climate science.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: Hi everyone, I hope you enjoyed the last day of talks and workshops of DjangoCon Europe 2021. So now let's move on to the lightning talks. First up we have Jeffrey, and the talk is using data classes to self-document external APIs. Afterwards, we have Michael. which will be talking about machine learning for Django developers. Afterwards Chris, learning open source with Django snippets Then Sebastian, write these tasks, yet another task skew. And finally, the last one by Antonius, The Climate Crisis and Its Relations
Speaker 1: to Django. Hope you enjoy.
Speaker 2: Hey all, this is a talk on using data classes to help self-document external APIs. How many times have you come across code like this? This is a post request to an API that accepts parameters. parameters like title, body and user ID for creating a blog post. It then returns a response which contains data about the created blog post. We construct a request data dictionary with relevant parameters and return a dictionary with the JSON response. So what are the issues here? The supported request parameters are unknown. In this example we are sending title, body, and user ID to this service, but how can we be sure that these are the only arguments that the API can accept? The parameter type Types are also unknown. How do we know what types we are supposed to send to this API?
Speaker 2: Well in most cases we can infer this, it is still nice to be explicit. As well as that, the response is unknown. In this snippet we have absolutely no idea what data has been returned. by the API and therefore the function as well. All we know is that it returns the dictionary. So why do we care about this? Because we have no way of knowing what the response contains, when somebody comes to this code in the future there is a large barrier of entry before they can work. with it. They would have to either test the API or hope that other references to this function provide clarity. We may also find it hard to get the documentation again. Maybe the documentation requires credentials to access and nobody can remember them Or maybe you're using an older version which has had the documentation removed. Whatever the case, a delay access in the documentation equals a delay on working with the API.
Speaker 2: What am I proposing to help deal with these issues? may have guessed it's to replace the usage of dictionaries with data classes to explicitly define our requests and responses. In this example we can now see that the request data for this API accepts title, body, user ID, and we can send it author if we want to. We also know exactly what type each parameter should be. Any future programmer can see this and understand how to construct the request for this API without needing to find the documentation. We have also defined what the response should look like and what values will be available, which again Helps any future programmer to know exactly what will be returned if they call this function without needing to refer to the documentation. There are also some side benefits to this approach.
Speaker 2: Constructing request and response objects for unit test is now simple. Simpler. Most IDs will also offer auto-complete when using the request and response objects now. And you can use type checkers to help ensure that code that uses the request and response objects are bug free, whether through static analysis with some Something similar to MyPy or runtime analysis with something like PyDantic or both. But what about dock strings? Some of you may have seen the first example and cried out in horror at the lack of doc string, which would have been the appropriate response. The first example could have had a doc string similar to this which provides the missing API data as well. I would still recommend using data classes for the extra self-documentation they provide plus the side benefits previously listed.
Speaker 2: Thanks for listening. I hope you'll agree that the usage of data classes helps keep your code easier to understand for any future developers. The code shown here is available at this GitHub URL and I'll post these slides in the Slack. Thanks again. Hi
Speaker 3: everyone, this is Michael Lucaris. I am the CTO of Intelia ICT. In this lighting talk I would explain how to integrate and serve a machine learning model for object detection into Django using TensorFlow and Keras. Our goal is to create a simple web application. First thing first we need to train our model, which is a really complicated process For our simple case, we are going to use a pre-trained model for object detection offered by the TensorFlow hub. Then we create a Django application with a home page view which displays a single form with only one image field. The ViewsPost function
Speaker 3: retrieves the image, transforms it into an array using NumPy and finally feeds it to the model. The model detects the objects of the image, draws the appropriate boxes and finally saves it as a static file. It is a lot boilerplate code που βίντεο στην repository. So, το imί Submits the form, and voila. Thank you.
Speaker 4: Hello everyone, my name is Chris Wedgewood and I'm here to talk to you about getting started with open source contributions as an entry-level developer. With Django snippets. So I've had a great conference. Uh I've been thinking about things and here are some of my thoughts and observations. So The Django system needs more open source contributors. We always have, always will. And the other observations I've had in my experience has been learning how to start contributing in open source can be quite daunting. uh and it can feel like quite a steep hill to climb in the beginning
Speaker 4: and often what I've seen uh you know on the mailing list is you know there is a desire for people to you know, once they once they are converters Django, they wanna get involved, be part of it. And I think c you know, certain contributing to th the main framework is very important. Uh but It's a complex system, isn't it? I mean it's mature. So the the the kind of things that are being fixed or or changed are I would say uh you know, hard, hard stuff. So I've been thinking about how do we as a community take aspiring you know
Speaker 4: beginner junior devs uh from aspirational contributors to ultimately productive contributors uh thinking about things like channels, I've I've heard you know, desire for uh for for for for channels contributions, but you know, even myself I I I wouldn't I I kinda I'm a bit intimidated and that sounds quite hard. So I'm thinking there needs to be maybe a place for people to to start uh to get comfortable with how open source contributions work. Uh so firstly why would you want to do open source? Well, if I think if you want to become a professional programmer, if you're not currently in work as a professional programmer, I think it's quite hard to learn things that professional programmers need to know.
Speaker 4: you know, it's not enough just to know Django uh and to know some JavaScript and you know, think you can just sort of happily walk into a d a development team and and be productive. There's there's so much that goes on around agile rituals, uh understanding git, uh uh you know, understanding operating systems, you you name it, there's a lot to n to know a and to be comfortable with for you to be a product productive professional programmer. So, you know, open source is the best way to learn because you're gonna you know, you're gonna be working p peep with people in that kind of capacity. And then for prospective employers they're gonna be able to see your work and and and uh and and eye you. Uh uh the other reasons your framework needs you, uh you know if we if we if we don't put
Speaker 4: back um you know we we run the risk of becoming redundant and I think you know I I was certainly inspired by the the uh the talk on uh talk on channels and and you know think about WebSockets and I thought okay this is this is great but it you know it needs it needs love and it needs attention and uh it's gotta come from you. Uh yes, you and uh and Uh so so so so think about that. Uh and then you know networking and relationships is is an important tool and is powerful uh for your career. So where to start? Uh Django snippets, of course. So Django Snippets has been around a while uh but needs a lot of love and attention and we you know I think it could be
Speaker 4: it could be um it could be great again. Uh uh you know not that it's not great now but it it definitely needs some love Uh so why? Uh I want to think about this concept of beginner-friendly and beginner useful. So, you know, this nodes nine that we are a very friendly community. But we need a place to come to start. Like come ask those stupid questions. Come, you know, any any no question is too stupid. Just come and ask away and learn how to do uh open source contributions And there's lots of low hanging fruit with uh Django snippets. Uh and and I I I can prove it to you, like, you know, we w uh you know, no mistake is too grave. That's my first uh contribution and it brought down the site by a week. So you know you can't do worse than me. So when uh tomorrow in the sprints, I'll be in gather.
Speaker 4: town, come find me. All are welcome. uh very beginner friendly uh come uh yeah uh you know get started in open source. Thank you.
Speaker 5: Hello, I am Antonis. I'm one of about eight billion people living on the pale blue dot, which may or may not be visible in the picture on the left. And I'm also a Django developer. I help water engineers bring the models to the web. I have written a free book about Django deployment. Now I have engaged in some climate research and I have co-authored a few scientific papers and I am a denier. I've never got any money from an oil company. Now, the mainstream climate change narrative consists of several theses, and I don't need hours to explain why most of them are wrong.
Speaker 5: But I am going to give you one example. In 2020, for the first time in history, human CO2 emissions fell significantly because of the lockdowns. You can see that in the red line. How did this affect CO2 concentration in the atmosphere? Not at all. So there is now strong evidence that the increase in CO2 concentration in the atmosphere. is not anthropogenic. Why has no one told you about it? Because the news people avoid telling you any story that interferes with the mainstream narrative And I'm going to give you an example.
Speaker 5: Last February, the Telegraph published this article, which does interfere, but A few hours later, they replaced it with something else. The title of the original story still survives in the URL. But if you follow that URL, it takes you to the second article now. Now I am one scientist together with a few others who claims the evidence for anthropogenic climate change is non-existent. So why should you listen to me? Why not to the majority who claim otherwise? So I'm going to tell you a story about that
Speaker 5: Ten years ago, I went to a conference in Florida and I presented my opinion. In one of the conference days, the organizers had organized a trip to the Kennedy Space Center, so I went. And in the bus, I happened to be sitting beside a young lady. So we introduced ourselves and chatted. It turned out that she was a PhD student also working on climate, and unsurprisingly, her work supported the anthropogenic climate change narrative. So I joked and I said, hey, we are enemies. And this is what she replied.
Speaker 5: You know something? We are not really enemies, but don't tell this to my supervisor. So, unfortunately, scientists go to where the money is. It's more or less like programmers. If there are lots of green jobs, programmers will go there. And a huge amount of money goes to climate research. What does all this have to do with jungle? I don't really see a connection But since there has been a climate change talk in this Django conference, I thought this would be interesting. Thanks for watching.
Define request and response data classes instead of untyped dictionaries, specifying accepted fields, types, and returned values. This lets future developers understand how to use the API without locating separate documentation.
Discussed at 2:33Data classes simplify unit-test setup, provide editor autocomplete, and allow type checking through tools such as MyPy or Pydantic. They also make the API contract clearer to anyone reading the code.
Discussed at 3:18Use a pre-trained TensorFlow Hub model, create a Django view with an image-upload form, convert the uploaded image to a NumPy array, pass it to the model, draw the detected-object boxes, and save the result as a static file.
Discussed at 4:24Open source helps aspiring programmers learn practical skills beyond Django, including Git, operating systems, agile work, and collaboration. It also gives prospective employers visible evidence of their work and helps developers build professional relationships.
Discussed at 8:14Chris recommends Django Snippets as a beginner-friendly place to learn how open-source contributions work, because it has approachable work and plenty of low-hanging improvements. He invites beginners to join him during the conference sprints for help getting started.
Discussed at 9:49He argues that scientists follow available funding, pointing to the large amount of money directed toward climate research and suggesting that researchers are drawn toward those funded opportunities.
Discussed at 13:56Note: 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