Keynote: Django Reimagined For The Age of AI with Marlene Mhangami

This video features Marlene Mhangami at DjangoCon US 2025 in Chicago, Illinois, USA.

Keynote: Django Reimagined For The Age of AI with Marlene Mhangami
0:44:58
Published October 23, 2025
308 views

This talk was presented at: https://2025.djangocon.us/talks/keynote-wednesday/

LINKS:
Follow Marlene Mhangami 👇
On X: https://x.com/marlene_zw

Follow DjangoCon US 👇
https://fosstodon.org/@djangocon
https://x.com/djangocon

Follow DEFNA 👇
https://www.defna.org/

Video production by the presenter and DjangoCon US 2025 volunteers.

Summary

AI is already a practical part of everyday life, so Django developers should learn how it works rather than treating it as magic. Marlene Mhangami explains that large language models predict likely next tokens, then shows how retrieval-augmented generation, MCP, and agents.md files can provide them with useful context and enforce project guidance. She argues that Django’s explicit structure is well suited to AI-assisted development, but the community must address security, maintainability, hallucinated reports, and low-quality contributions. Django should also use AI to make learning more accessible, including offline educational tools for communities with limited connectivity, while ensuring beginners still understand the code they use.

Key takeaways

  • LLMs are statistical autocomplete systems that predict the next token, not magical sources of truth.
  • RAG, MCP, and agents.md files give developers ways to supply context, connect tools and data, and guide AI-generated code.
  • AI-generated code can create security, scalability, maintainability, and open-source quality problems, so it must be reviewed and tested.
  • Django’s clear conventions and structure may make it a strong framework for AI-assisted development, but the community needs a clearer Django-and-AI story.
  • AI-assisted learning should build on fundamentals, use guided and modular workflows, and help people in under-resourced settings through offline small language models.

Summarised automatically from the transcript.

Transcript

7,229 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:15

Speaker 1: Good morning everyone. My name is Marlene, like Afi said, and today I'm going to be speaking to you about reimagining Django. for the age of AI. So just a quick reminder of what Afi said, I currently work as a senior developer advocate at Microsoft. I focus on Python and AI, which is great because it's super relevant for this talk. And I really love to experiment. So I love experimenting with Python code. And I share a lot of those experiments on GitHub. So if there's anywhere you want to follow me, please follow me on GitHub. Alright, so jumping into the talk. We all know, hopefully, that AI

1:01

Speaker 1: is A really big deal in the current zeitgeist, but just how big of a deal is it One opinion from a guy called Dr. Andrew Ng, who is the current uh head of the Stanford AI Group. and the co-founder of Coursera, he has been quoted as saying that AI is the new electricity. So I think that's a pretty big deal because electricity is really important. I don't think we would be here at this conference today if it wasn't for electricity. So He's a really smart guy. He seems to know what he's talking about. But some people think he's thinking too small. Sandar Pichai, who is the CEO of Google, has been quoted as saying

1:50

Speaker 1: AI is more profound than fire and electricity. So not just electricity, fire as well And fire is pretty important to our journey as civilization as a whole. I don't know if we would have made it today. Without fire, it's a big deal. So clearly AI is life-changing. But some people think even Sunda is thinking too small. A software engineer that's based here in the US, of course. called Anthony Lewandowski. He has been quoted as saying that AI is God. He's the co-founder of something called the Church of AI. And I think the premise behind this is that at some point AI is just gonna take over the world.

2:35

Speaker 1: So we might as well just start worshiping it right now. So just prepare for prepare yourselves. I definitely think that this is taking it a little bit too far, but there are ways that we can actively see how impactful AI has been on society as a whole. We saw this just three years ago. It feels like longer, but three years ago when ChatGPT launched, it became the fastest growing app in history, reaching 100 million users in just under two months. We also know that ChatGPT is the fifth most visited website in the world right now. At the moment, it has about 5. 2 2 billion monthly visits to the website.

3:23

Speaker 1: And I think this is a clear sign that even though there's a lot of hype around AI at the moment , It's not just some arbitrary idea that CEOs or futurists are talking about in a boardroom somewhere, but it's something that people are actually gaining value from in their everyday lives. And for us as web developers, as Django developers, I think this also should show us that it 's it's something to pay attention to Too. It's something that we should be interested in. And I think a good question for us to be asking this morning is: what does the future of Django look like in the age of AI? So for this talk today, I'm going to be doing my best for the rest of this talk to walk us through some ideas

