Django Chat

Improving Django - Adam Hill

Episode Summary

Adam is the co-host of the Django Brew podcast and prolific contributor to the Django ecosystem with author of a multitude of Django projects including django-unicorn, coltrane, dj-angles, and many more.

Episode Notes

🔗 Links

📦 Projects

📚 Books

🎥 YouTube

Sponsor

This episode was brought to you by Buttondown, the easiest way to start, send, and grow your email newsletter. New customers can save 50% off their first year with Buttondown using the coupon code DJANGO.

Episode Transcription

Carlton (00:00)
Hi, welcome to another episode of Django chat podcast on the Django web framework, still a web framework. I'm Carlton Gibson joined us by Will Vincent Hello Will. Hello Will. Today with us we've got Adam Hill. We're really excited to have you on. Thanks for coming on.

Will (00:08)
Hey Carlton.

Adam (00:14)
Thanks for inviting me.

Will (00:15)
So we were just talking ⁓ offline about your podcast, Django brew. How's that going?

Adam (00:21)
it's going great. So this started after the Django con in Durham. So my friend Sangita and I went to it and I was just like, Hey, we should, we should start this podcast and talk about Django cause there aren't enough of them floating around. so, ⁓ it turns out that scheduling and actually making time to do it is challenging and then editing afterwards is also, ⁓ time consuming, but.

We have put out a couple of them and ⁓ they're really fun to do. I don't know if anyone listens to them. That's not really the point. The point is just to chat. Okay, great.

Will (00:54)
I listen to him.

Carlton (00:58)
I'm always impressed with your production value as well. You have things like sample code that goes with the episode. And I'm like, well, sample code with the episode, that's a step up.

Adam (01:07)
Yeah, we try to, we try to edit them. ⁓ you know, we have bloopers at the end, which is honestly my favorite part, cause it just shows how silly we are and how bad we are at this. But, ⁓ yeah, it's been pretty fun. But, ⁓ the other day I was asking on Macedon, if anyone knew how to make the editing a little bit cleaner and easier. And actually I think Will, you and a couple other people chimed in about, ⁓ Auphonic I think is how you pronounce it. And it's sort of like a.

AI way to get rid of all the filler words that I am very prone to say like ums and ahs and things like that.

Will (01:44)
Same.

We had the creator on back in, God, 2020, 2019. ⁓ So we've been using it from the beginning and it's still, he's still working on it and it's still great. And I still am like, do I still need to pay for this? Cause there's tools built into Riverside and other things, but it's still better. ⁓

Adam (01:50)

Carlton (02:04)
It's

almost like pre-AI AI. ⁓

Will (02:07)
Yeah, yeah, yeah, because it wasn't. Yeah, yeah, he's yeah, it's real. You can you can tell, right? I mean, it's it's better. It's better.

Adam (02:07)
Yeah, it's a real, real AI.

Yeah, yeah, it works.

It works great. ⁓ we also use Riverside and we were trying to use their editing and it was pretty janky. It didn't work as well as I wanted it to. And so, ⁓ but this alphonic thing works great. So.

Will (02:20)
Mm-hmm.

Yeah,

we, God, I'm just pulling it up. Yeah, June, 2019, episode 18. Carlton, you remember that seven years ago?

Carlton (02:36)
remembered the recording but like seven years ago, my word. ⁓

Will (02:39)
Well, and I can say now,

⁓ I remember the recording because he actually had a bad microphone. It was like the one time we were like, okay, if anyone just like don't give a whole speech and for whatever reason, it was slightly off. mean, not that he doesn't know audio, but I remember having a sense of like, ⁓ I was slipping there and I had to do a lot of.

Carlton (02:46)
Yeah, yeah.

Adam (02:47)
Hahaha

Carlton (02:58)
Yeah, you normally expect an

audio geek to turn up with like, you know, decent kit, but no.

Will (03:02)
Yeah. Yeah. Probably now it would handle it, but I had to do a bunch of, I was doing a bunch of EQ stuff anyways. Yeah. It's, great to see the podcast. I mean, I'm curious how your journey will go. Cause like when, when we started off doing this, was trying to make it like NPR here in the U S and make it just perfect. And then you just slowly kind of let go of things. And, actually Michael Kennedy of talk Python, he was great at telling me just where that line is. And know, you still need to have a high enough quality. It's not distracting, but if people

People just want to hear what you have to say in a non-distracting way. And if, and they want to have another episode, not have you spend 20 hours on an episode and then burn out from that.

Adam (03:41)
Yeah, that makes sense. Yeah, the consistency I think is the hard part. Cause I have a lot of stuff going on, which I will probably cover some of those things, but ⁓ you know, making time to do it. And I think the podcast that I listen to the most are on a weekly cadence, ⁓ but I just can't do that. that's just, that's really hard to do. So.

Will (04:07)
It's, better not to burn out. And I would say too, like I, when we switched to Riverside this fall, I thought I hoped that, we'll just do everything there and it'll be more efficient. And I think I put out one episode like that. And then my wife was like, it sounds different, the audio version. Cause it didn't sound as good. Cause I didn't run it through a phonic. didn't do all the tightening I do in garage bands. So I still do both now, which I think is worth it. Sorry, Carlton, you were going to say something there.

Carlton (04:31)
going to step

in just the high level is there is there's a lesson in that conversation for any project that you have going be it a podcast, be it a blog, be it an open source project, whatever you have to do it in a way that is sustainable. And you know, can be the same if you've got an Instagram account, you know, you see people putting so much effort into a 30 second video, it's like, Can you really do that? Or can you do something that might not be as high production value, but is you and is sustainable because

In the end, it's no fun if you're killing yourself to try and produce something that's against professional production teams when you're one person, one or two person back.

Adam (05:12)
Yeah, this makes me think about Django Unicorn, which I spent, well, I started in 2020. I just looked back and I was like, oh my gosh, it's so long ago. But so basically it is a interactive component library for Django. So you can make things that kind of interact and you don't have to write JavaScript. And it started with just like a simple idea. And then, I consistently

Will (05:23)
Yeah.

