#428: Django Trends in 2023 Transcript
00:00 Have you heard of Django? It's this little web framework that, well, kicked off much of Python's
00:05 significance in the web space back in 2005. And that makes Django officially an adult. That's
00:11 right, Django is now 18, and Django continues to lead the way on how communities should be done for
00:16 individual projects such as web frameworks. We have Carlton Gibson and Wilvison back on the show
00:22 this episode to discuss a bit of Django history, Django trends in 2023, a little bit of HTMX and
00:28 Django, and lots more. This is Talk Python to Me, episode 428, recorded July 26th, 2023.
00:35 Welcome to Talk Python to Me, a weekly podcast on Python. This is your host, Michael Kennedy. Follow
00:54 me on Mastodon, where I'm @mkennedy and follow the podcast using @talkpython, both on
00:59 fosstodon.org. Be careful with impersonating accounts on other instances. There are many.
01:04 Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
01:09 We've started streaming most of our episodes live on YouTube. Subscribe to our YouTube channel over
01:15 at talkpython.fm.com to get notified about upcoming shows and be part of that episode.
01:21 This episode is brought to you by Sentry and us over at Talk Python Training. Please check out what
01:27 we're both offering during our segments. It really helps support the show.
01:31 Will Carlton, welcome to Talk Python to Me. It's awesome to have you both back on the show.
01:37 Thank you for having us on again, Michael.
01:38 Yes, thank you. It's always fun.
01:39 It's always fun to have other podcasters on the show. We'll talk a bit about your podcast
01:44 in a moment. Maybe just do a quick introduction. I know people probably know you from your show,
01:48 Django Chat. They know you from being on Talk Python previously, but for those who don't. Will,
01:53 we'll go first.
01:54 Sure. So, William Vincent, I have three books on Django, most notably Django for Beginners.
01:59 I run a site, learndjango.com. I just got off three years being on the board of Django. So,
02:04 Django is run by a nonprofit. I run a weekly newsletter on Django, Django News. Too many things.
02:10 So, yeah, most of my time is spent doing some consulting and a lot of teaching and learning
02:14 about Django. So, I'm very happy to be at that stage.
02:16 It's a good combination, right?
02:17 If you can make it work, it is. Yeah, if you need that sort of cycle of,
02:19 you know, I need to learn too and be interested.
02:21 Yes.
02:22 I like learning and teaching.
02:23 One of the challenges that I think people can fall into on the traps is if you just teach,
02:29 it's hard to have that. It looks like a good idea, but let me tell you, it's a bad idea.
02:34 And here's the three reasons. And here are the tears that I've shed because I tried this way.
02:39 You need a little hands-on. Like for me, it's running all the infrastructure and APIs and mobile
02:44 app stuff at Talk Python, which is plenty to get the tears. I've pulled out plenty of hair, but you know,
02:49 like I think consulting plus teaching is a really common mix for that. You like it?
02:54 Yeah, I do. I mean, so I've been working on, so I have this site, learnjango.com that I'm trying to
02:58 consolidate everything onto that site. And so that's been an effort I've been working on in earnest the
03:03 last couple of months. And so it's actually been really fun to just be an engineer for a change.
03:07 And I kind of wish I could find a me to help me when I get stuck, but there is no being,
03:11 as Carlton will share something, you know, being stuck is part of the game, but it's, it's uniquely
03:16 satisfying and frustrating to code because everything is solvable. But I, you know, still,
03:22 I find things that stopped me for a couple of days and I'm just like, it brings me back to like the
03:26 first, you know, couple of months of coding and like the terror of like, I'm not smart enough. I can't do
03:31 this, but I know that I'll get it done and I do get it done. So you get the yin and yang, but it's
03:36 uniquely satisfying to do the commit and it's done, right? Whereas even, even a podcast,
03:41 it's in the bank, but it's not quite the same binary feeling of accomplishment.
03:45 That's true. The getting stuck is frustrating, but also it means you're about to level up,
03:50 right? You're going to figure out something. Yeah.
03:52 I try to be excited about it because I know if I'm stuck, then lots of other people are gonna be stuck
03:56 or a lot of times I'm stuck on one little thing. And it's really, cause there's some other thing I,
04:00 some fundamental that I didn't know as well as I thought I did. So we can talk about that,
04:04 but I have, I have thoughts on all of that. So yeah, it's a nice, it's a nice mix to do.
04:08 And more importantly, now I have friends and peers who, when I get stuck, I can ask them. So
04:13 Carlton, of course, is one of them, you know, Django, former Django fellow, a couple others.
04:18 It's important to, you know, we can talk about this, but when you're learning, learning how to ask a
04:22 good question on Stack Overflow or Django has its own forum, which is a great resource forum
04:26 that Django project.com, you know, but the next stage is like, I did a walk, I slept on it,
04:31 like knowing when to ping a friend, cause you don't want to ping a friend all the time,
04:34 but sometimes it's like, okay, like this is, I'm truly stuck. There's no point like wasting a week
04:39 or two on this. Yeah, for sure. That's a really nice stage to get to. And it's also helpful to help
04:43 other people too, cause you're thinking about something and someone gives you something they're
04:46 stuck on. You're like, Oh, boom, that's that. And then you're like, Hey, I'm working on, you know,
04:50 something that's stuck. So anyways, having a community is really, really levels you up too.
04:54 And also people who can relate to good and bad things about code. Django is very stable,
04:58 but has a host of new features, many of which I haven't actually used. Carlton can talk about them.
05:03 So it's important to have community, right? Not just be in your own room with your computer fighting
05:08 with it. Yeah. Yeah. Any trouble or good or bad thing you've had many, many other people have had,
05:13 you just have to find them. Unlike the movie stereotypes, it's, it's way more social,
05:18 this coding thing. It is before. Yeah. But before I let Carlton introduce himself,
05:22 just a quick comment from the audience to make you feel good a bit from Bishon, who says the first
05:28 book I read on Django was William's book. So thank you. Thank you. I appreciate that. Yeah. I just,
05:32 one last point and then I want Carlton to talk, but I wrote three books, Django for Beginners,
05:36 APIs, Professionals that first came out in 2018 and 19. And then I've updated all three of them every
05:42 year since then. So on the one hand, it's been four years. I haven't had a new book,
05:46 but it's also, I've written what? Or you've had 12 new books.
05:50 12 new books. Yeah. I mean, I really have. I really have. It's, it doesn't feel quite as
05:55 satisfying, but I know that I have a built-in audience and I've, so it's a weird dynamic to
05:59 be in a situation where it's sustainable to maintain and update your stuff. I mean, I'm sure you can relate.
06:03 You have all these different courses, right? That's the thing that falls off. You do the effort,
06:06 you get the course out and then it goes out of date or it could be made better, but-
06:10 Or Pydantic 2 comes out.
06:11 Django every eight months comes out. Yeah. So it's, yeah, I try to think of the positive of it. It is, I feel like the book is so much better,
06:19 but a lay person or family members or friends are like, when's the new book coming out? It's like,
06:23 I just, I just did it. Like, yeah.
06:25 Yeah, indeed. Carlton.
06:27 Who are you, Carlton?
06:27 Welcome. Who are you?
06:28 Who am I? Well, my name's Carlton. I do a podcast with Will. So basically,
06:33 I've just stepped down as a Django fellow. So I've spent the last five years being a Django fellow,
06:37 which means I was contracted by the Django Software Foundation to help maintain Django itself. And they
06:42 have a couple of fellows and I was one of them for that period. And I've stepped down in order to go
06:46 back to building things with Django rather than working kind of just on Django. It's, so it's a kind of,
06:51 you know, after five years, that's, that was a good time period. And it's time for me to go back to building
06:56 things with Django. I've been using Django forever and I've, I'm a maintainer on a lot of projects in the
07:01 ecosystem. So I've worked on Django as framework, Django Filter, Django Crispy Form, Django Compressor,
07:06 Django AppCon. I've maintained the channels package. You know, I do quite a lot in that.
07:10 So your code runs on many, many servers, you should say.
07:13 More than like, I like to think about like, so one thing when I was a fellow, we were always, people always
07:19 give us a bit of grief about how conservative Django is. It's very stable and very, you know, we're very cautious
07:25 about making backwards incompatible changes. We try not to do that. We've got a solid deprecation policy,
07:30 got the long-term support policies. And then at DjangoCon last year, somebody read out the numbers,
07:36 the download numbers. It's not, you know, it's not necessarily the most downloaded package,
07:40 but it's millions, millions of downloads, millions of projects that are using it.
07:44 And you really can't break it. That's always really like humbling and really kind of,
07:49 yeah, actually all the work we put into making sure that the product is stable is, that's good work.
07:55 That's important work.
07:56 Yeah. Threads is using it, Carlton. You're helping out Mark Zuckerberg.
07:59 Yeah, yeah. Well, I'll be using a fork of it. We can get into that, but yeah.
08:03 I was looking at a comment on the forum. I got a little heart from somebody asked on the Django forum,
08:08 does Django scale or can I run it on lots of systems? And I'm like, well, you do know that Instagram was built on it.
08:14 You know, they're still using that core request response cycle.
08:17 And, you know, my comment was, you're not going to serve more traffic than Instagram.
08:20 So yes, Threads is built on that core request response, but it's still essentially Django.
08:26 Maybe not everyone is up on what Threads is. No, not a parallels programming thing, but a Twitter clone from Meta and Facebook, right?
08:34 Apparently so, yes.
08:36 We have an interview, maybe we can put in the show notes with Carl Mayer, who was original core Django developer who then went to Instagram.
08:42 So he spoke for an hour about, so initially it was just, it was pure Django.
08:47 And then as they scaled, they did things like they ripped out the ORM and they changed this and that, but there is still a core of it, the request response cycle that's in there.
08:55 That's another interesting thing is Django, when you get to massive, massive size, a lot of companies, you know, they have thousands of engineers, right?
09:01 We have, we Django has just the community. So as soon as you hop off the guardrails, then you're kind of on your own.
09:08 And that's sort of separate debate on whether it's worth or not, but you can, you can get quite large and it's interesting.
09:13 By contrast, like I believe Shopify is still on rails, I believe, or seem to have gone much longer.
09:19 Carlton, yeah, you have something to add?
09:20 Well, I don't think it's really, I mean, I know Instagram moved away from the ORM, but that was quite a long time ago.
09:26 If you look at octopus and kraken, they're still basically using something that's basically vanilla Django to do, you know, massive projects.
09:33 And so, you know, what it was back in, you know, 1.6, 1.7, 1.8, when Instagram were needing to pull away from what Django is, is a lot different from what Django is at 2.2, 3, 3, 4, now 4.2.
09:45 Going to be 5, yeah.
09:47 I wonder if they regret that. I wonder, not necessarily, maybe it was the right choice at the time, but do they kind of wish, like wish they had access.
09:56 If nothing else, to fork version 5 instead of version 1.6.
09:59 I wish they'd, I wish there'd been a bit more pushback on Django from thinking about, because what, what was it that caused them to change?
10:07 I think the move from it being able to root string names, strings as view names, like, and having to import the view itself.
10:14 And I think at that point, like, for Instagram to rewrite the whole stack, it was, it was too much.
10:19 And in the end, they kind of forked, but it would have been great if we could have kept them on board.
10:23 I think, yeah, for Instagram, they can, they can, it's, they got enough engineering chops, but it would have been much nicer for Django if we could have kept them on board, I think.
10:31 Well, maybe like a quick positive shout out for the whole meta as a larger organization.
10:35 They seem to be doing a lot for Python these days, you know.
10:38 For Python, yes.
10:39 They're really working a lot on, you know, Sam Gross's initiative on NoGill and the Faster Python and Cinder.
10:45 And, you know, all that probably does come out of some of the foundational stuff for Instagram and running Django there.
10:51 Yeah, and I think Carlton is still involved in very much in pushing Python forwards and, you know, what they're trying to do.
10:57 So, you know, all QDots do them.
10:59 It's, it's very easy to dog on the big corporation so they don't pay enough of that.
11:02 But it's important to recognize when they do contribute that, yes, actually, that's a good thing.
11:07 Yeah, there's plenty that need dogging on, like a lot.
11:09 Most.
11:10 We still have support for Oracle in Django, for example.
11:13 Interesting.
11:14 But Carlton, deployment, there's something else you're working on.
11:17 Well, yes.
11:18 I mean, so I've been, so one thing I wanted to quit or step down as fellow and get to work on is my button tool, which is my simple deployment tool.
11:26 So it's, it's quite vanilla.
11:28 It's old school.
11:29 It uses virtual private server.
11:31 It uses Ansible.
11:32 It's all on AWS.
11:33 And then I'm building UI and tooling on front of that.
11:36 Slightly delayed because I've had personal issues that have taken me up.
11:41 You know, my plan was sit down in April, get on with it.
11:43 My son's been ill for a while.
11:45 So that's, that's just on the back burner.
11:48 The priority with all of these things is look after yourself.
11:50 And in the situation we've been, I haven't had time to work on it particularly, but that will be the autumn now.
11:55 And that's, that's kind of, yeah, I've been talking about it for a while.
11:58 Time to actually ship it and have some capacity to ship it.
12:01 But can we, can we do, can we give it a, maybe it's different angle of pitch, which is that, so it's built on.
12:06 So deployment is trick.
12:07 We can talk about this, you know, going from local to production is hard.
12:10 And when, who do you use these days, right?
12:12 Like there's AWS, there's Azure, there's kind of Google.
12:16 There still is Heroku.
12:17 There's new entrants like Fly and some other ones.
12:20 But what do you really need?
12:21 Like if you're with Django, you want someone who knows Django, who just like puts a layer on top of someone that's not going away like AWS.
12:29 And essentially, as I understand it, Button is a Django fellow saying, here's, you have a Django app, you want to put it online.
12:36 Let me solve all the hard things, do all the hard work for you.
12:40 And it's a beautiful UI on something that's not going to change.
12:43 Yeah, here we go.
12:44 To have it.
12:45 Because all the, it's interesting.
12:46 I updated my books.
12:47 I updated away from Heroku to Fly for the new update because Heroku eliminated their free tier.
12:53 And I personally have really liked what Fly.io is doing, but it's hard to scale these companies.
12:59 Like it's not, it's non-trivial to build what they have.
13:03 And yet if you're AWS, right, all you're going to do is add, add, add, add features when big enterprise clients want things.
13:08 And so at some point it becomes unusable for a solo person or a small startup.
13:12 So I'm a fan of what Carlton's doing.
13:14 Yeah, you want something scary.
13:16 Just go to the AWS console dashboard.
13:18 Yeah, exactly.
13:20 You're like, well, where do I start?
13:21 What should I use?
13:22 There should be enough of a thing.
13:23 I have a Python web app or I have a JavaScript, whatever JavaScript people do, like a, you know, a Rails app.
13:28 Like I just want to get it up and have it not break.
13:30 But this came, so this, the idea for Button came out of exactly those, those kind of thoughts was every week on Django chat, we'd have someone come on and deployment would always come up.
13:39 And it would be like some elaborate story about what they're doing.
13:42 And it's like, well, actually, if you keep it simple and keep it neat, first of all, here's how I deploy and here's how I get my clients to deploy.
13:49 And this is how I deploy many projects over many years.
13:52 And it's continually evolving.
13:53 And then on the other hand, when you go to the AWS console, though, it's like this, ah, too much.
13:59 You don't need 58 services and every configuration option under the button, under the sun.
14:07 But it's nice to be able to break out of that, you know, if you do need to scale or you do need to do it.
14:12 So anyway, this is my, you know, project.
14:14 If it wasn't for life circumstances, I'd be slightly further along, but it's going to be the fall now.
14:19 It's going to be, you know, the shit's coming on nicely.
14:21 And the idea is a simple, a simple approach and with a nice UI on top of it that you can use.
14:27 Well, you definitely have our wishes for your son to get well soon.
14:30 So that's rough.
14:32 Yeah, that's rough when your kid is sick.
14:34 It's been a, yeah, it's been a full on year.
14:36 It's been ill over a year now and it's just ongoing.
14:39 And so, you know, that was another part of why I stepped down as fellow.
14:42 I needed to take a bit of time just for the family.
14:44 Absolutely.
14:45 I think back to the button for a second, btn.dev, by the way.
14:49 You can sign up for the mailing list or the alpha is available too.
14:52 Nice.
14:52 I'm constantly trying to push Carlton's stuff because he always downplays everything he's doing.
14:56 I'm like, come on, man.
14:57 Yeah, but I've got that natural developer shyness.
14:59 I have to wait.
15:00 I have to polish it and wait till it's perfect.
15:02 And he's British.
15:02 Yeah, and I'm British.
15:04 So I'm nice and reserved.
15:06 And anyway, Mike, were you going to make a question?
15:08 It's exciting.
15:09 And we were just talking about it.
15:11 We were just hyping people up about it.
15:13 How it's cool to have these huge deployments running tons of traffic, doing all sorts of
15:18 amazing things with like, yeah, we scaled our servers.
15:21 So we went from 500 to 300 with this trick.
15:24 Yes, that's a cool thing that pushes the envelope that makes a lot of stuff possible with frameworks
15:28 like Django and language like Python.
15:31 But on the other hand, most of us are not Instagram.
15:35 You're not Microsoft.
15:36 You're not Google.
15:37 You're not all these.
15:38 And having or let's say you're not Netflix.
15:41 I actually think that like what AWS console looks like has a lot to do with how Netflix
15:46 works, probably given how early adopters they were.
15:49 But I just think it's worth emphasizing.
15:51 Push button.
15:52 Get it running on a simple server.
15:54 Make it secure.
15:55 Keep it up.
15:56 You know, zero downtime deploy type stuff.
15:58 CICD, a push show brand.
16:00 All those types of things.
16:01 That's more than enough for most people, not just on your hobby projects, but on company
16:06 business.
16:06 Does your website get a thousand visitors a day?
16:09 It doesn't need five servers with failover and Kubernetes clusters and sharded databases.
16:14 And like it just doesn't.
16:15 Right.
16:16 And so having that option, something like button, it's pretty cool, I think.
16:19 Yeah, that's exactly it.
16:20 Like as you speak there, you're just singing to the choir for me.
16:22 It's like, you know, you can get a small box, get a slightly bigger box if you need to.
16:28 Get a slightly bigger box than that.
16:29 You can go get quite, you can get an awful lot of box for not very much money.
16:32 And then maybe two boxes.
16:34 Yeah, yeah, yeah, exactly.
16:35 But this, the kind of architecture I go for, you can scale to a very big site.
16:41 And I know in recent years, Stack Overflow moved to a, you know, much more modern and
16:45 fancy thing.
16:45 But for a long, long, long, long time, they were running on the same kind of big database,
16:49 couple of front end web servers, a load balancer, and nothing more than that.
16:53 And you're not going to serve more traffic than Stack Overflow ever.
16:56 Like nobody, not nobody, but basically nobody's going to serve.
16:59 More traffic than that.
17:00 So that's where I'm coming from.
17:01 And it's not for everybody.
17:03 And there's lots of people who've got opinions, but it's for people who haven't got an opinion.
17:06 It's like, if you don't know, if you don't know how to deploy and you don't really have,
17:10 if you're not already in the game, then well, this is how I do it.
17:14 And you can choose to do it the same way.
17:15 Sure.
17:16 I'm really excited about it.
17:17 And I have been talking about it for a long time and not having the capacity to work on it.
17:21 And now I, bar family situation, I have that capacity.
17:24 And so I'm looking forward to getting it out.
17:28 This portion of Talk Python to Me is brought to you by Sentry.
17:31 You know that Sentry captures the errors that would otherwise go unnoticed.
17:35 Of course, they have incredible support for basically any Python framework.
17:39 They have direct integrations with Flask, Django, FastAPI, and even things like AWS Lambda and Celery.
17:47 But did you know they also have native integrations with mobile app frameworks?
17:51 Whether you're building an Android or iOS app or both, you can gain complete visibility into your application's correctness,
17:59 both on the mobile side and server side.
18:01 We just completely rewrote Talk Python's mobile apps for taking our courses.
18:06 And we massively benefited from having Sentry integration right from the start.
18:11 We used Flutter for our native mobile framework.
18:13 And with Sentry, it was literally just two lines of code to start capturing errors as soon as they happen.
18:20 Of course, we don't love errors, but we do love making our users happy.
18:23 Solving problems as soon as possible with Sentry on the mobile Flutter code
18:28 and the Python server side code together made understanding error reports a breeze.
18:33 So whether you're building Python server side apps or mobile apps or both,
18:38 give Sentry a try to get a complete view of your app's correctness.
18:43 Thank you to Sentry for sponsoring the show and helping us ship more reliable mobile apps to all of you.
18:48 Well, I think it's more broadly, one of the things we're going to talk about is HTMX.
18:55 And I think there is these more iterative tools.
18:58 You don't need to jump to React if you just want a little thing.
19:01 You don't need to go Kubernetes.
19:03 I heard back in that was done.
19:04 It was just all APIs now.
19:06 Come on.
19:06 It's all front-end.
19:07 I put a toot up the other day that they convinced me otherwise meme.
19:12 Django is a front-end framework.
19:14 I'm busy writing an application.
19:16 I'm using HTMX.
19:17 I'm using Alpine.
19:18 I'm using Tailwind.
19:19 I'm doing it all in Django.
19:20 I'm doing it all in Django templates.
19:23 And it's like, you know, I'm hardly doing any of the exciting back-end stuff that we love Django for.
19:28 It's all front-end.
19:29 And it's just vanilla Django.
19:31 It is.
19:32 That's the thing that people who are learning, they're a full-stack developer and they're like,
19:35 APIs, I got to do it all.
19:37 And I mean, you must have this, Michael, with people.
19:39 You're students.
19:40 But I have this a lot of times.
19:41 People who are new say, oh, I want this and that functionality.
19:44 And I'm often like, don't go to APIs unless you need to.
19:47 Because if you're a professional Django developer on a team of more than 10 people, yeah, you're
19:52 going to write APIs because there will be front-end people who just do front-end.
19:56 But when it's just you.
19:57 And even if there's not front-end, there might be a mobile app.
20:00 That's our primary case of APIs.
20:01 Or you might have a public API for users or other companies to work with.
20:06 It doesn't have to be that you're not doing server-side.
20:08 But for a solo person or a small thing, don't just leap to it because it adds so much.
20:14 complexity.
20:14 Do you use Tornado or use an older Python thing?
20:18 Pyramid, okay.
20:19 I've considered switching to something like FastAPI or something like that.
20:23 But then I look and I'm like, you know, it's like a real thin layer over just what would
20:27 be the same anyway.
20:28 And scalability is totally good.
20:31 I mean, it works.
20:32 It works, too.
20:33 It'll run for months without me touching it.
20:34 The chances the website go down and it's not my fault because I deployed something is almost
20:40 zero.
20:40 Like really, really, really close to zero.
20:42 Either that or something's gone wrong in the data center.
20:44 But like the website itself.
20:46 And so, yeah, I chose that eight years ago and I'm still cruising with it.
20:50 It's great.
20:50 I had a client ask me about HA.
20:53 HA, sorry.
20:53 High availability.
20:54 One time they were like, oh, don't we need multiple servers and multiple this or another?
20:58 I'm like, well, how many nines do we need?
21:00 I don't know.
21:00 I can't remember the exact number now off the top of my head.
21:02 But you're already at three nines, even just deploying on the kind of worst setup in the
21:07 world.
21:07 Because the number of the amount of downtime you'll have will be sub few minutes because
21:12 and it will be exactly that.
21:13 You deployed something wrong and then you revert it.
21:15 Yeah, exactly.
21:16 Like, oh, my gosh, quick.
21:17 But we have I think people necessarily don't fully appreciate how much really high end technology
21:24 for so little money we have accessible to us with these cloud providers.
21:27 We have the best data centers in the world for ten dollars.
21:32 Right.
21:32 You know what I mean?
21:33 It's not like, well, these people like you have the same thing that Netflix is using.
21:37 And for a while, they're doing a third of the traffic of the Internet.
21:40 Yes.
21:41 Yeah, exactly.
21:42 So three nines gives you nine hours off a year and you won't even have nine hours off a year.
21:47 Like, yeah, that's highly unlikely.
21:49 Yeah.
21:49 You know, something goes down and you don't fix it.
21:51 But like it's literally if you deploy, you fix it quickly.
21:55 But you get that kind of uptime without having to have multiple availability zones and
22:00 all the failover and all the things that, you know, they like to sell.
22:03 Yeah.
22:04 And yet getting to that point for people who are new, just the act of local versus production
22:08 database stops people like every single person.
22:11 Right.
22:11 They build the site like it's a blog and then they deploy it and they're like, where's my
22:15 blog?
22:15 And it's like, oh, that database is different than this database.
22:18 Like, you know, after a while, I get used to the idea.
22:20 But it's like the code is there.
22:22 Why isn't the data there?
22:23 Right.
22:23 And then so it's just this scale of up to how many nines do you need.
22:27 But most people are focused on just put something up online and add continuous integration.
22:31 Like, I mean, really, what are the basics?
22:33 But they're not basic when you're doing it the first couple of times.
22:36 No, they're not basic.
22:37 They're not basic at all.
22:38 So having something that kind of automates that.
22:40 I think another thing is, you know, you have different team members or if you are an individual
22:44 developer, maybe getting something up on the web.
22:47 I know people I've spoken to about how daunting it is going from zero web apps published to
22:53 one is a major challenge.
22:55 Right.
22:55 Like, I don't know Linux.
22:56 I don't know the terminal.
22:58 I don't do SSH.
22:59 I don't understand the security.
23:01 I don't understand the best practices.
23:03 Like, I just can't, you know.
23:05 Well, and that's something I emphasize in my books is getting something as fast as possible.
23:10 It was a little bit smoother with Heroku than Fly, but Fly is still pretty.
23:13 Like, I take some shortcuts, but I say they're shortcuts.
23:15 You know, this isn't the most secure thing ever.
23:17 But just getting something up that first time because it doesn't have to be crazy complicated.
23:22 And I think the sooner you're dealing with a real live website, the better for many reasons.
23:26 But yeah, that first one.
23:28 You know, you've spent all this time building your application.
23:30 You're finally ready to put it online.
23:32 And then it's like, oh, learn about servers and learn about firewalls and learn about
23:37 rewrite rules and learn about permissions and groups and users and Caching.
23:43 Yeah.
23:44 Well, I just say Django has a deployment checklist to help with this.
23:47 But I still think, and others may agree with me in the community, that the local to production
23:51 gap is a big one that Django could do things to address.
23:54 For example, like everything defaults to local setup.
23:58 The deployment checklist, yes, a great resource.
24:00 I spend a lot of time in my books covering this, if you want, you know, handholding.
24:03 Oh, and it's not just a checklist on the, like on the web that you look at.
24:07 You can run manage.py, you know, space check dash dash.
24:10 Yeah, it's a management command.
24:11 And there's a whole, I guess would be the, I think, 12 or something now, sort of the, like,
24:16 really don't launch it without this.
24:17 These aren't even optimizations.
24:18 This is like, just don't leak secrets everywhere.
24:21 Yeah.
24:21 But still for Django, I think for a lot of places, there's a tension, right?
24:24 Between how friendly you are to beginners versus advanced users.
24:27 And I think Django overall has done a very good job of still being friendly to beginners,
24:31 but every, most technologies over time, you know, move towards where the hardcore users
24:37 are because that's who's kind of doing this stuff.
24:39 So that's a tension Django feels, Python, others.
24:42 You know, how do you still keep it beginner friendly, but the people who are in charge want
24:46 different things often?
24:48 That's a real tension in programming and frameworks and all sorts of things.
24:51 And I also think that that's why Python is so popular, honestly, right?
24:54 You can do C++, you can do Rust.
24:56 Like, these are really great for advanced people.
24:58 You can do, you know, BB6 or super simple old school things that are great, easy for beginners.
25:04 But like, Python is easy for beginners, but you can kind of bring in some more advanced stuff.
25:09 You can bring in async.
25:10 You can bring in generators.
25:12 You can bring in ORMs, but you don't have to, where a lot of languages are like, guess
25:16 what?
25:16 We're going to start with a void voice, void star star.
25:19 We're going to go from there, you know?
25:21 Well, the old saying was second best for everything.
25:23 And I think that's not, you know, I think it's first best a number of places now too.
25:27 I agree.
25:28 I think people say that, but I think honestly, it's really, if it's not the first best,
25:33 it is on par with the other first best, right?
25:35 It is a front running contender for a thing where I would say it probably is, you know,
25:40 the undisputed king is in data science and machine learning.
25:43 Yeah, it's all the libraries.
25:44 There's not a competitor out there that is near the level of depth in the ecosystem.
25:49 Well, because there's R and R doesn't have open source in the community that Python does.
25:54 Yeah.
25:54 That seems to be, I mean, most like here in Boston, a lot of friends are scientists and
25:58 it's either R or Python and they all kind of want to use Python, but sometimes they use
26:02 R, but Python just can do more things.
26:05 So depending on what you need.
26:06 The next episode I'm going to release, which I've already recorded, but haven't released.
26:10 So you all don't know about it necessarily is shining for Python, which is pretty interesting.
26:15 Like that's the R web story coming to Python, which I think is just more cool stuff you can
26:20 do in Python, honestly.
26:21 Actually, I need to check the Python version of that.
26:23 Cause one of the, we just had DjangoCon Europe earlier this year.
26:26 And one of the people who came up to me is someone who worked for the, what do you say?
26:30 The UK government on their putting systems together.
26:33 And he had bought my books to get his team to move away.
26:36 Maybe started with double O or something or other.
26:38 I don't know.
26:38 No, not that cool.
26:40 You just COVID information, you know, health stuff, NH, NHIS.
26:44 Is that, is that, yeah.
26:45 Nathan Holt, NHS.
26:46 NHS.
26:47 They were able, so he had said though, that they were able to use R and use the, what
26:51 is it called?
26:51 The webby to put things online, but for interactivity, they, that's where they hit problems.
26:56 So he and his team of 12 had moved a lot of stuff over to Django for the, just more interactivity
27:02 of it all.
27:03 But this is, you know, something the British government was doing to, so I'm, yeah, it's an
27:07 area I want to learn more about, you know, shiny and how all that works, because it's always
27:11 been like, why can't you just take a Jupyter notebook and put it online?
27:14 I mean, you write, like often put it online.
27:17 So I'm trying to understand that too, because the data science space is so big in the web
27:21 space feels small in comparison, but yeah, I look forward to that episode.
27:24 My quick takeaway talking to Joe there was, they really thought about how to make it the
27:29 Pythonic way.
27:30 And it seems like they really embraced it and not just, well, we'll get it to run on Python,
27:34 but it seems like it's going to be a good option for people out there.
27:37 So that's really cool.
27:38 I want to make sure that we talk about some of the history of Django and the future of Django,
27:42 but I know something that all three of us are super excited about is HTML.
27:47 So let's, and we were talking about the front end stuff and the back end.
27:51 And so I don't typically share jokes on Talk Python that much.
27:54 It's more Python bites the show at the end there, but there's this great meme and it has
27:58 the backend dev and it has HTML two people on the HTML.
28:02 When speaking to the backend dev says, look at me, look at me.
28:05 HTML is talking to you.
28:07 This is full stack.
28:08 Now you're full stack.
28:09 Now, come on.
28:10 You're not just a backend developer.
28:11 You're full stack because you're doing HTMLX.
28:13 And I think, you know, it's funny.
28:15 Also the thing called X that is kind of Twitter and half X and partially branded that, that is
28:21 a whole different joke.
28:22 But I think just this, this joke up here, it really touches on, on something that I think
28:27 makes Django makes blast, make all the Python web frameworks way more holistic and important
28:34 back coming back to build these apps, right?
28:36 It's not just like, well, we have to use reacts or we're going to push you to just write JSON
28:40 and points and, and so on and so on.
28:42 And like, no, you can actually flip that and just embrace Python more with HTMLX.
28:47 Who wants to start riffing on HTMLX and Django?
28:49 Carlton, you go ahead.
28:50 This is more of your.
28:51 No, it's exactly that.
28:52 So, I mean, two years ago, three years ago, it was all like, oh, Python's existential threat
28:57 because everything's going to be rewritten in JavaScript because, you know, everything
29:02 on the front end is JavaScript.
29:03 And so it doesn't make sense having these two languages.
29:06 So it's all going to just flip over and Python's going to disappear in a puff of JavaScript.
29:10 Well, now it's kind of like, well, really?
29:13 Is that, is that what I see happening?
29:14 Not, no.
29:15 What I see is the super established mature web frameworks showing the real strength
29:21 of the, the HTML tooling and the hypermedia tooling that they've, you know, it's, it's,
29:26 it's just so fully developed.
29:28 I mean, Django is 18 years old this summer, right?
29:30 So there's a lot of history there.
29:32 There's a lot of development time gone in.
29:33 There's a lot of richness.
29:34 And once you start using HTMLX, it really is.
29:38 It's like, oh, do you know what?
29:39 This just fits the patterns that Django wants you to use.
29:43 You know, it, like it works with Django forms and you just, you know, oh, look, it's just
29:47 a form view.
29:48 And it's just, all I do is add this little header in and oh, look, I changed the template
29:52 maybe.
29:52 And oh, look, it's, it's a fully interactive, rich client that the users can't tell the difference
29:59 between that and a full SBA built with Rack.
30:02 Or perhaps they can because it loads quicker because it's not, it's actually faster.
30:06 And one of the great reasons for switching to SBAs was they were meant to be quicker.
30:10 But the reality is after all these years, they're loading so much JavaScript into the
30:13 page and doing so much work in the browser in order to get the, the, the HTML to be interactive
30:18 that in fact, they feel slower to the user.
30:20 So for people who don't know, HTMLX lets you put attributes on HTML, not complicated stuff.
30:25 Like if you had an image, you could say hx-get and give it a URL.
30:30 And you could say hx-target is some other thing.
30:33 So if you click on that image, it'll go, if this context talked Django, pull back a fragment
30:38 of HTML and pop it with possible animations and transitions and stuff into another section
30:43 for like a master detail, like list details, view story.
30:47 And it's just as nice as most single page app, most friend and frameworks.
30:54 It's, I suppose if the thing completely loaded all the different data and had zero server interaction,
31:00 but then the startup time of that would be completely bad, like you said, Carlton.
31:04 So it's fantastic.
31:05 And let's go back to like the, the beginner and the people doing simple stuff.
31:09 HTMLX is not just for beginners, but it really works well for them because they no longer have
31:14 to learn a different framework or never different language and a framework like JavaScript and
31:19 view.
31:19 They don't have to write APIs.
31:21 They just do the thing they're doing.
31:22 And all of a sudden all this cool interactivity comes in.
31:25 Right.
31:25 Yeah.
31:25 And like for a decade, it hasn't felt to me, you know, I'm 20 years in the business.
31:30 I know how to do quite a lot, but for a decade or so, it hasn't felt to me feasible to be building
31:36 web good, high quality, professional quality web applications, single-handed.
31:40 But it feels like that again.
31:42 It feels like, do you know what?
31:44 I don't need a whole team here.
31:45 And with interest rates going up and inflation going up, you know, money being tight now,
31:49 I honestly think there is a real big commercial competitive advantage coming back to sort of
31:56 the backend.
31:57 And that's not just Django, but Django and Flask and, you know, Rails even, if you want a different
32:02 language.
32:02 But those kind of stacks where you can produce a really competent crud backend in very little
32:09 time, and then you can produce the front end that's rich enough and feels good and feels
32:14 developed for a fraction of the team size.
32:17 One, two developers instead of five, 10 developers.
32:21 This portion of Talk Python to me is brought to you by us over at Talk Python Training.
32:26 Let me tell you about one of our really popular courses.
32:30 HTMX plus Flask, modern Python web apps hold the JavaScript.
32:34 HTMX is one of the hottest properties in web development today.
32:39 And for good reason.
32:39 You might even remember all the stuff we talked about with Carson Gross back on episode 321.
32:44 HTMX, along with the libraries and techniques we introduced in our new course, will have you
32:50 writing the best Python web apps you've ever written.
32:52 Clean, fast, and interactive, all without that front end overhead.
32:56 If you're a Python web developer that has wanted to build more dynamic, interactive apps, but
33:00 don't want to or can't write a significant portion of your app in rich front end JavaScript
33:05 frameworks, you'll absolutely love HTMX.
33:08 Check it out over at talkpython.fm/HTMX or just click the link in your podcast player show notes.
33:14 I think it also speaks to the wisdom, I would say, of, so Django has a templating language,
33:22 but it's deliberately basic.
33:23 You can use Jinja and Django by design because 18 years ago, the idea was, well, we're not a
33:29 front end framework.
33:30 Who knows what's going to happen?
33:31 And that provides the opportunity for HTMX comes along, just slide it right in.
33:36 Like Django is not, doesn't have all this stuff built on top of it trying to do that too.
33:41 So that can be a frustration for beginners that why doesn't, why don't the templates do more?
33:45 They actually do a lot, but it opens it up to HTMX.
33:49 And then there's, you know, Django has third party package systems.
33:52 So there's one that Adam Johnson, who's a member of the community has Django HTMX that has
33:56 extensions.
33:56 Like basically everything you want to do, you can kind of copy and paste it in.
34:01 I mean, understand what you're doing, but so this is, yeah, Django HTMX is a great resource,
34:05 but it's not, it's not rocket science.
34:07 It's not, you know, you're not reinventing the wheel, right?
34:10 You have a list view, detail view.
34:11 You want to do auto scroll.
34:12 You want to do some validation on a form.
34:14 It's the same solved problems out there.
34:16 You just have to know where to go.
34:17 You can go quite far with it.
34:18 Yeah.
34:18 That would be an interesting question of where do you really need to not use it?
34:22 I mean, certainly even in a team setting, like it's just such less complexity and it's arguably
34:29 faster and it gets you what you need.
34:31 Where do you not use it?
34:32 So I'm building a quite rich drag and drop interface for a tool.
34:37 It's pretty complex.
34:38 It's pretty interactive.
34:39 And I'm using Alpine to do that on the page.
34:41 And then, but when it comes back to the server request, then dropping back to HTMX to send
34:47 the things and get a chunk back.
34:48 And I can quite often replace either a part or all of the Alpine component with the stuff
34:53 from the HTMX.
34:55 So it's still using rich JavaScript in the client where you need it.
34:59 But you go an awful long way before you need that, you know, and you're dropping in forms
35:03 and you've got a nested list view and you're dropping, you're fetching that nested list view
35:07 and dropping that in place.
35:09 And that's in a modal, which is perhaps powered by Alpine.
35:11 And it looks rich and smooth and it's everything you want.
35:15 But the amount of code is very minimal.
35:17 It's progressive too, right?
35:19 I mean, Vue.js, when it first came on the scene, I forget if it's still doing this, but
35:23 like its whole thing was the progressive, you know, you don't need the full React bundle.
35:26 You can kind of ramp your way in.
35:28 And so I think there's just more ways to get from here to there.
35:31 And you don't have to just go to APIs and the full-blown thing.
35:34 And I have to admit, last week, or perhaps the week before, I was sitting there going,
35:39 I was doing everything at HTMX and I was like, I need a full page load here.
35:42 I need it to refresh the whole page.
35:44 How do I do that?
35:44 How do I do that?
35:45 And I had to step away, go and get a coffee.
35:47 And as I was boiling the kettle, I was like, oh, I could just submit the form normally.
35:53 I'll fall back to just doing what the browser does by default.
35:56 Oh, yeah.
35:56 Okay.
35:56 You just always have to think if it's getting clever, like you're missing something.
36:00 Yeah.
36:00 Yeah.
36:00 No, it was exactly that.
36:01 It's like, I was so in the zone that I'd forgotten the base technology I was using.
36:05 I did a talk at PyBay Food Cart Edition a couple of years ago, and I was talking about
36:10 it on X, whatever that thing.
36:13 And we're going to have to figure this out.
36:14 That thing might be gone pretty soon, but we'll see.
36:17 Anyway, I was talking about it and I said, look, you can write these awesome web apps with
36:21 Python.
36:21 You don't have to use JavaScript and somebody's like, Michael, that's really insensitive.
36:25 People, you shouldn't be degrading the JavaScript developers and that's not the message.
36:32 It's the message that the language you choose, whatever it is, you can just embrace that and
36:37 do a lot more.
36:37 And the biggest example of that is that this is a popular framework in the node community,
36:43 right?
36:44 Which is JavaScript, right?
36:45 And the big value here is that you don't have to also have APIs.
36:48 You don't have to also have a front end and a back end framework in the context, right?
36:53 Like you guys probably know is teaching and help people deploy stuff.
36:56 It's like, well, there's what your front end can do.
36:58 And then there's the security of the browser and there's all the constraints of that.
37:03 And then your back end server, oh, it can talk to the database directly and it could do these
37:06 other things.
37:07 But with HTMX, like your front end code executes in the same context as your back end code.
37:12 So you don't have to have like two security models, two runtime models, two all these two
37:16 conceptual ways of like, well, what's happening here?
37:19 So that means this.
37:20 Like, no, it all happens in one place.
37:22 And that's even valuable if you were doing node in JavaScript.
37:24 Yeah, no, absolutely.
37:26 I think there's a, on the HTMX website, there's an awesome essay.
37:29 It could be the intercooler, but it talks about this impedance between the two sides.
37:34 And the example it gives is GraphQL, I think.
37:37 And the GraphQL gives amazing power onto the front end and you construct all these queries,
37:41 but are they safe?
37:42 And are they, who knows?
37:43 And what companies end up, often end up doing is whitelisting the query.
37:47 So it's in fact, you can't leverage the full expressive GraphQL in the client because it's
37:52 only a certain number of queries which are allowed in order to get over this security problem.
37:56 Those essays there are just phenomenal.
37:58 We should mention, so Carlton's given two talks this year, one of them at DjangoCon Europe.
38:03 He touches upon the locality of behavior.
38:06 I just put in the show notes for you, Michael.
38:08 It's one of the essays, but some of his projects, I saw everyone around me was writing down,
38:12 perhaps you want to expound on that idea, Carlton, because it's not necessarily a new idea,
38:16 but it really seemed to resonate at DjangoCon with people.
38:19 The talk was called Yak Shaving to Where the Puck's Going to Be.
38:22 And it was about, it's just been about what I've been doing since I stepped down as a fellow
38:25 in end of March.
38:26 So April, I sat down to start writing software.
38:28 I had with Django again, rather than on Django, as I said at the beginning.
38:31 And the hook that I built the whole talk around was HTMLX and this idea of locality behavior.
38:37 And so the example that I gave in the talk, which is from the essay there, is HTMLX has
38:42 got just the one HTML file open versus a jQuery example, which is very similar, but it's over
38:48 two files.
38:48 And it's not the only consideration.
38:51 But in that one case, you've got one file open versus two files open.
38:55 Well, there's better locality of behavior where you've got one file open.
38:58 And that really, when I read that essay, it really struck a bell with me.
39:02 For years, I've been talking to clients about this.
39:04 And you've got a form, a Django form, and it's perhaps only got four lines or three lines.
39:08 It's virtually nothing.
39:10 And it'll be off on its own in a separate forms.py file rather than next to the view you're
39:15 working on.
39:15 And so you have to go and open that second forms.py file to see the form.
39:19 And it's always just declares the fields.
39:21 And that's all it does.
39:21 And then you go back to the view.
39:22 And you have to kind of remember it was if you just move that form kind of next to the
39:27 view, all of a sudden, it's all within one screen on your editor.
39:31 And it's much easier to understand.
39:33 And then your speed of development increases.
39:36 And the more I've been playing with this, the more I've used this, it's just like, yeah,
39:40 actually, I'm able to work much faster by focus, particularly of a new code.
39:46 Like when your code starts to get bigger and more gnarly and more curly, and there's more
39:49 bits to it, then okay, you want to break it out so that it remains maintainable.
39:54 But when you're first working on it, and there isn't much of it, and it's constantly in flux,
39:58 keeping it all together, it just helps you go faster.
40:01 It's this idea of locality of behavior.
40:03 It's phenomenal.
40:04 I'm just a massive fan of it.
40:06 Yeah, it's really a brilliant framework.
40:08 And so for Django people, Django-htmx, that's where the magic is to get it easily integrated?
40:15 Yeah.
40:15 So the basics of that is a middleware, which will add an htmx attribute to the request object,
40:20 which lets you query it.
40:21 So is this an htmx request?
40:23 Has it got this header?
40:24 Is it wanting to redirect?
40:25 Is it wanting to do a full page refresh?
40:27 Is it got the various headers that htmx sends that will embed those and a few other niceties
40:32 as well?
40:33 But yeah, you may as well use that.
40:34 That's a good package from Adam, who's one of the cool...
40:37 Adam knows what he's talking about.
40:38 Nice.
40:38 All right.
40:38 Django, 18.
40:40 18 years old.
40:41 Yes.
40:42 Amazingly.
40:43 Amazingly.
40:43 It's old enough to vote.
40:44 Yeah, old enough to vote.
40:45 Yeah.
40:46 It is old enough to vote.
40:47 Not to drink yet, so it's not going to get into trouble on the server for a few more years.
40:51 It is on its holiday in Europe.
40:53 Yeah, okay.
40:53 Well, that's true.
40:54 Yes.
40:54 Okay.
40:54 In Europe, it actually, it totally is.
40:57 I remember when we lived there, my daughters were 16 and we took them out for their 16th
41:01 birthday.
41:01 So yeah.
41:02 Yeah.
41:02 But in the US, we have these rules, you know.
41:04 Two things.
41:04 So Django has major releases updated every eight months.
41:07 So 4.2 came out in April, 5.0 come out in December.
41:12 In between, there's 4.2.1, 4.2.2.
41:15 This is all the work the fellows, Carlton, would do.
41:18 But there's also, so in the Django News newsletter, there is almost every day, there is a new PR
41:23 accepted and merged into Django.
41:26 So on the Django News newsletter, one of the things we have now is a section highlighting
41:30 like the changes this week.
41:32 And I think last week, there were 18 new PRs.
41:35 And that's not just someone opening it up.
41:37 That's like open, discussed, accepted, reviewed.
41:40 Like there's so much activity going on.
41:43 So even as it's 18 years old and it is mature, there is still just so much happening.
41:48 And I think that's one of the messages, Carlton, I try to get to people is like, it's not just
41:51 this static thing at all.
41:53 There's so much that's happening.
41:55 And yet it won't break on you, unlike some other newer technologies.
41:58 I mean, talk about the influx of tickets.
42:02 Just why does Django need fellows?
42:05 The reason it needs fellows is because there's basically five new tickets every single day.
42:09 There's over 1,000 new tickets a year, 1,200 new tickets a year, every year.
42:13 And they keep getting handled.
42:15 They keep getting dealt with.
42:16 The PRs keep getting merged.
42:18 The security releases keep coming.
42:19 And without the fellows, it just wouldn't have happened.
42:21 Django would have sort of just ground into an ever bigger ball of unanswered tickets, unresponded
42:27 things.
42:28 And so it's a project of such a size that without the paid role, it just wouldn't be maintainable.
42:34 Some of these do get resolved.
42:36 I mean, how long was Lily's one on database constraints?
42:38 That was like 13 years, 12, 13 years.
42:41 Tell that story.
42:42 This is one of my favorite features of Django 5.0 that's coming out.
42:44 So we haven't even talked about Django 4.2, but Django 5.0 is coming out soon.
42:48 And in there, so there's some really big ones.
42:50 There's database defaults.
42:51 So on a model field, you've always been able to declare a default value.
42:56 So if there isn't one, give it a date time field, give it now as a classic default.
43:01 But from 5.0, you'll be able to declare those as database defaults, which may not sound like
43:07 much.
43:07 But A, it's quicker.
43:08 It's moving work into the database.
43:09 But B, not every connection to your database goes via your Django application.
43:13 So you're able to have database level default.
43:15 And so if there is a script which isn't using the Django ORM, then you still get the value
43:20 of that.
43:20 And that ties in with work that's been done on constraints with database constraints have
43:25 been massively powered up.
43:26 And they'll even now, you know, your form generation will generate validators that are based on the
43:31 database constraints.
43:32 And it's just so much richness coming in.
43:35 I think, I really think we're also going to get database cascades in Django 5.0.
43:41 It's nearly ready.
43:42 There's a month or so before the feature freeze.
43:44 I think it's going to go in, in which case we're going to have DB defaults and DB level cascades,
43:48 both, you know, added to Django.
43:50 Both of those, it's a decade or more in the resolving in a new release.
43:55 And it's just, oh, wow, that's really exciting.
43:57 Yeah, for a lot of people, a lot of companies, the database is the source of truth for the
44:03 apps, right?
44:04 And like, sure, your code may talk to it, but what is in the database?
44:07 Like there are people whose job it is to defend the schema.
44:10 They call them DBAs, right?
44:12 So Django 4.2 added DB comments.
44:15 So you could add schema level comments to your model fields to explain the use of the model
44:20 field.
44:20 Again, it's for those scenarios.
44:21 Yeah.
44:22 For people who are serious about the databases, these features are just massively important.
44:26 Yeah, I think it's certainly worth considering that there will be other apps, there will be
44:31 other tools, and maybe even data science, right?
44:33 The data science angle is huge.
44:35 Often wants to now talk to the database.
44:37 And even if it's in Python, it's unlikely that in Jupyter, you're going to pull in your
44:42 ORM.
44:42 You're probably using some other data science oriented library to talk to that.
44:47 And so pushing those defaults down is valuable.
44:49 Well, so Michael, you're as situated as anyone to answer this.
44:51 Carlton and I are in the Django world, but how do we bridge the data science to web?
44:56 It doesn't need to be Django world.
44:57 Like what do they need to be on the web?
44:59 And if so, like what's holding them back?
45:01 Because it just feels like this mega, megaton star of data science and this tiny little web
45:06 thing.
45:06 But like, how do they share stuff?
45:07 How do they interact with it?
45:09 Yeah.
45:09 You've got your notebook and then you want to publish it somewhere, right?
45:11 Like, yeah.
45:12 Or just share it, share your information.
45:14 Or you have a database of COVID things.
45:17 For example, in the UK, you want to put online, but let people make change in some way or make
45:21 requests.
45:22 I mean, the data isn't generally static.
45:24 So I think there's two answers from my perspective.
45:26 I think there's, there are the frameworks that are doing that.
45:29 And that would be things like streamlit dash, not dashly, but the other dashboarding one.
45:35 There's panel, I'd say streamlit, probably start with that one, right?
45:39 So those kinds of things where you can get like kind of a simplified view that's kind
45:43 of an interactive thing.
45:44 You wouldn't look at it like we're looking at this Django site and go, yeah, it looks like,
45:48 it feels like this, right?
45:49 It doesn't feel like that.
45:50 It feels like you pushed a kind of a interactive generic UI up.
45:54 But I think that's a pretty good answer for a lot of people.
45:56 I think another is honestly, the stuff with HTMX, right?
46:01 You need a lot of interactivity in many of these things, these data screen screens and
46:06 like to get that interactivity often.
46:08 But you also need it to remember.
46:10 Yeah, yeah.
46:11 I mean, you need it to remember.
46:12 We computed this stuff and I want it to like get me the other info.
46:16 And you kind of need, just because how long it takes to do a lot of the computation, you
46:21 want a somewhat stateful type of behavior.
46:23 And I think HTMX with Plotly or something like that, even Matplotlib, I've done some
46:28 Matplotlib stuff and just like returned it as an image in different areas.
46:32 And yeah.
46:33 What do you, Carlton, what do you think?
46:34 Yeah, no, I'm nodding.
46:35 That's a good approach because, you know, you can quite easily put in a little loading
46:39 indicator there and it'll, when the HTML is ready and just, even if it took the same
46:44 amount of time by just putting in that little animation while it loads, it feels as if it's
46:48 responsive and doing something and it's, it's not rocket science, but.
46:51 A little HX dash indicator.
46:52 Yeah.
46:53 Yeah.
46:53 I was nodding particularly when you said just use Matplotlib and pull it in as an image.
46:58 It's like, yeah, that works.
46:58 That goes an awful long way doing that kind of thing.
47:00 I wasn't familiar with Streamlit.
47:01 That's really cool.
47:02 I mean, it makes sense.
47:03 I'm like, there's got to be someone, some people doing this, solving this problem.
47:06 But yeah, Streamlit is really, really interesting.
47:09 Basically you put deck, you have like a regular script that's not even a web thing and you put
47:14 decorators onto the functions and it says, oh, this parameter here is going to be a
47:19 combo box or something.
47:21 And it knows how to like wire the, it's some voodoo, but it's cool.
47:25 But it does look like a Streamlit app, right?
47:27 It doesn't look like, well, here's my own custom website.
47:30 It's like, well, here's my Streamlit app that I built for you.
47:32 Right.
47:32 So there's.
47:33 But I mean, and yet, you know, many people are using Tailwind now.
47:36 And so every site looks like a Tailwind site and before it was bootstrapped and before,
47:40 you know, so it's like, we can't get too high on our horse about it, you know, because
47:43 at the end of the day, it's like, it just needs to look modern-ish and like move on.
47:47 Yeah, absolutely.
47:48 Absolutely.
47:49 And getting something out is super important.
47:51 Okay.
47:51 So Django is, I would say it is the oldest popular Python web framework period, right?
47:58 There may have been ones before, but it certainly seems to be of the few that are like really,
48:03 really popular.
48:04 The one that's been around the longest.
48:06 What's amazing for me about it is the way the community kind of keeps refreshing itself.
48:11 Like it's not like the founders of Django are still merging every commit and every PR far
48:17 from it.
48:17 But, you know, I think Simon Willison made a commit in either 4.1 or 4.2.
48:21 I can't remember.
48:22 It was his first one for six years.
48:23 He doesn't even live in Lawrence anymore.
48:26 I mean, come on.
48:26 None of them do.
48:27 Exactly.
48:27 What right has he got?
48:28 But the point being is that it was set up deliberately to like hand it on and let it go.
48:34 And it's, I think Django is probably on its fourth or even fifth cohort of generation of kind of maintainers
48:39 now and yeah, that's a whole fresh batch of faces in the community who are doing new and exciting things.
48:45 And it's just so wonderful to see because you get old and long in the tooth and think, oh, I'm worried about the future of Django.
48:52 No, Django is doing great.
48:54 At DjangoCon, we talk about Django things.
48:57 And one of the things we don't necessarily describe to others is what makes Django different than other frameworks out there.
49:03 And it is the community.
49:05 You know, I mean, like Flask is an amazing resource and David Lord and people do great work, but there's no Flask cons.
49:12 There's no, it's its own thing.
49:14 But Django is relatively unique in that it has, it's a nonprofit.
49:18 It has fellows.
49:19 It has conferences.
49:20 It has this whole ecosystem, third-party packages.
49:22 You know, so there's the saying, you know, come for the framework, stay for the community.
49:26 It really is true, but you can't get that across to someone who just looks at the Django website, which looks like what it is, which it hasn't been redone in a number of years.
49:34 Right.
49:34 You think, oh, maybe it's a little bit of a stale, crusty Python thing.
49:37 It's like, no, it's alive.
49:38 There's changes every day.
49:40 You're just not seeing it.
49:41 And it's hard to, you're HTMX, right?
49:43 Like Carson does amazing work, but I think it's pretty much just him, right?
49:47 It's not this community of dozens and dozens of people.
49:50 And so one of the exciting things for Carlton and me is we're both transitioning away a little bit, but still helping bring in new people.
49:57 And that's healthy, right?
49:58 Like we know a bit, but sometimes I get, you know, I know the things that kind of I would like to change that may not change as quickly.
50:04 And then new people have great ideas and enthusiasm.
50:06 And it's like, yes, let me support you because I don't want to get stale with this.
50:10 Project Vaughn asks a pretty good question, which I think is a good question for any really large project that's been around a long time.
50:16 It's like, how do you get more involved with Django?
50:18 For someone who's not proficient in Django, like super, super proficient, given that it's a mature project, it's really hard to get that first PR written.
50:27 One thing that often comes up, oh, there's no ease, there's no low hanging fruit.
50:31 It's a mature framework.
50:32 There's nothing easy to do.
50:33 And it's like, well, yes and no.
50:34 Yes and no.
50:35 There are very few like nothing fixes, you know, that an absolute beginner can just come in and get, because they get snapped up really quickly and they just don't hang around for very long.
50:44 But we've got something like 800 open accepted tickets on Django.
50:48 Now of those 800 tickets, some of them are truly hard, like adding database defaults, which took a dozen years and five Django con sprints and, you know, who knows what to actually get over the line.
51:00 That's truly hard.
51:02 But most of the tickets aren't like that.
51:04 Most of the tickets are no harder than a problem that you're solving in your everyday Django or Python programming work.
51:10 And what they need is time and love.
51:13 And so Django cons, I've run Django cons sprints.
51:16 I've run a kind of getting contributed workshop.
51:17 And the goal of it, you've only got a couple of hours.
51:19 It's only like half a morning.
51:20 And the goal is not to necessarily get your PR in, but it's just to get you to look at a ticket in a bit of depth, get set up with a test suite, you know, install it, get set up.
51:29 But get involved in a ticket and come to understand that ticket and realize that actually after that, a couple of hours of thinking about that ticket, you are literally the world expert on that ticket.
51:39 And even though you're not like, oh, it's established.
51:41 I'm not a Django fellow.
51:43 I'm not an established contributor.
51:44 You, as the world expert on that ticket, you have a valid opinion and your insight will be valuable.
51:50 And yes, you have to dig around and you have to learn some source code.
51:54 But you'll have an idea and it's going to be on the right track.
51:57 And if you put the time and work and love in, you'll be able to resolve that ticket.
52:01 And once people have had that experience, then it's like, oh, I can do another one and I can do another one.
52:06 And it can become the little side hobby.
52:08 And actually then I'm a Django contributor.
52:10 So it's take your time, pick a ticket, really focus on it, become the world expert.
52:15 And in so doing, even if you don't resolve the ticket, you will learn an awful lot about Django.
52:20 You think you know Django by developing Django apps all day.
52:23 Well, you start digging around in the code, I'll guarantee you'll know it a lot better afterwards.
52:27 So that would be what I say is find a ticket that grabs you and just take that little bit of time to really understand it.
52:34 Yeah, that's great advice.
52:36 I guess there's probably sprints you could drop into at some conferences.
52:39 Yeah.
52:40 So after the Django cons, there's two days of sprints.
52:42 Stay around.
52:43 There's a really great opportunity to meet people who are contributing and to get into contributing and be able to sit in the same room as somebody and say, well, you know, how do I get started?
52:52 How, you know, that is a good, a good play.
52:54 But can I just sit there and look over your shoulder as you two work on this?
52:58 Yes.
52:58 Let me be.
52:59 That was the most recent Django con.
53:01 So there's Django con US, Django con Europe.
53:02 There's going to be a Django con Africa this year for the first time.
53:05 But the most recent Django con US, I was at a sprint talking with David Lord, who's the lead maintainer on Flask.
53:11 And he had a question about something or other.
53:13 And someone was like, oh, like Simon Wilson knows about that.
53:15 So I was like, oh, grab Simon over.
53:17 And they'd never met.
53:18 And now it's like, oh, like, so if you can stay for the sprints, it seems like the nothing part.
53:22 It's actually I'd almost take the sprints over the conference if you could, because it's literally just like anyone you want to talk to.
53:29 And you don't have to, you know, like, what are you working on?
53:32 Or, yeah, they're like the best part.
53:33 But maybe it seems intimidating, but it's really not.
53:36 And to Carlton's point, the community really is welcoming.
53:38 So even especially if you're inexperienced, if you're making an effort and people can see that they will be encouraging and want to loop you in.
53:46 There's also I should mention there's a new link program called Django Knot that's trying to pilot having some mentors to give this kind of hands on help a little bit.
53:55 That's a new program.
53:56 It's only, I think, six people right now, but there's they're trying to foster more mentoring of this type.
54:02 But it is a challenge for a mature framework, right?
54:04 You probably can't just go fix HTML.
54:06 It's probably a little more meaty, but it's not all hard just because it's there.
54:09 It's just that it got stuck for whatever reason.
54:11 It needs, as Carlton said, that of someone to come in and put a couple hours and then be the world expert.
54:16 Absolutely.
54:17 So what's the async story Django these days?
54:21 How's it looking?
54:21 It's looking really good.
54:23 Well, do we get to talk about 4.2?
54:25 Yes.
54:26 Django 4.2 brought in async support for streaming responses.
54:31 So within the core framework itself, you can do service and events or, you know, you can have a request come in.
54:37 You can keep it open without blocking the worker and you can periodically send messages down.
54:41 That's really quite exciting in 4.2.
54:43 And with the other thing that came in 4.2 was Psycho PG3, which allows async database connections.
54:51 And so there's a link in the show notes there of somebody put together exactly what I was hoping for, which was the chat, the chat example, but done 100% async.
55:01 So without blocking the blocking ORM call with the service and events, so instead of long polling or without having to use an add-on like channels, which, you know, add-on channels is great if you need it.
55:10 But isn't it cool that you can do service and events just in Django?
55:15 And then in 5.0, which is coming, we're going to have HTTP disconnect handling in, so those long-lived requests, if the client disconnects, you'll get an asyncio cancel there in your view and you'll be able to respond to it and do any cleanup.
55:27 We've also, in 5.0, we're going to have async signals, which gives you an 100% async request-response pathway if you want it, because before the only blocking bit there was the signals, which were synced.
55:39 So you still had to do this sync to async, jump into a thread pool to dispatch the signals.
55:45 But that, if you've got async signal handles, will all be async as well.
55:49 So the entire request-response flow can be async.
55:51 And then sessions is going to be async in 5.0 as well.
55:55 Auth is going to be async as well in 5.0.
55:59 So those kind of core flows are, this is on top of the async interface to the ORM, which was added.
56:05 You know, it's all fleshing out.
56:07 And there's a few decorators, which, you know, aren't yet done, but they'll be done over the next few releases.
56:12 It's really enriched.
56:14 And it's like, yes, yes, five, six years, seven years of work has gone into this.
56:19 And it's really maturing nicely.
56:21 So I think async in Django is a very, very exciting time.
56:24 So when people say, I want a FastAPI, right?
56:27 That's always the thing.
56:28 Well, why not just use FastAPI?
56:29 Well, no.
56:30 If you want to use FastAPI, go use FastAPI.
56:32 But if you're using Django, but you need a couple of these endpoints, which you need higher throughput or, you know, a real-time or two-directional traffic or whatever, you shouldn't have to switch red framework just to have a couple of these endpoints, right?
56:45 It's like Python needs to be in every area because you shouldn't have to switch language just because you need, I don't know what, to be a bit more serious about things.
56:53 So Python needs to be able to account for those more serious use cases.
56:56 Well, same with Django.
56:57 It needs an async story because you shouldn't have to change your web framework just for, you know, service center events or I don't know what other async, you know, a bit of real-time.
57:05 Almost nothing waits on other things like web frameworks do.
57:08 They wait on database calls.
57:10 They wait on the network.
57:12 They wait on caches, you know, like Redis.
57:15 They wait on maybe calling other APIs.
57:18 Like, almost everything they do is coordinating other systems and waiting and then turning that to HTML or JSON.
57:24 And so having rich async support is fantastic.
57:27 Yeah, no, I mean, it's really coming on.
57:28 And there are still, you know, there are bits inside, you know, I don't know if you need the, I don't know, user passage test, decorate, permissions decorator.
57:36 Is that yet async defy?
57:37 I'm not sure if it is.
57:38 But okay, that's not, we haven't got to, maybe we have, I need to check, but we haven't got to that bit yet.
57:43 But okay, those kind of bits, we'll get there with those.
57:46 But that kind of call, I'm building something on the request response cycle with auth, with sessions.
57:52 Yeah, that's all now done.
57:53 And so it's really maturing.
57:54 Getting short on time here, guys.
57:56 It's so nice to have you be in charge of this, I should say, right?
57:58 Because whenever there's those pauses, like my instinct is to jump in and like, look at our notes.
58:02 But like, just like, nope, you're captain of the ship.
58:05 It's so nice.
58:06 Yeah.
58:07 We're just out for a sunset cruise in the whole boat.
58:11 We're coming back to the harbor.
58:13 So what else about the future, right?
58:15 We talked about Django being 18, a lot of the cool ideas and projects and resources.
58:20 But what about the future, some of which we just covered is really exciting.
58:24 Maybe we haven't given time to yet.
58:27 I'm personally excited about the new people getting involved.
58:29 I know that's not as tangible for folks, but coming from Django Cons, coming, like I just stepped off the board as treasurer for three years.
58:37 I know who the new treasurer is, the current president.
58:41 Like, I'm really excited about the new people.
58:43 And so I don't, for a while during COVID, I think some of us had concerns about like, you know, how do we keep this afloat and not have everything crash and burn?
58:51 But I don't have those concerns anymore.
58:54 Yeah, yeah, yeah, yeah.
58:56 Just the fact that if you want something in Python that solves almost every web problem you have and has a really supportive community, Django is still there for you.
59:03 And so I guess that's the big one.
59:05 It's just, and I think from a marketing side, it's just how do we express that it's still cool and interesting and powerful and yet won't break on you.
59:13 It doesn't seem as shiny and new as the next whatever.
59:17 But it's, you know, it's like if you look on Hacker News every like six months, someone's like, wow, Django is like still around.
59:22 Oh, it's like kind of solves all these problems we have with this new JavaScript this or that.
59:26 And it's like, yeah, it's still just doing its thing.
59:29 So I would say the community side.
59:31 I mean, also like I've got projects.
59:33 If you want to learn Django, I mean, like, let me, there's a lot of resources to learn it.
59:37 There's a number, there's videos.
59:38 You have videos, books, tutorials, like some of these newer technologies.
59:42 It's harder.
59:43 There's not a community and it's harder to find the resources.
59:46 You know, there's a lot of strength in being around for a while and yet not being totally stale.
59:50 So that would be my tagline for Django.
59:52 How's that?
59:53 I kind of go off that.
59:54 I think actually it is cool.
59:56 And it's about as cool as it's been for a while.
59:58 I said in my DjangoCon Europe talk that I'm as excited about the framework and where it's going now as I have been for many years.
01:00:05 Since I said since the DRF Kickstarter, if you remember that back in the day.
01:00:09 There are over the last few releases, and I don't just mean 4.2 and 5.0 coming up.
01:00:14 I mean, like the last 3.2, 4.0, 4.1, like last few years, there've been a number of threads, not just the async stuff.
01:00:22 There's been massive changes to the forms, templating.
01:00:24 There's been all these changes to the ORM that are powering up every single release.
01:00:28 And they've all come together.
01:00:29 And there are patterns now to be discovered.
01:00:33 And it's like I said, I'm stepping down in part because of life, but in part to get back to working with Django rather than just on Django.
01:00:40 I want to play with all of these new toys that we've built over the last few releases.
01:00:45 And I want to discover those patterns and see them codified and see them come out in the community.
01:00:49 And it's just a massively fertile time.
01:00:52 And so that's what I'm excited about.
01:00:54 That's where we're going.
01:00:54 And I can't say every release Django literally gobsmacked by how many new features you think are there won't be any in the new one.
01:01:01 But 5.0 is coming out.
01:01:05 And it's just hitting you out of the park again.
01:01:07 And it's like, wow, we've only just had 4.2.
01:01:09 4.2 is not even old yet.
01:01:10 5.0 is not even in alpha.
01:01:13 And we're already thinking, oh, can we run it off main?
01:01:15 Because it's so exciting.
01:01:16 The future is so many things have come together.
01:01:18 And the future is just really exciting.
01:01:20 I feel like I would be bored by now with Django.
01:01:23 I've only been doing it for over a decade.
01:01:25 But if anything, there's just so many new features.
01:01:29 But also, I'm understanding built-in functionality even better to solve problems that I just didn't have before.
01:01:34 So at some point, maybe I'll be like, oh, I know it all.
01:01:37 But I feel the opposite.
01:01:38 I feel like, whoa, I had no idea.
01:01:40 Just one concrete example.
01:01:41 Doing all the work with templates and HTMLX.
01:01:44 And coming to see the patterns about creating, again, fresh for the first time and really using templates for the first time in half a decade.
01:01:51 It's like, okay, ah, yes, I create a template tag here.
01:01:55 And I do it this way.
01:01:55 And I put a mapper in here to create a kind of view model type thing.
01:01:59 So I pass in an ORM model object into the template tag.
01:02:01 And then in the template tag, I map it to what I need in the actual template itself.
01:02:05 Then the template comes in.
01:02:06 It's like, oh, that's a really good and powerful pattern.
01:02:09 And it's really encapsulated and neat.
01:02:12 And it makes my template expressive.
01:02:14 And oh, rediscovering these things.
01:02:17 And then being able to say, right, okay, well, what changes does the Django template language need that it hasn't had in quite a few years because no one was using it?
01:02:24 And yeah, it's just a massively fertile time.
01:02:27 It is.
01:02:27 And it's no coincidence that we've been hitting on HTMLX so much because it really puts the power of frameworks like Django back front and center in how you think about building and structuring your web apps.
01:02:41 It's not like, well, there's this thing in the backend and then we're going to go do these other languages.
01:02:44 It's like, you know, actually it could be all.
01:02:46 And there's a bunch of cool features and capabilities that we've been talking about.
01:02:49 And you can use them throughout your app if you leverage something like, not necessarily, but something like HTMLX, which is really cool, I think.
01:02:57 For me, it works just with the grain of the framework.
01:02:59 It's like, this is the way I would do it if I was writing in 2005.
01:03:03 And I do it exactly the same in 2023.
01:03:06 And it just works.
01:03:09 And it's, you know, responsive and dynamic and all these nice things that, you know, clients want.
01:03:15 Absolutely.
01:03:15 All right.
01:03:16 Let's leave it there, guys.
01:03:17 Thank you so much for covering all this and celebrating Django's 18th birthday.
01:03:23 18th birthday, yeah.
01:03:24 Yeah, it's awesome.
01:03:26 It is an adult and it's a cool framework for sure.
01:03:29 With really, I think it's the community behind it, especially the fellows and all the board and stuff.
01:03:36 It makes it really unique and is certainly worth considering as part of the framework, right?
01:03:40 As you said.
01:03:41 Okay.
01:03:41 With that, let's round this out with just a final shout out to what you guys have around Django.
01:03:48 For example, the Django chat podcast, right?
01:03:51 Which is excellent.
01:03:52 Give us a shout about that.
01:03:53 You know, Will, tell us about Learn Django and maybe Button.dev or whatever else you want to throw in.
01:03:58 I should say Django chat.com.
01:04:00 You're sort of the godfather of it because you gave me a lot of good advice when we were starting out in the early days around things and that there might be a market for it.
01:04:07 So thank you for that.
01:04:08 You're welcome.
01:04:09 It's going strong.
01:04:10 It's a great show.
01:04:11 I enjoy listening to the episodes.
01:04:12 We're going to be back in the fall with new episodes.
01:04:14 And then learnjango.com.
01:04:15 That's my main website.
01:04:16 If you want to learn Django, access books, lots of free tutorials, premium ones coming.
01:04:21 That's sort of an all-in-one resource.
01:04:23 And I think there's also a link to Django-news, which is a weekly Django newsletter with new news that's happening, new projects, new tutorials, not just mine.
01:04:32 So that's something I've been doing with Jeff Triplett for a number of years now.
01:04:35 And that's a good way to stay in tune with what's happening.
01:04:38 Yeah, that's kind of an essential resource, I'd say.
01:04:40 And then Button, Carlton.
01:04:41 Yeah, so okay.
01:04:42 So I've got a website and I've got a blog somewhere.
01:04:46 So button, btn.dev, that'll be live in the autumn now.
01:04:50 But you can follow me on Fosadon or the Fediverse.
01:04:54 And on my website, there's an RSS feed, which you could subscribe to if you fancy that.
01:04:58 My other big projects at the moment is working on a set of opinionated CRUD views for Django called Neapolitan, which is a bit of fun.
01:05:06 I'm having a lot of fun with that.
01:05:08 So watch my DjangoCon Europe talk for an introduction of that.
01:05:10 And then I'm working on a package called DjangoTemplatePartials as well, which is about getting template fragments into the DjangoTemplate language, which again...
01:05:18 I was going to ask you about that.
01:05:19 I know.
01:05:20 Now that he's not a fellow, he can do all the things he always wanted to.
01:05:23 Yeah, when I started using this with...
01:05:25 Oh, yes.
01:05:26 And I'm like, man, you have got to come up with a way to reuse HTML almost like functions.
01:05:34 So I came up with JinjaPartials.
01:05:35 So what is yours called?
01:05:37 DjangoTemplatePartials.
01:05:38 TemplatePartials.
01:05:39 DjangoTemplatePartials.
01:05:39 Oh, oh.
01:05:40 You need a spacer.
01:05:41 I think I put a link in the notes.
01:05:43 But yeah.
01:05:44 Yeah, there you are.
01:05:45 There you are.
01:05:45 So that's my take.
01:05:47 And it just enables you to define reusable components.
01:05:50 There's a couple of pull requests open, which will just change the API there slightly.
01:05:54 And then we'll start to think about rolling into Django.
01:05:57 Hopefully for now, it's going to be Django 5.1.
01:06:00 There's no chance of me getting in for 5.0 this summer.
01:06:02 But it's the same idea.
01:06:04 And the point with it is it's integrated with the Django template loader.
01:06:08 So all you do in your view is change your template name variable.
01:06:12 And you still return your template response, same as you always had with the context.
01:06:16 There's no adjusting your view logic.
01:06:18 It's almost transparent to the view layer.
01:06:20 And there are, you know, I've seen people writing logic where they pass the HX vowels, which is where you pass extra parameters in your request from the client, which you could then specify the partial with.
01:06:31 And then your view logic wouldn't change at all.
01:06:33 That's out of scope for Django template partials.
01:06:35 But it's a possibility.
01:06:37 But the point being that you just, it's this for me or something like it is how Django wants you to do partials with the Django template language.
01:06:45 Obviously with Jinja, there's an option as well with Django.
01:06:49 Useful outside of HTMLX required for HTMLX, basically, right?
01:06:52 Yeah.
01:06:53 I mean, because what's the other way?
01:06:54 The problem with it is you then have, if you don't have inline partials, you have to move it to a separate template.
01:07:00 And then you have to include that template in the other template.
01:07:03 And that's great at a certain level of complexity.
01:07:05 But again, it's this locality behavior thing.
01:07:08 When you're first starting, you don't want that heavy weight kind of in your creative flow.
01:07:12 You're making progress.
01:07:14 And all of a sudden, you have to put the brakes on to create a new file, move it open.
01:07:17 What's the file name again?
01:07:19 Oh, I've spelled it wrong.
01:07:20 Oh, it didn't load.
01:07:21 Oh, because it was in the wrong file.
01:07:23 You don't want all of that.
01:07:24 You just want inline that bit.
01:07:26 Be reusable, please.
01:07:27 Yeah, very cool.
01:07:28 Yeah, this is different.
01:07:29 Mine doesn't embrace the locality behavior as much as yours does.
01:07:32 So people should check this out.
01:07:33 This is interesting.
01:07:34 Obviously, mine doesn't work with Django either.
01:07:36 So it doesn't really matter.
01:07:37 Well, it works with Jinja, though, right?
01:07:38 It works with Jinja, right?
01:07:40 Yeah, yeah, yeah.
01:07:40 Right.
01:07:41 So the Django templates have swappable backends.
01:07:45 So you can use the Jinja backend to use Jinja templates with Django if that's your cup of tea.
01:07:49 We got to end this podcast.
01:07:50 But if you're looking at moving a Flask project over to Django, that would be a way to not touch
01:07:57 the HTML very much, right?
01:07:58 Yes, exactly.
01:07:59 Because you could carry on using your same templates more.
01:08:01 You might need one or two edits to the, what's it called?
01:08:04 The Django environment, the Jinja environment or something to, I don't know.
01:08:08 Thank you guys for being on the show.
01:08:09 It's always a great time to catch up with you.
01:08:12 Yeah, thank you for having us.
01:08:14 This has been another episode of Talk Python to Me.
01:08:17 Thank you to our sponsors.
01:08:19 Be sure to check out what they're offering.
01:08:20 It really helps support the show.
01:08:22 Take some stress out of your life.
01:08:24 Get notified immediately about errors and performance issues in your web or mobile applications with
01:08:29 Sentry.
01:08:30 Just visit talkpython.fm/sentry and get started for free.
01:08:35 And be sure to use the promo code talkpython, all one word.
01:08:38 Want to level up your Python?
01:08:40 We have one of the largest catalogs of Python video courses over at Talk Python.
01:08:44 Our content ranges from true beginners to deeply advanced topics like memory and async.
01:08:49 And best of all, there's not a subscription in sight.
01:08:52 Check it out for yourself at training.talkpython.fm.
01:08:55 Be sure to subscribe to the show, open your favorite podcast app, and search for Python.
01:08:59 We should be right at the top.
01:09:01 You can also find the iTunes feed at /itunes, the Google Play feed at /play,
01:09:06 and the direct RSS feed at /rss on talkpython.fm.
01:09:10 We're live streaming most of our recordings these days.
01:09:13 If you want to be part of the show and have your comments featured on the air,
01:09:17 be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
01:09:21 This is your host, Michael Kennedy.
01:09:23 Thanks so much for listening.
01:09:25 I really appreciate it.
01:09:26 Now get out there and write some Python code.
01:09:28 You You You You You You You You You Thank you.
01:09:48 Thank you.