4:14

Speaker 1: to hope Make us feel comfortable with the idea of using both Django and AI together in the future. The first point that I'll do that to do that, I'll be walking us through three main points. The first point is no magic The second is context matters. And the third is don't leave people behind. Okay, so the first point, no magic. Some of you might be new to Django, and if you are new, you might not know this, but Django has a Django design philosophies page in the documentation. It's really great. And it is a way for us to know some of the decisions that the people who made Django initially made, the reasons why they made these decisions. decisions and why the people developing Django

5:01

Speaker 1: even right now continue to make certain decisions. And one of the core philosophies that is listed on this page comes from Python's PIP 20 that says explicit is better than implicit. And Django goes on to flesh that out even a bit further and says magic shouldn't happen unless there's a really good reason. for it. So if you're new here, just know that this community actively discourages magic. This is not Disneyland. No, I'm doing. Obviously, when we are talking about magic in a computer science sense, we really mean things that we don't want to have too much happening in the background where you can't understand what the code is doing Really in Django and Python, we want to understand most of what's happening so that we

5:47

Speaker 1: can debug our code bitter or build out new features. Something that's pretty tricky about LLMs that I found even for myself is when I use them, LLMs really oftentimes it feels like magic to me And I don't understand what's going on, but it feels really cool. And there are so many people in the AI space that actually talk about LLMs as though they are real magic. So Sam Altman, who is the current CEO of OpenAI, has been quoted multiple times as saying that at OpenAI, the main product that they are trying to build is magic intelligence in the sky. And that's fine if you are selling AI. I think that's a good thing to maybe think about. Or maybe if you're a user and you want to give the end

6:35

Speaker 1: user this magical experience. By programming with LLMs or using LLMs. But for us as developers, I think it's really important that we push back against that and that we try and understand how LLMs work and this I think will also give us the clarity that we need to be able to know how to build with them and what we can do in in the future. future. So one what is an LLM exactly? This quote on the screen is actually a quote I got describing LLMs from Simon Willison's keynote. He keynoted PyCon US last year. And just as a side note, Simon is the co-creator of Django, but right now I think he is more known for his

7:23

Speaker 1: videos and writing on AI than he is for creating Django, which is pretty wild to say, but it really shows us I think that we are in a new era, in a different era. And the description that he gives is really good. He says an LLM is a model that predicts the next token, which is roughly the next word in a sentence. It's statistical auto-complete. So I think this is a great description, but I also want us to to help us understand this even more. We can actually visualize this in code in case This is a bit fuzzy. So I'm in a Jupyter notebook right now. And here I am starting off by instantiating a

8:09

Speaker 1: Client. I'm using Azure OpenAI, which is just the Azure Flavored version of OpenAI. I work for Microsoft, so and this just allows me to connect to GPT 4. 1 which is an LLM model. And I'm telling the LLM that you are a helpful assistant that finishes a user sentence, complete the user sentence given the context. And something else I want to point out here is that I'm setting log prompts to true. And when I set that to true, that's going to allow me to be able To see or visualize the probability that the LLM is going to select a specific word next. Okay? So that's what I'm showing on the screen there. I also have some other code in here just to visualize in the table So the prompt that we're going to send in to our LLM to hopefully have it complete this for us

8:59

Speaker 1: is it's a lovely day in Chicago. Let's go to the So in the audience, do we know what is the most likely response to this question? If it's a lovely day in Chicago, where are we going? Pizzeria. Pizzeria? Is the pizzeria d and like is that where everyone is gonna wanna go? I mean pizzeria is one any other do we have The lake? The lake? Okay. Django con is a good one. Though I'm not sure if that's the most statistically I'm not sure about that. But let's see what it says. So when we run this We can actually hopefully if it works. Ah, the lake! Thank you very much. You got that right. So we can statistically see what's happening here. It says it's a lovely day in Chicago.

9:44

Speaker 1: Let's go to the lakefront and enjoy a walk along the beach. So we can see that there's a 51% chance that if people are saying the sentence it's a lovely day in Chicago, they're probably going to go to the lake. That's the likelihood of what's gonna happen. There's also a 40% chance that they're gonna go and see art And I think that's probably pretty accurate because there's the Chicago Art Institute that's really lovely. And so there's a high percentage of that as well. There's other things here that you can also And then again, once it's predicted the word lake, it's going to predict the next word front, and there's a higher chance that it's going to be front and so on. So this is a great way for us to see what's happening under the hood is that we're visualizing that the LLM has been trained on all this data, lots and lots of phrases, and it's just predicting based off of