Adam (05:40)
made changes to it and made it better. But at some point, probably a couple of years ago, I kind of burned out on it because it wasn't like a sustainable thing that I was, I was doing. And it got popular enough that, ⁓ people were using it in production and then were upset when there were bugs. And I was like, well, I got, you know, a life and a job and stuff. so I think that really rings true, which you're talking about Carlton for the.

for the open source maintainers, just being able to ⁓ have something that you can just be consistent with and not burn out on it. It's really tricky, I think.

Carlton (06:22)
Well, you've mentioned it. So I mean, you've got a million projects and let's talk about some of them. But like Django Unicorn is probably your sort of biggest and one to tell us about it. And, know, where's it at the moment? Because I've seen recent activity.

Adam (06:36)
You know, like I said, I sort of took a little bit of a break there and I put out a call for a maintainer. So trying to get some help and, ⁓ I also started the process to get it moved into Django Commons, which is sort of like a community organization that kind of helps with Django libraries. Because I was kind of

I was getting frustrated, I would say, of just like all the bug reports and just feeling responsible for this thing that, you know, I put out a lot of stuff and mostly I'm just prototyping and trying things out. I just want to see how it goes. And this kind of took a life, ⁓ took a, ⁓ took on a life of its own. But ⁓ there's someone from Django not space, Yohanan.

And he reached out and said that he would help me maintain it. And so now there's a lot more activity we got. ⁓ he has a roadmap for, ⁓ 1.0, which I'm really excited about. And he's squashing a lot of bugs. So I think one of the lessons in here for me around just being able to maintain these big projects is having other people help out and not feeling like it's just on me to do everything. So.

I don't know if you felt like that with Django template partials, Carlton or, or anything.

Carlton (08:03)
Not so much with template partials because it was a very small package and it had a fixed scope. we said on the last episode when Faham was on that there's no way that I could have, ⁓ I know there was no way because I started the project several times, would have done the work to get it into Django without the Google Summer Pro project. So I did need him for that sense. But with other projects, I've worked on ⁓

know, channels I've tried over the years to bring people on. I've had people come on and they've stayed for a while then disappeared. And that's something that is like, I really like it. We have got an active community around it, but it's not quite how I want Django filter. I've looked after that myself for many years because it's just the right size for me. It needs very little updates and whatnot, but rest framework. really felt that, you know, it was kind of stuck and now that's moving into Django commons as well for similar reasons. think the bottom line is you've got your project. Are you really going to be maintaining it by yourself in 20 years time?

No, you're not. So you're not going to be answering every issue. You're not going to be interested in merging the pull requests. So you need to at least have some idea of, well, can I be open to new contributors? And I think Chang'anaut space is just phenomenal for that because it's bringing youngsters into the community and like getting over those first few steps, which are really hard. It's really intimidating. You know, if you turn up with zero experience and to a repo, well,

you're going to struggle to get the mentorship you need there because the maintainer probably doesn't have the time to take you under their wing.

Will (09:31)
Same for, I'll just shout out to the Django News newsletter that Jeff Triplett and I do. We have generally people from Django Not Space who come in and do the updates to Django where they list, it's usually double digit and ⁓ I'm so thankful that people do that. But I think it's also a great entry way. It's easier than some other tasks you can do. You can contribute to Django, you can get experience. so, I mean, that section would not exist without Django Not Space and the people who manage it and do it.

It's another great thing.

Adam (10:03)
Well, one thing about that that I really enjoy when I read that newsletter is it shows how much is happening in Django and what new things are happening because

Will (10:10)
Yeah, I'm always like, there's

nothing, nothing's happening. And then it's like eight articles and we're like moving some of the next week. Like it's crazy. Yeah.

Adam (10:17)
Well, and all the PRs that get, you know, merged in and everything. It's like, think that is one thing that we, as the Django community have maybe not done as good a job as I would like is sort of showing all the activity and making sure that people know that Django is evolving and is ⁓ continuing to push forward. So I really, I really love that.

Will (10:19)
Yeah, right.

Carlton (10:42)
So you mentioned that one of the topics I wanted to pick your ear on there is like, cause I think Django is quite dynamic, but that's because I'm very close to the co-base and I see all the changes that get loaded in every release. I literally every major release, I'm like, wow, that's another absolutely amazing release. But there's also a lot of frustration or felt or perceived frustration or whatever about Django moving too slowly or I don't know what, what are your thoughts in there? Because what can we do? And I don't know.

I know you've got half ideas at least.

Adam (11:15)
⁓ yeah, I mean, think part of the, have you ever been on Reddit Carlton? Because if you go to Reddit, but yeah, don't go there.

Carlton (11:20)
No, I never go already. I never go already.

Will (11:22)
Yeah,

Carlton (11:23)
I mean...

Will (11:23)
come on, he's familiar with it. He won't cop to it.

Carlton (11:26)
My children go on Reddit and I'm just like, they're like, it's the only source of truth. I'm like, it's not a source of truth.

Adam (11:28)
You

Will (11:32)
I'm turning into your kids now. You know, they take it down. You know, I was just, yeah. Sorry. Go ahead.

Adam (11:37)
⁓ that was a joke, but yeah, I mean, I think, I think it's hard because when you're inside the project, you do see everything that is happening. but we, think historically haven't done a great job of marketing all those things. And so, you know, I think if you look at the homepage, ⁓ it's not always clear, like when the new releases are now it's on the sidebar. ⁓

or like what the actual features are of Django or let's say Django tasks now got introduced in 6.0. Like that should, in my opinion, be a lot of fanfare around that. And just like, are the new features. These are the things that are getting pushed forward with Django. I know there's a social media working group. They're doing a good job of pushing some of that. ⁓ But there are other things that I would expect, I think.

⁓ from a, from a major web framework, like a, like an email list where we announced new things. know this is sort of like a bugaboo. like, yeah. ⁓ so I know that a lot of this has already been talked about a lot and, and it hasn't happened for, reasons. that's fine. I'm just bringing up, but you know, I do think it would be beneficial for Django going forward.

Will (12:44)
I'm like a quiet, quiet, quiet death over here. Keep going. Yeah.

I think we should say it. mean, I'll give a shout out Sarah Boyce, a Django fellow. She's giving a talk at this, ⁓ pie charm TV unplugged day in about a month that you're going to be at Carlton. And her talk is titled Django has a marketing problem. So we'll do our best to promote that. Can we, can we show the, you mentioned the homepage, you've done some work on this. Can we, can we talk about that URL link? Is that okay? I can share it for people. All right. So I'm going to.

