10-17, 14:40–15:10 (Europe/Lisbon), Auditorium
Building custom managers in Django greatly enhances your data retrieval process, abstracting the logic in the manager methods. When the ORM isn't enough you can add raw SQL, but once your queries start to grow, it might be hard to manage user-defined arguments, repeated logic and many other aspects. In this talk, I'll show you how you can use templating engines like Jinja2 to build reusable, extensible and easy to understand raw SQL templates, used by your manager to improve your data retrieval process.
In this talk, we'll start things off with a quick intro to Django for anyone who's not yet familiar with it. We'll cover the basics, giving you a sense of what it's capable of.
We will focus on the Managers concept inside of the Django ecosystem, highlighting their purpose and how they can be used to improve your application (custom methods, raw SQL,...). We'll touch briefly on the limitations of this concept, mainly the complexity around managing complex queries and reusing logic across different requests. Finally, we'll analyse my solution to this issue, using Jinja2 and building custom raw SQL templates that are evaluated at runtime to improve your custom queries. In this section, we'll have some time to look at a simple example of how this can be done.
Intermediate
What are the main topics of your talk? –Django, Jinja2, SQL
👨🏽💻Crafting a Better World, One Line of Code at a Time👨🏽💻
I’m João, a 25-year-old Backend Engineer living in sunny Lisbon, Portugal. Over the past 4 years, I've delved into diverse sectors like Telecommunications, Logistics, and Healthcare, tinkering with an array of technologies including Python, Golang, and Node.JS.
What really drew me to this field is how it's always changing. I love that we're constantly learning to keep up with the latest and greatest. It's like a never-ending adventure! I'm all about embracing new challenges and geeking out over cool tech stuff.