10:35

Speaker 1: statistics, what is the next phrase or what is the next word that's that's coming up. I also want to mention that I've created a fun website. I'll share the links at the end. That is a probability visualizer. You can play with it on your own. And I tried, it's a lovely day at JaggerCon and it says let's go to the conference hall where all the amazing talks are happening today So you can go ahead and and try that yourself later if you'd like. Okay, so that is one way we can understand how AI works or LLMs work at a higher level, this statistical autocomp. There's other resources you can use that will give you an even deeper understanding. I would recommend Simon Wilson's blog. It's fantastic. He does a great job. In explaining the latest trends

11:23

Speaker 1: in a simple way. Andre Karpathi is also very popular in the AI space, and he does great videos showing you actually how to build an LM from scratch. And then I would also recommend Chip Hewann's AI Engineering book. She's open sourced the book, so it's available on GitHub. You can just Google if you'd like. All right, so the second thing we're going to talk about this morning is that context matters. And I let 's to figure out what we mean by this. I'm just going to give you some context this morning. So today We are at DjangoCon and we are celebrating 20 years of Django, which is amazing. And when I was doing my research on Django, I went online, I watched different podcasts. Uh was

12:08

Speaker 1: talking to Jeff the other day actually about this and turns out Django was created in a newsroom somewhere in Kansas, which is incredible to me because I would not have expected that Um but it's amazing. And the first web the first Django website is one that you can see on the screen there and it was in this room, uh this new Newsroom that it was created. And really when I was reading the history, I started thinking to myself, if I was there in this newsroom and LLMs existed, How would I be using them in that used room? And if I was, and the group that I kept on thinking about was journalists. So today we know that all journalists, their main purpose is to tell the truth and to share facts, hopefully.

12:54

Speaker 1: We know that's not the case actually. But for many journalists, we hope they want to tell the truth. And so if I was a journalist that was in that newsroom A big question I would be asking myself is can we trust our limbs to tell the truth? And my answer to that question, like many things in software, is that it depends And it depends on the context. So to demonstrate what I mean by that, I want to look at a scenario that happened a little bit earlier in this year. So in May, Elon Musk, who is the founder of she bought recently bought X. And he it's something that's really interesting, some context about Elon Musk is he grew up in apartheid

13:42

Speaker 1: South Africa and has had a very publicly tense relationship with the government of South Africa and with different political parties. in South Africa. And in May, suddenly uh on ICT, there was a day when Grok which is a bot that's powered by the XAI LLM, started randomly telling users about white genocide happening in South Africa. So you can see See, I hopefully you can see the screenshots on the screen, but in the first one, we have a user that's asking Grok if the salary on this post is accurate for a baseball player. And then Grok responds and starts telling this person about white genocide in South Africa and how it's a highly debated issue.

14:28

Speaker 1: And in the next image that we have on the screen, we have another user that notices that something is going on. This is happening often enough that people are wondering what's happening. And so this user actually asks Grok , this is wild, what's happening? And Grok initially apologizes to the user and then almost impulsively responds with more information about white genocide happening in South Africa. Later on, uh the XAI team published a tweet apologizing for the situation. They said, uh, an unnamed employee. made an unauthorized modification of Grok 's base prompt. And then it caused it to start giving this information to the public.

15:16

Speaker 1: So uh we're not really sure what happened in this scenario or who could have been behind it, but uh something did happen and the context of the LLM was altered So I do want to take a moment just to acknowledge that there are some serious ethical issues that AI presents to us. And I think this example with Grok is just one example of how LMs can actually be used in a way that's potentially dangerous to us in society. And I think that we as a community need to be calling things out like this out when it happens, and we need to be holding some of these frontier labs accountable. I'd love to see more transparency uh more accountability when things like this happen with AI.

16:05

Speaker 1: And whether that is with what the LLMs are actually saying to the public or things like environmental issues, for example. At the same time, uh even in the same way that newspapers or podcasts can be Used to spread misinformation, uh, this doesn't mean that these means of communication are not useful in some way. And I see LMs in the same way. So If LMs are actually here, if AI is here to stay, of which I really do believe AI is here to stay, how can we best leverage it to be able to reflect our own values? And to potentially change the context to reflect the world that we want to see. So as a Django developer, say

16:52