Adam (13:26)
Yeah, yeah, sure. Yeah, you can put

it in the show notes.

Will (13:30)
Well, I can do better than that. ⁓ Yes, watch this, watch this. Sorry, audio people. But Adam did all this work on this interactive, we'll put the link in homepage that looks, I mean, just look at it. Like, my God, it's more than okay. It has everything we want. it's, you know, and I think, you know, why don't things happen, you know, partly.

Carlton (13:32)
Can you get it on screen? ⁓ wow, that's amazing.

Adam (13:47)
OK.

Will (13:58)
We have volunteers, right? We have, we have a new board. We have new people there. Like, I mean, Jeff Triplett is the new president. He's doing tons of stuff. I think we just have a capacity problem. So we all agree. Or mostly agree on what should be done. And then it's like, okay, and who's going to do it. ⁓ so.

Adam (14:14)
Yeah, I mean, I think we talked about this on the last podcast episode that I was on, which I don't remember when that was, but, ⁓ you know, I think the Django community is great and I love that it's all volunteer and it feels very egalitarian. I do think it makes it hard to push big, ⁓ big features forward or big new ideas forward because it's...

A lot of people have opinions about things and it just, think it's a little challenging.

Will (14:47)
I think there's also an ownership thing I would say. mean, right code, yeah, I'd code in. There's always a question of how big or small to make core. You know, if you update the website, okay, well then you're going to be there for a little bit, but then it's someone else's or the community's problem eventually. So I think people who are in positions of authority are very aware of the costs of changing anything. And I think that, and I speak for myself too, it can make you a little bit gun shy to, that's probably the wrong metaphor, but you know, a little bit reticent to, ⁓

to do things because you're also immediately thinking of what's the parachute of obligations coming with any change? But maybe JangoCon Europe, we can get people to swap the link for this homepage and put it up for a week and see what people think.

Adam (15:30)
So

Carlton (15:32)
Maybe.

Adam (15:33)
the only thing I would say is like the homepage is just my, you know, my first attempt of like, I think these are the things that should be on there. I, there probably should be some, you know, back and forth with people who are interested and who have opinions about like, ⁓ this should be different or we shouldn't change the top nav because like that was too hard. ⁓ so I don't, I don't think that I have a hundred percent like the

Will (15:41)
Yeah.

Adam (16:00)
perfect solution for these things. just, ⁓ I made a Django forum post and I was like, hey, does anyone want to work on this? And there was a lot of conversation in there and not a lot of actual like, okay, and this is what we're going to do. And my personality is wired to just like do things and then see what happens. And so that was my like, okay, I'm just going to make this thing.

and then see if there's a reaction and see what we can do going forward.

Carlton (16:34)
It's the same on the code side, right? It's like we've been talking about getting content negotiation into the request object for a decade. We've been talking about updating the homepage for a decade. It's just really hard to do because Django is a slow-moving beast. And on the code side, it's why I'm so militant about just throwing it a third-party package, because you can create something, you can show it up, you can see if there's a reaction. Whereas if you're like, no, this has to go straight into court, the chances of it happening are, you know...

minuscule because there's just so many barriers, there's so much inertia. Whereas if you put it in a third party package, there is a chance that it can get adapted, know, as Django tasks or template partial shows.

Adam (17:10)
Yeah. Well, the other thing I wanted to shout out was the Django new features project board on GitHub, I think is a ⁓ great new addition to sort of surface these things. Cause I think a lot of people have ideas about what should be added to Django and what shouldn't be. And this is sort of like putting it to the marketplace, so to speak of just like, are there people who are interested in this? Are there people who want to sponsor it going forward? And so I really love that.

Carlton (17:18)
Yeah.

Well that's good because I mean from a steering council perspective we didn't know it was an experiment. We were like we had a problem, we got a problem that you know people would go to track with new feature ideas and it all get closed as won't fix and that was not good, that wasn't any good for the fellows and it wasn't any good for the people proposing it. And so you know we came up with this idea collectively and we refined it and you know lot of work went in on that and it's nice to hear you know that you think it's going well.

Will (18:07)
Here it is, we'll put a link to it, it's, yeah, Django.

Carlton (18:10)
Cool, the arguments

we had over that mermaid diagram, I'll tell you. The flow chart. ⁓

Adam (18:15)
Ha

Will (18:16)
flowchart I just flitted

by in half a second. You also have this Django API frameworks repo that's relatively new. Can you talk about that?

Adam (18:30)
yeah, sure. So there was a keynote at the last Django Con in Chicago from Zags, think about, ⁓ adding, well, it was around like all the, all the use cases of Django. So you can have Django as a cron, you know, management task runner. You can have it as a website. You can have it as an API at the end. There were some proposals of like.

We should make a rest API more inside of core. So the thing that comes up a lot is like, why don't we just merge DRF into Django, which I have opinions about, but it's neither here nor there, but it made me wonder about all the ways, all the different API frameworks for Django, because I knew of three at the time. And so I went it away to basically see how they all worked and, ⁓

I have benchmarks in there. I don't know if the benchmarks are super useful. I will say I was a little offended ⁓ in the podcast with Farhan when you were talking about, benchmarks are only for beginner developers. I think they might be beneficial for everybody, but that's okay. ⁓

Carlton (19:46)
You gotta have them, but they're also useless at the same time, right?

Adam (19:51)
Yeah, I think the problem is that they are a nice thing to point to for people. And so I think it kind of comes back to my marketing conversation from before. It's it's really good marketing if you can say like, we're the fastest ⁓ framework. And if you have, if there's nuance to that, it becomes harder to convince people to use Django.

⁓ I'm not saying we have to be the fastest. I'm just saying like, it would be great if we were, because that is a way to market Django to other people.

Carlton (20:24)
We don't have

to be fastest as well. We just need to be not load slower. what I liked about the recent work, what I've really, okay, so I've got a project that I've sort of ⁓ got in a Google Doc. I've got a project that's in a Google Doc, which I'm like, okay, let's call it the Fast Django project, where I was lining up to do exactly these kinds of benchmarks that I've seen Adam doing, that I've seen Farhan doing, that I've seen Andros doing, Andros is the...