Speaker 1: going back to the technical details, how can I control the context that I send to an LM? Right now in the industry, I see three main ways that people are controlling the context. The first is RAG, the second is MCP, and the third is something called an agents. md file So let's look at each of these one by one. Okay, the first rag or retrieval augmented generation And this is just a way that you can take information usually in documents or in a database somewhere, and you can feed it to the LLM and it grounds the LLM in that information so that when it responds to the user, it uses some of the context that you sent to it. And technically in the details, when you're using or sending information to an LLM client, most clients, the accept

17:42

Speaker 1: a messages parameter. And the messages parameter takes in a list of dictionaries. And the dictionaries will contain two keys, a role key and a content key And the main key we are interested in is the system role. So whenever we alter the system role, that will help us to be able to control Control how the LLM responds. So we want to send in information. So in this case, if I have a PDF and I want to send that information to my LLM, I can Change the PDF into a Python string and then send it to the system prompt. And that should make sure the LM responds in the way that I would like. The second thing that I want to point out about context is MCP.

18:27

Speaker 1: So MCP is very popular. It's become increasingly popular recently. And this is an open protocol that standardizes how applications provide context to our limbs. Some interesting things when we are talking about MCP, we're trying to understand it. There are three core parts that I will point out. The first is that we have hosts and these are just applications that want to get data from our MCPs. servers in in some way. So your Django application can be an MCP host. And then we have clients and clients are what actually maintain the one-to-one connection with an MCP host server and there's multiple different clients for me when I'm building applications and using Python I like to use

19:15

Speaker 1: Langchain with um my choice of LLM. So you can use whatever you would like to connect to to create a client, but yeah, there's multiple ways to do that in the code And then the last thing is MCP servers. And these are actually you can create your own server or you can use ones online. And these just offer up different resources and tools. to the MCP client to give it data and information. Looking at this a little bit more in depth, so with the MCP client Servers, they expose three core things. The first is tools, and tools in MCP are just functions. So in Python, they would just be a Python function that can do something. So maybe the Python function goes and looks online for information and brings it back.

20:04

Speaker 1: Or it can send an email to someone. But that's what tools are. It's just Python functions. The second thing is resources. And these expose data. So whether that's a file or database records, if you want your client or your application to have this information , you would go to resources. And then the final thing is prompts. And prompts are predefined templates that allow for AI interaction. So say for example you're building out a QA application that you want to use, you can create a predefined prompt that has question and answers that your user can can have access to. Like I mentioned before, one way that I do that is through Langchain. You don't necessarily have to use use it but I found it's been helpful.

20:50

Speaker 1: So just adding this code and then client code as well allows me in this example here, I'm using Hugging Faces MCP. And I don't know, I've never used the Hugging Face API before, but the advantage of using something like MCP is that it gives you access or your LLM access. to the Hugging Face API and all of the tools available to it without you knowing uh how to use it. Without you having any knowledge about the API before. So I made an example application where we have this chat application. I don't know much about the Hugging Face API, but what I do know is that there's a model on there called Flux that generates images. So I asked it to generate a an image of a purple pony. And to do that, all I had to do was add in that line of code.

21:39

Speaker 1: And so it's a really quick way, it's it I think improves the speed of your development with MP. CP. Alright, then the final thing to provide context is agents. md files. And for this, the place that these files are particularly used these days is with something called vibe coding. Have anyone Has anyone heard of vibe coding before? So vibe coding is unfortunate name, but it's actually the industry standard to call it vibe coding these days. And basically with vibe coding, what happens is you use natural language. You tell the LLM to build you a specific application and it does that. On the screen playing in the background was a uh open source website called DeepSite

22:25

Speaker 1: that allows you to generate these applications using vibe coding, which I think is pretty cool. We know that software engineers are increasingly using AI to help them in the development process. At Microsoft, we've really seen growth in the use of GitHub Copilot. And people who are using this are sometimes using it for autocomplete, but lots of them are are actually vibe coding with it as well in their IDEs. Even though vibe coding is very cool, it can also be painful for some people. So I saw this on Reddit and I thought it was kind of funny. Someone said, what's the point of vibe coding if I still have a to pay a dam to fix it? So there's lots of people who are vibecoding and they're creating these applications. Maybe they're not software engineers or they're very new in software engineering.

23:14

Speaker 1: And are creating these really complex applications. And then they get to a point where they just don't know what they're doing and need to find help And so I think this happens quite often. And one way that we can fix this or help in this process of helping people along the way when they are vibe coding is oh no no actually I cannot see my notes but um AI generated code. The reason why people are running into problems even when they generate code with AI for websites. Is that AI-generated code falls short? It has security issues a lot of the time, it has scalability issues, it has maintainability issues. So there's a number of things people will find issues with when they're coding with AI. And the agents.

23:59

Speaker 1: md file I mentioned is a great way to sort of try to help with this issue. So many IDEs For example, in VS Code, you have GitHub Copilot will allow you to vibe code in your IDE. And The minute it sees an agents. md file, we talked about that system prompt, it's going to take that agents. md file and add it to its own system prompt And so what we are able to do with this file is to provide guidance to the agent to say, these are the best practices. you need to be following, whether that's security best practices or Django philosophy best practices, whatever it is, we can add that to our agents. md file. And I think it's it's one way that we can help our vibe

24:46

Speaker 1: coding friends. I tried to search online when I was preparing for this talk to see if anyone in the Django community was using this. I found this conversation between Will Vincent. Hi. And uh Corey Zoo. And I thought this conversation was so great. Um they were talking about agent AI agent rules or cursor rules. So that's another name for this agents. md file. And one thing that Corey suggested was to have a general Django rules file, maybe a centralized place where we create resources for these people who are vibe coding to try and help them along the way when they're creating resources. this these applications. So that's something I see happening in the future that I would love to see from our community. All right, the final, the last and final point.

25:33

Speaker 1: I think I have a couple more minutes. is don't leave people behind. We've talked about context and now what comes next. All right I want to just mention that one thing that I think is particularly special about the Django community, the Django ecosystem is the community. And I experienced that for myself several years ago. In 2016, I tried, I attempted to create a non-profit. called Zimbopie and it was a nonprofit with the goal of teaching girls how to code in Zimbabwe. And my co-founder Ron, who you can see in that picture, he had already connected to the Django community He was running Django Girls workshops around the world, no, around Zimbabwe, and uh

26:20

Speaker 1: was doing a great job. And so when we decided to create this nonprofit, Ron shared this information with other Django communities. People and so many people rallied around us. And at the time, I actually wasn't a part of the Django community at all. but I was really moved by just how many people who had never been to Zimbabwe before, who had never, who probably, I don't even know, had never met me before for sure And they just rallied around us. You can see even there. I think this is Will Vincent's book, even maybe Django Foe beginners, I'm not sure. Um it is. And uh, you know, Danny as well, he has a book called Two Ski groups of Django, we got a ton of donations for that as well.

27:05

Speaker 1: And we were able to use these resources to teach these girls in Zimbabwe. And this is something that was so unique about the Django community. in my own journey. And part of this, when we started running this nonprofit, was that we used the Django Girls tutorial And for anyone that doesn't know, Django Girls is a nonprofit that runs workshops around the world. Their goal is to inspire women to fall in love with programming. And there's a one-hour workshop that you can take, you can do it online, and it's fantastic. It allows you to go from an absolute beginner to actually launching a full Django application as a blog online. And I just we took this, we started creating these clubs where we would run the Django Girls tutorial sometimes.

27:54

Speaker 1: or we would sometimes just go through exercises through the books. And it was fantastic. We initially started in the more affluent areas of Zimbabwe, so that was going great. And for some reason I decided to myself that, oh, you know what, we shouldn't just stay in the affluent areas. We should go to some areas that are not as affluent, like the more rural areas. Uh you know, I think if I don't know. It was not a good decision. I think at the time probably should have matured a little bit more. Um But We partnered with different community centers around Zimbabwe and this was the first community center we partnered with. And it was fantastic we had gotten some laptops donated

28:39

Speaker 1: for this club. And s it was very challenging. There was no internet in the community centers. And you know, that's a challenge when you're trying to teach programming when there's no internet. And there was electricity some of the times, but it was it was quite challenging. And we tried our best to make it work. But ultimately I wasn't able, we weren't able to keep the nonprofit alive. We actually ended up just shutting it down because it was very difficult to run. But in that mo in that time, I really saw the importance of not leaving leaving people behind and as I've worked with LLMs there have been several areas of it that I think we can use

29:25

Speaker 1: or utilize to be able to help in areas like this. There are things called small language models, for example, that you can download onto a laptop and you're able to actually completely interact with an LLM completely offline. So in this process, I have been experimenting right now with creating an offline version of Django Girls where it's completely run in the terminal. The user can interact with a bot that is a small language model called Phi and they're able to ask it questions along the way but walk through the different parts of the Django Girls tutorial. It's something that I'm still working on. I decided not to run it live because it's slow