Adam (20:28)
Mm-hmm. Yeah.

Will (20:29)
come on Carlton, come on. What was the recommend-

I gave Carlton advice on naming for this.

Carlton (20:52)
creator of Django Live View. He's been doing these kind of benchmarks as well. And I was like, wow, that's amazing. Because there's other people doing the benchmarks. I don't have to. was my main things I got. know, am I going to get to it? Not till later in the year, right? I'm just not going to get to this at all. But so to see other people doing it, but then to see like Farhan in particular, he still has started it. picked up Django, was it he picked up message spec and just created some serializers around message spec. And just by doing that,

Adam (21:02)
Yeah

Carlton (21:22)
We were able, he was able to show that Django will run as fast or in same ballpark as fast API or all the other frameworks without making any other changes. Right? And it's like, we don't necessarily have to be the fastest, but we have to be not load slower. the big, yeah. And the big problem with using the last generation serializers is that we're always going to come out load slower because for every time they create, they do field lookups and it's just not, you know, that's just not how modern approaches work.

Adam (21:37)
Yeah, we just need to be close.

Carlton (21:52)
So anyway, I'm really excited to see all these benchmarks. I'm really excited. I was surprised when you jumped in Adam, because I think of you as a front end kind of person. And then this is more back end, right?

Adam (22:03)
Yeah, this is, ⁓ I thought that was interesting that you mentioned that I don't think of myself as a front end person at all. I do think of myself as sort of like a developer experience sort of person. Like I just want like a good developer experience, which I think Django has in some places. And then there are like paper cuts all over, ⁓ in other places. So I mostly try to think about like, how can we smooth out the first person who is

starting Django or the person who like creates a lot of Django apps. Like I make a lot of Django apps and I copy and paste the same thing everywhere. I'm like, this probably, there's probably a better way to do this.

Carlton (22:47)
Yeah, no, fair enough. Why do I say you're front end person? Because, well, yeah, let's drop angles in at the end of this so Adam can spin off on it. But like you've got your unsuck CSS site, your unsuck JS site, you've got Django Unicorn, you've got, then Django, DJJangles. Tell us about that one.

Will (22:50)
Angles? Can we talk about angles?

Adam (22:59)
yeah.

Yeah, so DJ angles or jangles, I guess. ⁓

Carlton (23:13)
It rhymes with spangles if you say jangles.

Adam (23:14)
Yeah, I like that.

And you can do a little sparkle hands after it. It was, I was looking at Django Cotton and they have, so that's another component framework on top of Django. And they had added a nice like HTML. It looks like an HTML element. It's like C dash and then whatever your component name is.

And I looked at that and I was like, that's interesting. Like, I wonder how they, they did that. And it's basically, ⁓ a template loader that looks at HTML and then converts that to a, template tag, a regular Django template tag. So you don't have your, your curly and then the percent, ⁓ Django, you know, normal Django syntax. And as what happens when I look at

things and my brain starts firing. I was like, ⁓ like, I wonder if we could just do that for everything, for every Django template tag. And so that's sort of how it started. I was like, well, it can be, you know, bracket DJ dash and then include, and then whatever the name of your include is. And so I started with all the, the Django template tags, the built-in ones. And if you look at it, it looks just like HTML syntax, like you.

It doesn't look like Django Temple language at all, which I think is kind of nice. It gives you your syntax highlighting and everything. just, everything kind of works. You don't have like indent and ⁓ de-dent problems like because it, you know, normally it doesn't know where things are.

So I started with that and then I have some integrations for most of the component libraries like Django components and Django bird and Django template partials and then the new Django template partials for 6.0. ⁓ So you can use those as you want to. And then there's like a smattering of other things inside that library, just everything that's basically template focused. ⁓

ways to call code without making ⁓ a temporary or like a smaller template tag. And I did something around ⁓ date filters because in the Django template tag for date is uses like a weird syntax. It's not like the Python ⁓ syntax. And I understand why, but it still is bothersome to me. So like I made something for that. So.

Will (25:48)
Yeah. Yeah.

Adam (25:55)
Yeah, it's sort of like a, it's a grab bag of a bunch of stuff, but it's all all around templates.

Carlton (26:01)
I'm with that date filter syntax. never mind it because I could never remember either of them. So I had to look them up either way. it's like, okay, I'm looking it up. doesn't matter which it is.

Adam (26:07)
Ha ha!

I mean same, but I still want it to be the Python one.

Carlton (26:17)
Yeah,

fair enough, fair enough. okay, you've given, so with the whole, that whole Django thing, like what are your kind of, what does Django need in the front end? Cause another part of that keynote that you mentioned from DjangoCon US was that Django needs a better front end story. Do we need to tie ourselves to view or react or?

Adam (26:41)
I mean, ⁓

I would say no. I think this is where community kind of can step in and help shape those questions. I think I've listened to you long enough or both of you long enough to be like, I don't think we should, you know, hire ourselves to react or view or Angular or some other, you know, framework. That seems like a bad idea. I do think probably we need

Carlton (27:03)
whatever this week is.

Adam (27:10)
a way to inside of core call out to other libraries. The way I was thinking about it the other day was, there's database backends, right? So core doesn't need to support, I mean, I know it has like Postgres and SQLite and things like that, but you can have a database backend that is a third party library and it calls out to that and that's what it uses.

there's an API inside of Django that says like, this is how you deal with front end ⁓ projects or front end frameworks. And then it calls out to those things. So I use Django compressor a lot. It's kind of like the filters, I think ⁓ idea, but ⁓ I don't know if there's any, any appetite for having something like.

Will (27:49)
That's interesting,

Adam (28:03)
Django compressor, I know there's Django pipeline. There's a couple sort of like asset management things. So core functionality seems useful, but like time does something specific doesn't to me.

Carlton (28:15)
So

I mean, compressor is a good example because I've been using compressor forever, like literally forever. And I've used it with jQuery. I've used it with Backbone. I've used it with Ember. I've used it with React. I've used it with Webpack, with VEAT. I've used it with Elm. I've used run Tailwind through it. The list goes on. the trick is it's got this lovely pre-processing setting where you can just add your media type for.