30:10

Speaker 1: and I don't uh I'm still improving it. But this is something that I think could be really useful potentially, particularly in areas that are are under-resourced So I think that's pretty much uh it for my talk this morning. I have a bunch of resources. All of the links that I share today are at that QR code or on my GitHub. DjangoCon 25 Keynote. If you want to help out with the Django Girls Offline, I'm just testing it out for the moment, but if you have ideas on how to speed it up, for example I would love uh some feedback on that. But yeah, that's it for my talk. Thanks, everyone. Huh? Uh sure. Yeah, I can answer a couple.

30:56

Speaker 2: Do we have any questions?

30:57

Speaker 1: If they are any.

31:00

Speaker 2: AI, LLMs, Jackle Girls. Well Vincent 's book.

31:05

Speaker 1: Yeah, we'll Vincent's books.

31:12

Speaker 3: Do you have thoughts on how people are Learning coding in Django in particular with LLMs now? Because to give my take, I see them jumping to uh what they think is an intermediate level, but because they don't physically type it, they it becomes almost harder to learn.

31:27

Speaker 1: Yes. I do think that there's lots of disadvantages to just going straight from being a beginner to like vibe coding, for example. But I I think that people still need to learn programming by typing stuff out and like starting from scratch. But there's also a way that I think that you can get inspired by vibe coding these apps. So there's been several scenarios in my own life where just by I give this scenario once that like if I see I saw Serena Williams playing tennis when I was growing up and I was like she can do it so I can too and then I was like I'm gonna become the next Serena Williams and started practicing all the time because of that inspiration of seeing someone else do something. So my feeling with

32:13

Speaker 1: vibe coding is that it can be a good starting point for people to get inspired to build stuff. But then I think the hope would be from there to take them back to the basics and walk them step by step through. Something like I showed with the Django Girls tutorial, maybe creating an interactive learning experience and improving the learning experience. Yeah.

32:49

Speaker 4: Hi, thank you. So my question is a little bit raw and rough, but it's basically how can the Django maintainers defend against the flood of bad quality stuff coming our way because of vibecoding which I just learned today what it means. I hate it already.

33:14

Speaker 1: That's fair. A lot of people hate it. And again, like I was saying, okay, so in terms of the maintainers I think I've so I've seen people submitting PRs to open source projects using VA coding. I think that's a bad thing to do right now, especially if they don't check the quality of the PRs. I do think at some point maybe the LLMs will get good enough where someone could use it as a starting point and then go from there. But it is very tricky for now. Yeah. We

33:50

Speaker 4: also are getting security reports completely hallucinated. Yes, absolutely. And they are I mean for the most obvious one, it's easy to deal with. There are there are some that are borderline and you can j not just dismiss a security report. We need to do a lot of work in order to understand whether we're getting a valid thing or a completely ridiculous thing.

34:11

Speaker 1: A hundred percent.

34:12

Speaker 4: And the other thing that I personally struggle is that when you provide feedback on something that is clearly low quality, the Uh I wouldn't I I don't want to generalize, but in general, I mean people might not be willing to build on top of that. They just want to get or credit or name or contribution in. They don't seem to be willing to do the work. So do you have any advice for that?

34:37

Speaker 1: Yeah, I would say I agree. I think that right now, maybe because we haven't figured out a way to control the quality. I would say that maybe for now, especially to these base open source projects like Django, for example, maybe discourage these sort of vibe coded PRs. But what I will say is if we looked for example at that agents. md file people are going to be vibe coding. We're seeing them vibe coding. And so in those situations, how can we help them create more secure code, better code? And I think things like a centralized agents. md file where we have these are the best practices, put this in your IDE for your agent, and hopefully your agent is going to follow this when it's building out your application.

35:26

Speaker 1: So I would say for personal applications, I'm big I I do think people should can live code, I think they should use these agents. md files. But for open source projects, particularly the base ones, I do think it can introduce insecurities. So it's a little tricky. It's a fair question.

35:47

Speaker 5: Okay, on a completely different topic.

35:48

Speaker 1: Yeah.

35:49

Speaker 5: If you had a time machine knowing what you know now can go back and do Zimbo Pie all over again, what would you do different do differently and why?

35:55