whatever, X tailwind, and then you can give it a command that it runs when it finds that to run the tailwind backend or whatever it is, the webpack constructor you've got going on. And that turns out to be really, really, really lightweight and really, flexible. And it's not that Django Compressor has to have support for React or support for webpack or support for Elm or support. It's just that you basically shell out to the tools. And that lovely...

ability to just define how you shell out in a very lightweight way has meant that it's been sustainable for me for a long, time. Now, JAN compressor needs to handle imports and import maps and all these newfangled things that we, ES modules that are now very commonplace that JAN compressor still doesn't handle. But given that need for modernization, it's come an awful long way with a very light...

API. So surely we can do similar.

Adam (29:43)
Yeah. Yeah. I think the other thing around this same topic is, uh, white noise and having something in Django core, which it doesn't need to solve all the things that white noise solves, but there's probably a, there's, you know, uh, an 80 % that Django could probably do it's cash headers. And, um, you know, it seems like that would be really useful for most.

jango apps and I think the frame that I have around some of this stuff is like what are the third-party apps that I always include in every Django application that I make and it is white noise, Django compressor and there's probably like three or four other ones. Like how can I make that list smaller or I think it would be useful to make that list smaller. ⁓

Will (30:32)
Yeah.

Adam (30:41)
I think it gets a little complicated because like that keynote was talking about Django can be used in lots of different ways. So, ⁓ the way that I'm sort of thinking about it is there are different use cases. have Django as a web framework for web applications. You have Django for just running tasks. You have Django just for APIs and like, maybe we don't need to solve all of them, but maybe we need a good story for like.

different use cases that people are trying to use Django for instead of trying to solve like boil the ocean.

Carlton (31:15)
Yeah, that's kind of the notion I've used this term battery packs for is that I want the API's battery pack or I want the CMS battery pack or I want that, you whatever. I want the react battery pack. I think there are standard sets of functionality that go together.

Adam (31:34)
Yeah, the Django templates, ⁓ there's Django templates when you do a start app and start project, which are confusingly named to me because it's too many templates. ⁓ But those seem like that would be the solution for those, but it doesn't seem like they have as much ⁓ use in the community as I would expect, or maybe they're not as easy to find or something, but. ⁓

Carlton (32:03)
⁓ The steering council have provisionally approved a depth for implementation about improving the start project command. Tom Carrick put this forward and the idea is to improve the story about how you create your own template, the story about how you use templates, have two or three example templates that are more powered up and have a better start project template which is a bit more user-friendly for beginners. ⁓

Adam (32:03)
I don't know what have you seen around that.

Carlton (32:29)
you know, the whole start project, start app, to start installed apps, that bit of getting very first going, we could rub that away, right? We can make that, you know, one command and there's your project that's ready. So there is a provisionally approved depth for that. It just needs implementing, but like we're agreed that that is a goth.

Will (32:47)
you

That's good. mean, this is the whole batteries versus magic thing, right? I mean, I think we're all talking around a newcomer wants magic. They just want something to work and Django gives you batteries, which are super powerful, but you have to kind of know how to use them. So. I mean, there's been ideas. mean, Jeff Triplett has mentioned, you know, maybe there's, I kind of like, you know, to go on Adam, what you were saying about how we have backend support, maybe there's like some middle ground between a third party package and.

Official backend support, right? Where you could add flags, right? So you could do start project dash dash production, or maybe even start project dash dash production dash Adam. And it's like how you like to do it or something, right? Cause even as trivial as it seems, a third party is like just enough friction sometimes to get in the way of stuff. But I don't know. It's hard to know. mean, starter projects, I have this thing called lithium now that used to be Django X that I constantly

think about where is the line because I want it to be easy to use. So right now it's basically Django all off. I mean, it's got it's got bootstrap. It's very basic, but still very helpful. And then there's like what I would use, which is like way more complex, but there's definitely at least one grade in the middle, which is, you know, has white noise has a whole bunch of stuff where I'm like, I think 80 % of people could use this. Right. And yeah, I don't know. guess it's being comfortable with an 80 % case and just putting it out there.

But then people have to find it, you know, and then you have to market it and, ⁓ I don't know. Then, then we, then we all lose momentum, right? Cause the thrill of making and discovery is just like, we did away by like, do I need to market a free thing? Really?

Adam (34:27)
Yeah, that gets challenging as well. ⁓ So I did, I was, I saw the depth for the starter projects and I made a library called Django new. So Django dash new, because I had seen that there was a project called fast API new. And I was like, well, we could, we could do something like that. ⁓ So that is my sort of opinionated way of starting Django projects.

but it is, it's less opinionated than some of the starter projects that are out there, but it's still got opinions because it kind of has to. ⁓ But that sort of, takes that idea of different ⁓ use cases to an extreme, which is just like, there are flags for web, for API, for tasks, and for one other one, I forget, like data or something. And

Will (35:21)
Yeah.

Yeah, data worker,

yeah, API data website worker, yeah.

Adam (35:26)
Yeah, worker. Yeah.

So like based on whatever those things are, it just spits out, you know, a Django, a Django project. ⁓ the next step to me is being able to install third party apps really easily. So like when someone needs to add in white noise, you have to go to the white noise, ⁓ manual page or, you know, docs.

and say, okay, I have to add it to installed apps and then I need to, maybe there's a middleware and then I need to do, you know, for some apps it's like, I got to go to URLs and which URLs do I go to because there might be more than one year. You're like, it's just, I think it gets back to that, like ⁓ smoothing out the install process for new people or smoothing out just the, like I'm ramping up a new Django app.

I think there's lots of ways that we can make that better. And it's something that I think about a lot. a lot of my things kind of, yeah, yeah.

Will (36:28)
I mean, it's a checklist, right?

mean, you know, pilots have this. I mean, the talk idea I've proposed, so we'll see if I get to give it at Django and Python conferences this year, is around deployment. And I think it's exactly this idea of like, okay, like, I have a sense of like 80%, boom, boom, boom, boom, here they all are and let me talk through them so you have an idea for them, but then you need the checklist. And you know, and there are checks in Django. I'd say most people have no idea that

that check exists, but I want to put some effort to being like, there's not a lot of argument around, like you got to handle your static assets. Like a lot of people use white noise. If you don't want to use white noise, you can do something more custom, but just good on the list of, I don't know, it's 10, 12 things. At least some people can look at it and see what are these ones. Cause I think the other issue is a lot of people, all three of us create a lot of new projects. I'd say most Django developers don't, they work on the same one for years. And so they don't.

feel this pain in the same way as, you know, someone who spins things up for fun or as a consultancy does. That's, that's something else I'm very aware of. There'll be, yeah. Steering council members sometimes who haven't started a new Django project in years, right? I mean, they're still working on Django, but they're feeling different pain points and they're also not dealing with deployment, right? I think that's like the quick take on my talk. Besides, here's the checklist of deployment is also why isn't this more of an issue? It's because in a production setting,

Someone's done it and you're just using it or even you did it a couple of years ago and you forgotten about it. It's not something every time you load up your project, you have to deal with. And so it's easily forgotten or not thought of, which means that when you're a newcomer, you're doubly frustrated by why isn't it documented? Why isn't it easier? And it's because it's not, you know, it's not like fiddling around with your views, which I do every day.

Carlton (38:19)
Yeah. I mean, I burned into my soul is that thing where I've got my first Django project working locally. And then it like, right, how do I get this online? And I was like, no, there's the same time again in learning how to put a Django project on.

Will (38:34)
Well, or

even something is I still make this mistake of, you know, I have it working locally, I deploy it, and then I go in and like, you know, I didn't do the command to migrate the database on production. So I'm like, wait, why doesn't it work? You know, it's like, God, now I have to like migrate the, yeah, do all this stuff. Yeah, if you're not doing it all the time, you lose ⁓ that sense.

Carlton (38:50)
Thank

No? Okay, Adam, you've got several more projects. I want to talk to you particularly about Coltrane, because I think Coltrane is quite a cool little beast. So tell us a little bit about that and how's that going?

Adam (39:10)
Yeah. So that was born from, needed to, or I wanted to basically have Markdown files inside of a Django app and have them render as HTML. So that's how it started. ⁓ I had a lot of side projects and I would write documentation and it didn't really need to be formatted like super well. And I wanted to just write it in, Markdown and then show up on the site easily.

So there is a markdown renderer inside of there. I've switched between a couple, but ⁓ that's how it started. And then at some point I sort of started thinking, I could take all this markdown and I can make a static site out of this. Instead of being inside of a regular Django app, it would just render out as static HTML. And so there's also a static site builder in there. I know there's a couple of different solutions in Django. ⁓

that people have built for static sites, but this is my take on it. ⁓ And so it kind of solves both of those purposes. I don't use the static site generator as much for my own personal stuff, because I almost always am deploying a Django app. So I just want to render out that markdown. And then after that, I started playing with different ways to... ⁓

have different template tags and different ways to structure the markdown. So basically in one repo, I can deploy it to two different sites and then have them rendered differently. ⁓ Because I needed one deployable, but rendering in different ways. So I build out this little site framework. ⁓ But yeah, that's the gist of it.

Carlton (41:05)
So it's like a full multi-platform content management system based on.

Adam (41:08)
I

mean, I don't know if I'd call it a CMS, but ⁓ you know, it's pretty close. You can have, ⁓ you use like template hierarchies and stuff like that and you can build it out.

Will (41:21)
I'm have to try this again, because I'm still stuck on Jekyll for my personal site, because I just can't be bothered, and some freezing Pelican just feels like too much of a lift.

Carlton (41:21)
stuff.

Adam (41:29)
Well, so yeah, so the initial initial thought was from, who is the guy who does the CLI, the rich and is it will yeah. On Twitter at some point, will was like, you know, I want to use Python for my, for my static site, but you know, I don't, I don't want to use Hugo or Jekyll anymore. And so I was like, well, I mean, Django, Django can do all this. We don't need to like rebuild.

Carlton (41:41)
Well, when we

Will (41:42)
Well, yeah.

Adam (41:59)
the wheel and ⁓ so that's where it started.

Will (42:05)
I think the cost thing is really important with, sorry, Carlton, I'll just quickly say like, I want people to use Python and Django, but not everyone wants to host a database for a blog, you know, and you don't have to, right? Cause you can put it on GitHub pages. can put on Netlify. And so I, yeah, I'm going to give this another try. Cause I still think there's that space. Like when I can see when I tell people like, I want to have my own site. I'm like, it's easy. You can do it in Django. But I'm like, but then you got to host it. And I just see the like enthusiasm.

fade away, even if it's like, it's just some hosted thing, lose them. But if it's just drag and drop or GitHub hosting, yeah, that's a big barrier. So yeah, Carlton.

Carlton (42:44)
know Emma Delascol is keen on having a static site generator either in Django or close to Django. There's a Django distilled package which is very mature and I think the author there is keen to modernize it and get it in. I'll just throw you a softball at me. think having Django a better static site story is something we could do for our users?

Adam (42:55)
Mm-hmm.

Yeah, I mean, I think that that is a use case that a lot of people will need is ⁓ generating a bunch of static pages. It is a little bit different than how I normally think about Django, which is like dynamic ⁓ database oriented, you know, web applications. But there is probably a set of people that that would really benefit from just generating HTML and

throwing it out there somewhere.

Carlton (43:43)
The thing is, once that's done, you can stick it out there and 10 years later, it'll still be working exactly as it is, without running a process.

Adam (43:48)
Yeah.

Will (43:48)
You can put your

RSS feed. mean, I was posting something on the socials yesterday about how I'm, you know, are reinvigorated by RSS. Carlton gave me a nice reader and, know, it's like increasingly disgusted by, ⁓ mainstream everything and then wanting to focus. So yeah, it's right because Django obviously, I think again, most people don't know Django has its own built in way to generate feeds. And I'm sure there's a way to do that in a static site thing as well.

And then, and then you're there, right? That's all you need. So I go up, you got your feed, you got your pages. Posted on something simply and good to go.

Adam (44:18)
Yeah.

Yeah, I don't know how, if distil does that, I assume it does. ⁓ I know in Coltrane, I automatically generate ⁓ RSS feeds because it is so easy to do in Django. You basically, it's all built in. So yeah, that worked out really well.

Will (44:30)
I'm not sure.