Speaker 1: Oh, that's a good question. Like I can't even think like I tried to think about going back and trying again, but it was so traumatic. It was really hard to try and run a nonprofit Um it w I think what would I do? I would uh I would start by staying in those affluent areas. And I would start by generating some sort of revenue. I would try and grow that until we had like a sustainable model. And then When we have something sustainable that we could take income from, I would then go out to more under-resourced areas. Because I think the issue was starting out like going to these under-resourced areas without resources ourselves and then being like

36:40

Speaker 1: help us to do this and there was no one to help us to do that. There were books and support from the Django community. Thank you But it was it was really tough. So yeah.

36:51

Speaker 5: Awesome. Thank you.

36:52

Speaker 1: Okay.

36:58

Speaker 6: So kind of a hard thing to ask, but um in the last couple years we've seen frameworks come out, uh web frameworks that have surpassed Django in terms of like fast API. They've come out of nowhere. And it's kind of perceived that they are doing something that is easier to work with LLMs with or build services, build agents. What should Django do? to be more friendly like friendly in this because we're a web framework. Uh we do restful things, we do HTML. LLMs are very good at writing Django code.

37:27

Speaker 1: Yeah.

37:28

Speaker 6: And so do you have any other thoughts or tips on that?

37:31

Speaker 1: Uh I think we need to think about the story we're telling about Django. I actually think Django, and I'm so sorry to say it, but I think Django is fantastic for vibe coding because Django has an amazing structure and things are so structured in a clear way and it provides a framework that's clearer, at least to me, than FOSTAPI, for an LLM to come and fill in things. And I just think that at the moment the story that's being told is not is not f there's nothing there strong with the AI community. I think there's lots of ways we could start to kind of tell a Django AI story. Super easy right now to integrate an LOM into a Django application and create a chat app.

38:20

Speaker 1: Very easy to do that. Not okay, not easily the word easy, but really straightforward to do that. With five coding, again, I think Django has a great structure to be able for LLMs to be able to work with. So yeah, that's that's what I would say about it. But I I think we have to start from the place of are we open? to AI as a community? Are we open to AI as a framework and then go from there? Probably. Yeah. Okay , one here

39:07

Speaker 7: Okay, when it comes to LLM and teaching, is there a way that you can be able to use vibe coding at the same time have a procedure where you uh in in in force uh rigor and uh trying to understand

39:23

Speaker 1: yes i do think there are ways to do that So OpenAI actually now has an education mode, for example, where you can use Chat GPT in this mode where Students go into ChatGPT and usually they would ask it a question and it would just return an answer, for example. And in this mode, this education mode, you can Type in a question and instead of just giving you the answer to that question, it takes you down some sort of an education pathway. So I do think This is one area. Education is the biggest area I think that LOMs can help with if we're creative with it. So 100% I think guided learning paths where you kind of stop the user from doing certain things, um, but enable them to do other things

40:14

Speaker 1: I think can really be useful for education. Yeah.

40:20

Speaker 2: Amy okay

40:28

Speaker 8: I'm curious if there's any kind of survey mechanism. I'm very curious how many people in this room are are using some kind of vibe coding in their day-to-day work. I don't know if we want to do a private survey or if people want to raise their hands.

40:42

Speaker 1: Do people feel comfortable raising their hands or I'm by

40:46

Speaker 8: fine? I'll raise my hand.

40:48

Speaker 1: Okay. That's a good number of us That's a good number of us. I don't know what this means. I think it means we need a Django we need an agents. md file. We need a central we need some central resources for AI and Django, I think is what it means. Uh

41:08

Speaker 6: yeah, thank you so much for today. Um my question is kind of short, but It has to do with this idea of learning with your vibe coding, learning with the LLM. And I wonder if part of that might have to do with being able to literally ask questions while you're working. So that you're able to really interrogate everything that it's doing because it's just putting out logical sequences, it's putting out sentences from a matrix of sentences sentences that it's grabbed and culminated from logical constraints and uh grammatical constraints. So I'm wondering if that might be one of the ways or or could you talk about that as per the educational question.

41:40

Speaker 1: Yeah, kind of similar to what he was saying. Okay, but uh just focused on the vibe coding element. Yeah, well some person uh you know, I mentioned Corey Zoo. earlier and Corey I'll go back to his slide to the slide. If you want you can look for him on the Django uh uh in the discussion for him corey did a video on vibe coding with Django and he broke down he gave like tips on how he uses it in a way that, so for him, he was talking about when he VIB codes, he makes sure he goes through all of the code. And I would say be modular with it. So, you know, you start by getting the LLM to generate this specific part of your code, read through the code yourself, maybe test the code to see if it works