Carlton (44:44)
to having flashbacks to, because when I started, I started with a web server and a folder and you put your uploaded HTML and you didn't get a backend thing until you wanted to use a form. And it was only when you used a form that you need some way to have form input. So you had a CGI script for that, but this is why I don't use white noise because why on earth would I have my Python process serve my static files? Cause that's what the web servers job is. But anyway, that's the side, but like.

We've come so far, it seems, that now we start with the dynamic process to do the easy thing of serving template views, which never change. And you don't want to run a whole process to keep serving the same thing time and time again and infinite them. Anyway.

Will (45:18)
Yeah.

I wanted to quickly ask you, Adam, so current hotness is out there. So UV rough types, do you have any hot takes you want to share on either of those areas? Fine if you don't, but.

Adam (45:39)

I mean, I don't think it's a hot take at this point, although Carlton might disagree with me, but I think, ⁓ UV has sort of won the, the Python packaging, ⁓ war. don't know. I wouldn't call it a war. ⁓ it seems to have taken a lot of the, the mind share and, ⁓ you know, I, I've moved basically, I was a, I was a big fan of poetry, ⁓ for a long time and I've moved everything from.

Will (45:53)
Yeah.

Adam (46:08)
poetry to UV. ⁓ I've moved everything from black to rough and I'm in the process of moving everything from my pie to tie to Y, which is the new astro one. And ⁓ I'm not saying that they're perfect or that there aren't like, I have my own concerns about the longevity of those tools and how they're going to play out longterm.

Will (46:22)
Yeah, the new Astral One. Yeah.

Adam (46:38)
But for right now, it seems to be fine. They're open source. It seems like they're being good stewards of those open source tooling. And so if I need to move back to PIP at some point, like that's fine. It's all code. can, I can change in the future if I need to, but for right now I got some benefits from moving to those tools. And I think that has been great.

Will (47:07)
The lock-in is low, which I think is important to remember because I think we all have various concerns, but you can just switch back.

Adam (47:15)
Yeah, I wrote an article at some point before UV ⁓ was released and it looked at PIP-env-hatch-pdm-poetry, think. So I did a, ⁓ and Rye, Rye was like a package manager that was floating around for like six months. ⁓ And actually they moved a lot of that into UV, but ⁓ basically I was just trying to figure out like, you know, what...

Carlton (47:34)
that's all fed in with UV, right?

Adam (47:43)
Where's the future of Python packaging going? And I wanted to try all these things out. And, after UV came out and I tried that one, basically dropped everything else and I moved to that. And, ⁓ you know, I, I do want to say that, like, I really appreciate it. There was a article that came out somewhat recently about making PIP faster. And I know that there's a lot of people who are doing a lot of great work improving PIP and, know, all the underlying.

technologies there. And so this isn't to say like those that those tools are bad or they're not good or no one's working on them. It's just that, ⁓ you know, I, I just got some benefits and so I moved over.

Carlton (48:31)
I know.

Will (48:34)
Can we come to the projects and books phase of the show? is that okay? Well, Adam, as our guest, there, all we've done is talk about your projects. Is there another project out there you want to draw attention to or that you've been looking at recently?

Adam (48:38)
Yeah, sure.

I brought this up earlier, but I was really impressed with the Django task project and how much effort there was put into that to make it ready to get moved into Django core. And I think it's really solving a problem that a lot of people have. So I'm really.

really happy that that got pulled in. And I just wanted to shout out that project and all the work there. I think the other one that I wanted to mention was Farhan was on the podcast. So maybe he doesn't need the shout out, but basically all of his GitHub projects, I just follow him and I'm like, ⁓ that's really cool. I'm glad someone is doing this. And I really am looking forward to seeing what happens next and just following along.

and to see, you know, what happens.

Carlton (49:39)
This is just a good one from, I don't think we talked about when he was on, but he's been doing all this work on Django Bolt, which is this Rust-based super fast Django wrapper type thing. But out of that came some work on the multi-part parser and using different Python packages for parsing multi-parters. So there's now a PR to try and make that pluggable on the request object so that if you want to, and if you don't need strict backwards compatibility with Django's multi-part parser, you can swap in one of the, you know,

packages from the Django ecosystem, from the Python ecosystem. So you can just pip install whatever the alternative is and give it a little wrapper, use it in your Django requests and you can get like, I can't remember the figures, but it something like 30 % higher throughput on passing large ⁓ multi-part requests. So go far, he's really out there.

Adam (50:31)
Yeah, the cool thing is like he's working on these things that are sort of ancillary to core, but I think he's going to come across all these problems which you can solve in core. So, and like, it'll be fun to see if, you know, if we can move some of those things into core.

Carlton (50:46)
Yeah, yeah, no, it's super good. That's a good, good, shout out. Will.

Will (50:51)
okay. I'm going to shout out, ⁓ la suite in America, which is this French existing project of trying to open source and have, non corporate versions of all the infrastructure your government runs on the heavy users of Django. They contribute to Django. I think lots of countries and places should consider having their own versions of things and it's not the hardest thing in the world to do.

So pleased to see that they announced, think publicly they're gonna try to switch over, I think all of it or most of it in the next year or two. ⁓ And I would be very surprised if other countries do not do the same for all the reasons everyone can imagine. So cool to see that and cool to see it's Django and it's using all the modern stuff ⁓ out there. Carlton, what's yours?

Carlton (51:42)
Very

good. Okay, so I'm going to call out a project from Jamie Matthews who was the co-founder at DAB apps who had him on the show before he was influential in the early days of Resh Framework. But he's published an online guide. It would be a book, but it's online. It's free to read called Django Rapid Architecture. So it's at DjangoRapidArchitecture.org. And it's basically how Jamie does web apps. it's, you he's very function based about.

Compositionality, keeping things clean. He's anti-type hints. He's like, come on, every Django developer knows that a request takes a response and it gives back a... Sorry, it takes a request and gives back a response. You don't need to type in that. He's got his views. It features the absolutely amazing Django readers package, which enables you to compose the exact queries that you want ⁓ to make from the...

from the ORM and it handles the selecting just the fields you want and it handles your prefetch relateds for nested queries. It's just beautiful. I use that a lot. So go check it out. It's a very experienced Django developer with 20 years of experience using Django telling you how they do Django. So it's worth the read. Django rapid architecture.