42:30

Speaker 1: and then go from their build up. So I would say modularity in these applications is really critical. And then just reading through making sure all of the code is your understanding it. Again, I would recommend Corey has a great video that he did uh showing how he vibe coded an an AI app, a Django app. Someone tag him and maybe he can share the video. I don't know. Feel free to do that. So yeah, good question. I hope that answered question. All right.

43:02

Speaker 2: This will be our final question for the day. If you have more questions, can you see Marlene

43:09

Speaker 1: the hallway around

43:11

Speaker 6: Thanks, Marlene. I'm just curious what you feel are some interesting ways people are integrating LLMs into Django projects, aside from like chatbots and Yeah, I'm just sure. I'm just curious what other ways people are making use of them.

43:28

Speaker 1: Great question. That's Kazai. He's also a Zimbabwean, so nice to see you here, which is great. Um and I, you know, I actually think that chat is the primary interface people have been using. And I do think Chat will continue to be the primary interface just because it's so intuitive to people. But I showed the example of the MCP application On the screen. And I think MCP is one of the ways that Django developers can integrate so many different tools into the applications. with like very low effort. Like there's it's low effort to do it, but you can give your user access to any tools whether that's

44:14

Speaker 1: you know, um here with uh with Hugging Face or there'd be people who have used the GitHub MCP server and using that to automate GitHub pull requests or issues. Of course that can ish lead to issues with open source. But um but I would say MCP to me seems very interesting. And yeah, that's something I would pay attention to. Yeah. Okay.

44:41

Speaker 2: Thank you so much, Marlene. Let's Let's give her one round of applause.

Questions this talk answers

What is an LLM, and how does it generate text?

An LLM predicts the next token—roughly the next word—using statistical autocomplete based on patterns in its training data. The talk demonstrates this by showing the probabilities assigned to possible next words.

Discussed at 7:23

Can you trust an LLM to tell the truth?

It depends on the context. The speaker uses Grok’s unexpected responses about “white genocide” in South Africa to show how changing an LLM’s prompt or context can produce dangerous misinformation.

Discussed at 12:54

How can Django developers control the context given to an LLM?

The talk presents retrieval-augmented generation, MCP, and `AGENTS.md` files as three approaches. These provide the model with relevant documents, tools and resources, or explicit project guidance through its system prompt.

Discussed at 16:52

What is MCP, and how can it be used in a Django application?

MCP is an open protocol for standardizing how applications provide context to LLMs. A Django application can act as an MCP host and connect to servers that expose tools, data resources, and reusable prompts—for example, giving an LLM access to Hugging Face image-generation tools.

Discussed at 18:27

How can an AGENTS.md file improve AI-generated code?

An `AGENTS.md` file gives a coding agent project-specific guidance, such as security, maintainability, scalability, and Django best practices. IDE integrations can add that file to the agent’s system prompt so generated code follows the project’s rules more closely.

Discussed at 23:59

How can small language models help people learn Django without internet access?

Small language models can run locally on a laptop and work completely offline. The speaker is experimenting with an offline Django Girls tutorial in which users ask a local Phi model questions while following the tutorial.

Discussed at 29:25

How should beginners learn programming while using vibe coding and LLMs?

Vibe coding can inspire beginners to build things, but it should be followed by a return to programming fundamentals and step-by-step learning. The speaker recommends guided learning experiences such as an interactive version of the Django Girls tutorial.

Discussed at 31:27

How should Django respond to AI-assisted development and frameworks seen as more AI-friendly?

Django already has a clear, structured architecture that LLMs can work with effectively, and integrating an LLM into a Django application is relatively straightforward. The community should strengthen Django’s AI story and consider shared resources such as centralized `AGENTS.md` guidance.

Discussed at 37:31

How can you use vibe coding while still understanding and checking the code?

Work modularly: have the LLM generate one focused part, read and test it yourself, and then build on it. The speaker stresses that developers should understand all of the generated code rather than accepting a whole application at once.

Discussed at 41:42

What are useful ways to integrate LLMs into Django projects besides chatbots?

MCP is a promising option because it lets Django applications expose users to many external tools with relatively little integration effort. Examples include Hugging Face tools and GitHub automation for pull requests or issues.

Discussed at 43:28

Note: 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.

More videos from DjangoCon US