Will (52:55)
Yeah, I should read that again. That came out a little while ago and I remember... Yeah, okay, not that long.

Carlton (52:57)
Yeah, a month or so ago maybe he really made it.

Django Readers has been out for a couple of years, two, three years now. It's just gold dust, it really is. Go on.

Will (53:08)
Yeah, I think it

I think it came out like over Christmas or something. Some were seeing it and looking at it and be like, Oh, this is going to be great. I need to really focus and look at this, but

Carlton (53:18)
Yeah, no,

it is good. is good. don't, know, this obviously bits that it's Jamie's opinion. don't agree entirely with him. So when we get him on the show, we can argue about those little bits again. But yeah, when, when somebody of their experience gives you, you know, this kind of breakdown of how they see it, that's always worth a read, whether you agree with individual points or not.

Will (53:40)
And that's a chance to shout out another package you have Adam Django dash FFBV, which is things around function based views and trying to make them not class like but less annoying to use. ⁓

Adam (53:47)
yes.

Yeah, that's

one of the packages I install for every Django app that I use. I use it, yeah.

Will (53:59)
Nice.

Yeah. All right. Books. I'm gonna I'll go first. A River Runs Through It by Norman McLean. This is again my trend of trying to read fiction. If people haven't read it, I think it's one of the great American novels. It's really more of a novella. They made a movie about it. But Father's Sons kind of Hemingway-esque. Just if you're in the right mood.

Amazing and I think underappreciated for how good it is.

Carlton (54:30)
Adam, you go.

Adam (54:35)
Uh, so I watch a lot of movies. That's sort of one of the things that I, that I tend to do as a hobby. Uh, and I watched a movie called Nightmare Alley and it was by Guillermo del Toro. Um, it was released in 2021, but it was based on a book written from 1946 or 40. Yeah. 46. And so I recently read the book. Uh, it's about, um, sort of a

a scam artist, I guess I would call him, uh, who joins a circus and then, um, kind of his, his progression. And then he continues to be a scam artist and then sort of gets his come up and set the end. But, um, I don't know. I really, I really enjoyed the book. Uh, it sort of has, what is it is like clockwork orange where they like make up words, but they don't tell you what the words are. It kind of does that a couple of times where you kind of just have to

piece things together based on context of what they're talking about. ⁓ But yeah, I really enjoyed it. So it was good.

Carlton (55:38)
And well, I've been reading a book this week. I've been mostly just reading the newspaper but It's not the particular newspaper. I get the couple of museums I get the London review of books which comes out twice a month and I get the Le Monde Diplomatique Which is once a month and the key there is that they're slow. They did like there's no like quick refresh There's no today. It's a month old. So the articles are quite long the Mon diplomat is in French It takes me ages to read as well because I have to you know, I have to actually think about it

But the articles are in depth. They keep you up to date. But you're not on the hook for the dopamine hits and the whatnot. And we were talking at the beginning of the episode about being sustainable in your projects, whether it be running a podcast or an open source project or whatever it is you do. Well, be sustainable in your news consumption too, because it extracts a cost upon you. And if you are hooked onto the machine constantly, not only are they driving the narrative, what they choose to.

highlighting what they don't. But you're paying that with your energy and your life force. the end is not necessarily, you know, get Lamond Diplomate, the London Review books, they do. It's get something that's more considered and step back and you know, give you give you take the time to read it, but in a more controlled and sustainable way. That's

Will (56:59)
Yeah. I would say that's, that's one of the benefits in my life. Carlton, when you came to visit, ⁓ me in the U S a number of years ago, you were reading the lender review books on the plane and, chortling away about stuff, which I won't repeat why. And I was like, what is this paper? I'd never heard of it. And now I've been reading it for three, four years as well. And I can strongly recommend it.

Carlton (57:19)
It's my slow quest to convert people to London Review Books one reader at a time.

Will (57:24)
Yeah, we got a couple people, George Curtin, who's old family friend online. And yeah, there's a couple people. So, yeah.

Carlton (57:31)
get them slowly. Anyway, that

was my recommendation is read the newspaper, but not the dailies.

Will (57:38)
⁓ As we go out, anything, Adam, you wanted to mention or that we failed to ask you about?

Adam (57:44)
I think we covered a lot of stuff. Hopefully it was interesting.

Carlton (57:49)
Was there one more magic wand thing that you might have had? I know we talked about a lot. Yeah, no, but you know, Adam, you might have a magic wand then if you could fix one thing in.

Will (57:49)
Yeah, well.

⁓ yeah, we stopped asking that question.

Adam (58:01)
⁓ I mean, we've talked about so many things I want to, I would like to fix. ⁓

Carlton (58:09)
But okay,

if there's nothing left, then that's fine. But if there's one we think, yes, that.

Adam (58:14)
I mean, I would, I would probably just, you know, the, the one thing that I would say, which is not, it's not really code related. It's and it's more meta maybe is to make Django sustainable and to figure out how to.

Um, not have a business model because that makes it sound more like capitalistic, but more like how do we make sure we have sponsors for Django that we're getting, um, as many of those as possible and making the Django fellows, uh, a long-term solution, because I think a lot of the benefits that I've seen in the past couple of years are because we pay the Django fellows.

And they are dedicated to Django and pushing it forward. And I don't know if we would have had the, all the improvements over the, all the improved, the recent improvements without dedicated people to the project.

Carlton (59:20)
I mean, he's now 10 years old, right, the fellowship?

Adam (59:23)
it's longer than I thought it was.

Will (59:28)
Yeah, agree. ⁓ last thing I'll call out in the Django News newsletter, I've been mostly trying to link to the Django's fellows give a weekly report of what they've been up to. You can find it in a forum, but I've been trying to add that as a section so you can see and they add a little brief paragraph and you can see all the tickets and things that they worked on and they do a lot.

Adam (59:51)
Yeah, that's awesome.

Will (59:54)
Adam, thank you for taking the time to come on, share all your work. We'll link to everything. People could also just go to your GitHub repo page and see it, but we'll link to all the things we mentioned. And DjangoChat.com. And we'll see everyone next time. Bye bye.

Carlton (1:00:08)
See you next time.