Transcript: Django 4.0
Hello, welcome to another episode of the Django Chat Podcast.
We are back from our summer break, and in this episode we'll be talking about Django 4.0.
I'm Will Vincent, joined as ever by Carlton Gibson.
Hello, Carlton.
Hello, Will.
How are you?
Good summer.
Good summer.
Yes, good summer.
A little bit of a break.
We're back.
We're going to be back to our bi-weekly schedule.
Lots of guests lined up.
So we didn't tell people we were taking a break, but we took a little break this summer.
And yeah, we're both excited to have new things going.
So this episode.
4.0, we're gonna talk about a bunch of Django news.
Talk about our summers.
So maybe just on the podcast.
So yeah, bi-weekly going forward, I looked at the stats.
We we started this February 1st, 20 2019, after a couple fall starts, and there's been over 300,000 downloads.
Which is a lot or a little depending on how you look at it.
Um currently episode 98 and it reaches a couple thousand people a week, so very happy with that.
Um no sponsors, but you know, at some point if somebody wants to sponsor it or if we get large enough, we'll do that, but that's not really why we're doing this.
So just put that in there.
Yeah, no, uh, you know, if you want to chug money at us too, but as Will says, it's not really the point, is it?
How anyway, yeah.
Yeah, it's really just our it's our time and the hosting costs, which are minimal, and and we get a lot out of it.
Um, so what's going on, Django?
So uh DjangoCon US is coming up in end of October.
Sign-ups are free, it is online.
Definitely we have a link.
Do that if you haven't already.
Um Django 4.0 just this morning, right?
The the feature freeze or 4.0 where is it?
Well, it's just it was.
Yeah, that was last week.
So last week was the feature freeze, and then and that's that's just like that's that's essentially mental.
That's the hardest bit of the year.
It's like because you've got all these things that you'd like to get in, like all these things, you know, this long massive long backlist of oh, wouldn't it be good if we can have it?
And there's only so much time and so much energy.
Um, and we had a really good push to get that in.
And then Maris, bless him, he's release manager this time, so um he's he takes all the slack, he takes all the all the flack, and I I just try and pick up what I can around it, and then you know, next time it will be my turn, and he'll be laughing, and I'll be sweating it.
But he made he managed to get that out late on I think last Monday night, and then yeah, and then that's it.
And then now you can get go out, download um uh or run your your test suite against um Django 4.0 A1.
So that's the Alpha 1, and then you there's five or six weeks for the Alpha period, and that's when you know we've really got to find the the the first wave of um issues and tell us about those, and then we can fix those for the beta, and hopefully there's a few less things in the beta, but again we need testing all the way through, and the m the more testing we get during this pre-release phase, the the better, because you know, then we get to you know 4.0 final in December, and you know, there'll always be regressions, but you know, hopefully not no major sho
w stoppers the day after the final release.
Right.
Well, this year there's there's two releases because the nine-month schedule sort of works like that.
So it feels like I mean on my end just updating the books and stuff, it feels like more, but it's really just we're in this nine-month schedule more or less indefinitely until something arises.
Yeah, so it's eight, it's it's it's it's eight months.
So that means that there's three releases every 24 months.
Yeah, yeah, it's eight months.
So they go it goes, um, I don't know, it goes August, April, December.
August, April, December.
August, April, December.
Yeah, yeah.
Um yeah.
And so yeah, in 2021, there's April we had, and then there'll be December as well.
Yeah, that math checks out.
That's the kind of math problem I've been giving my my oldest daughter, and um I think she's better at it than I am.
Yeah, no, I mean um you
know, all those lot all those logic ones like you know, John's taller than Sally, Sally's taller than Tim, who's you know, who's taller?
They're just like, yeah, they got my wife's brain on that.
So lucky.
No, but it's children, isn't it?
They've got these the the kind of the the capacity to employ reason that you've sort of lost as a parent.
Right, yeah.
Um, so we'll talk about 4.0 and what's involved in there, but um yeah, summer.
How is your summer?
We haven't really
spoken on it.
To be honest, I needed it.
This like it's been crazy.
That uh it's not just um work, it's this whole pandemic ongoing, so like it's still 2020 as far as my brain is concerned.
Um and I was struggling, I was just like, not struggling, but just the thing I've realized, like for years and years, I've always had loads of balls up in the air, but it's been juggling away and juggling away.
And I've just found myself not able to make progress unless I've sort of really focused on one thing and just I focus on one thing, and I can okay, yeah, I can get that done, and then I can focus on the other.
And that's you know, if you read productivity textbooks like Productivity 101 is focus on one project, put your energy on that, get that finish, move on.
So, okay, so it's not rocket science, but it's like it's just a for me, it's kind of like um a marker of the low-level stress that there just is with this whole environment.
Yeah, it's that if I if I'm really if I'm not really conscious about that, I've been struggling.
So, you know, to make progress on um you know, 4.0 to get through the feature freeze, that was like, okay, I've got to really head down and focus on that.
And you know, um, and then um, you know, looking at the open source projects that I maintain.
So um after the 4.0 feature freeze, last week I was able to spend time getting um compatibility with 4.0, provisional compatibility because you know there might be issues that get revealed.
But if people for instance, if REST framework won't even test against 4.0, then it's very hard to for people to test with REST framework.
So, okay, let's get 4.0, um let's get REST Framework 4.0 compatible, at least on the the main development branch there.
And um I was able to work on that, and then I put out a release for Django filter, um, which which is now um 4.0 compatible, and uh a release for Django AppConf, which is now you know, there were with AppConf, it's crazy because there haven't been any code changes for years.
But every time the the Trove classifiers on PyPI get updated, the the ones where it says you know this is compatible with the Django framework, I get open tickets going, this isn't compatible.
I'm like, did you try testing it?
Because it really is.
There's no code changes, the test will pass, but okay, we'll do a new r we'll do
such a scene on these things.
We'll do a new release with the trove with the trove classifiers.
And so anyway, um appconf has now got official trove quality uh uh classifiers for 3.2 and 4.0, which it was missing.
Um looked at um Django Compressor, that's that's essentially compatible.
There's a few test glinches and a Ginger 2 version 3.
That's I can't get my head around Ginger 2.3.
Um the issue.
But other than that, it's it will run, you know, if you're using compressor, that will run.
So um I saw David Smith, he put out um crispy forms for with 4.0 compatibility.
Um so you know, if you're using all these big packages, they should already be 4.0 compatible thereabouts.
There's no reason why you can't test your code on them to find the bugs.
Hang on.
But anyway, the point I was making was I had a bit of time to work on the open source stuff, and now I've got time to work on um Daphne, that's next up.
So Daphne's been waiting for an update for a while, but I just haven't had the capacity to work on anything.
So it's very much I'm doing these things kind of serious serially at the moment.
Um yeah.
Um and yeah, I think as I say, that need to do things seriously has just been a marker of stress, uh a marker of you know, yeah, stress.
It's no it's no other word for it.
It's it's it's been a really difficult two years, and I think just acknowledging that is perfectly okay.
Yes.
How about you?
How was yourself?
How was yourself?
Well, so um how honest do I want to be?
Uh not a lot of work stuff.
Um the goal was to have a couple hours a day, just all the maintenance things that I need to do.
Um so we still have the Django News newsletter that Jeff Triplett and I do.
We that's still going weekly.
That's not that hard.
That's that's a fun project because it's not a huge amount of time.
It takes two hours a week.
Um if I'm crushed or Jeff is crushed, we can alternate.
Um that's a fun one.
So that's pretty easy to do.
Yeah, I've been working a lot on the 3.2 updates for my books.
I and I've gotten in this pattern where sometimes I'll have just cursory updates where I just go through the code, make sure everything's fine, and sometimes I I have a build-up, as you were saying, with 4.0 of all these things I want to change.
And for 3.2, that's been the case.
So I'm going Windows first.
I bought a Windows laptop, I've been doing all sorts of stuff with that, using pip, not pipem, adding black, just across the board, adding a lot of updates.
Um, so it's taking a little more time, and I was really trying to get it done before the summer and it just didn't happen.
And you know, the reality is everything still basically works.
You know, Django is quite mature, so there's one or two small things, but it's more of a third-party situation.
So I'm racing to finish those updates and then I'll do the 4.0.
Um, so uh that's been good.
I mean, personally, yeah, I've I had a kid, I've had a child during lockdown, and I don't have as many ch children as you, but not yet.
Kids in the summer need need oh, I'm done.
I'm done.
I'm done.
Um kids in the summer need to be entertained.
So, you know, lots of um life force being expended.
Um, not not all of it towards Django, but that's fine.
Um, DSF, we Django Software Foundation, we've still done a number of things.
So we had the the survey, so I helped lead that.
Um, we partnered with JetBrains.
That's concluded actually, so we're waiting on them to compile the results, but we got more responses than last year, I believe.
Um, and so that should be great.
Um yeah, a bunch of DS just DSF um DjangoCon EU went off, uh went well.
There was a whole bunch of work around that.
So yeah, so just um I actually I had now that it's September, I've I'm back to the co-working space I was at before.
Still got to wear masks.
But the first week back, I was um I was just like a blob.
Like I didn't know what to do without expecting to be interrupted every 15 minutes, which has been the reality working from home with kids in the summer, um, the past three months.
So um yeah, but it still feels nice to code, still feels great to write.
Um so those are all good things.
Yes.
And looking forward to, you know, switching my brain to s professional things as opposed to just personal things all the time.
Um so yeah, and I imagine you know, and you and I are both, you know, as fortunate as it comes, I think, with these things.
So just acknowledging that COVID's still here and it's um you know, it's not
gone away.
Yeah, I think I think that's it.
I mean, you know, I wouldn't trade I I sort of joke the summers hit the the summers in Spain are very long.
The kids have 12 weeks off school, which you know it's just mental amount of time.
Um and I joke about it being too long, but you know, am I gonna trade that for uh what do I do at work?
No, I want to spend time with my kids, and that's fine, and then when they go back to school, then the autumn comes in and it's like okay, a different routine, that's fine.
One thing I want to cut back to was the um jet brain survey because that's really great.
We took over the summer we had the Google Summer of Code, um, which went really well.
So we had two projects for um Django, one on to to add a Redis backend, um, and another working on the in internals of the migrations um of the migrations engine.
So uh we're rendering models using project state rather than you know, blah blah blah.
It it it'll speed it up, it would be a lot it'll be faster, and there's some important steps there.
So that was the successful project.
But the Redis one directly came out of last year's survey because we so we did the survey, do you use caching?
What do you use?
Okay, so you know, three times as many people use Redis as any other um backend, and it's like, well, we've got three memcache backends in the core.
Why haven't we got a Redis backend?
Um and so okay, we put that up as a as a um a Google Summer of Code project, and that's got done by Dani Allen.
He he's done a great job.
Um Nick Pope really um helped with the review there as well.
Um and so that you know that's directly out of the survey.
So having the survey leads right into Google Summer of Code, which leads into direct the improvement of Django.
And that's great to hear.
And that's really great to hear, actually, because I think part of it is there there's no human interactions, right?
So like you and I, there's been no conferences.
I see numbers about people who listen to the podcast, but it's aside from a token email, I don't have a real sense of its reach or the newsletter or all these things, right?
And so that's really gratifying to hear, yeah, because the survey last year was quite a bit of time.
Um and that's exactly why we do it, right?
So it's nice to know that there is that lit link of you know finding finding because we you know, because we don't track anything in Django, you know, by design.
So if not for the survey, we don't know in any way, you know, how the community is using it besides anecdotes, yeah, really.
Yeah, I mean it's not the sort of thing we're gonna put to limits.
But that's great.
So fine.
Um anyway, just before we move on from Google Summer of Time, I just want to say because we had Wagtail come in under the Django um org this year, and they had three projects.
I think they'd have taken 20 projects.
There's so many, so, so keen, so many ideas, and so many mentors available.
Um, but they took they had three projects that they worked on.
We'll have to get Dawn on to come and talk about those.
But what was really nice is that Wagtail had applied to Google Summer of Code before and they hadn't they hadn't got in, but they were able to come in under the Django um sort of org, and we've you know we've been in done it more, I think, every almost every year since Google Summer of Code has been running.
Um, and then you know, hopefully next year Wagtail can then apply on their own, saying, Look, well, we did we came in under Django, the Django org last year, and we had these three successful projects, and you know, now we can go on our own, and then maybe we can do the same maybe for Jazz band.
I did mention it to Janis, but um, I think we've got to plan it a bit more in advance to see if we if they've got mentoring capacity and all those things because otherwise it would just fall upon Janis to um you know mentor him.
And he he can't do that by himself, like he so it it's something that I want to try and at least have a discussion about.
But it worked really well having Wagtail uh sort of apply with Django, and so all in all, it's a really successful Google summer of code, I think.
So thanks again to Google for putting that on again.
Yeah, thank you, Google.
Yeah, that's great.
Yeah, and all these things are there to be done if and there's funding available if people put the work in.
Yeah, so speaking of community, so I wanted to bring up again before we get to the 4.0 updates.
Um so one of the things I also I caught up a little bit on open source, there's this awesome Django repo that um there was one before, and then I started one years ago now, four or five years, and um Jeff Triplett joined in a year or two ago, which has been great to help.
And somebody submitted a PR saying, hey, you should reapply to put it on the official awesome list.
And during this week I had back in the the office um in the afternoon, I was like, okay, I'll do that again.
And did that, spent a couple hours, submitted a PR, but it wasn't a perfect PR.
The maintainer is um wrote a number of comments, um, half of which were helpful and half of which were not helpful.
And so the end result is I said, okay, it's your, you know, your football, but I'm not spending time on this again, which was the exact same reaction I had a couple years ago when I tried to do it.
And so it really made me think about though, Django and the work that you and Marius do as fellows, because I understand how you can get to the point where this person is at where you just get bombarded with PRs that aren't perfect and you just rage yell at people about it.
But at the end of the day, it's open source and you know, if you do that, people are gonna, you know, it for me, I don't care.
Like I'm old, I'm experienced, whatever.
But if that was a if I was a newcomer or I was new to open source, to you know, the reality is that was hours and hours and hours of time and throwing it off, and then you just get the ball swatted back, not in a hey, you need to fix these things, but like, you fucking stupid asshole kind of way.
And it's like, well, that that would be really bad for a new person, I think.
So, anyways, I tee that up as how do you and Marius not not be like that given given all the PRs and all the things and all the years?
I mean, maybe it means summers where you take a little bit of a break, but um, I don't think Django is like that.
Certainly I hope Django isn't like that for newcomers.
Uh yeah, I so first up, sorry for your experience there, because even though you're experienced and you know, thick skinned and all the rest, that's still not pleasant.
Well, I I see why he said it, but it also means I'm uh I'm unengaging with the project forever.
And it doesn't really matter, but you know, you have a bunch of those micro things over time and a project will lose momentum.
So I mean something that I'm really conscious of with Django is that we we still have um a very male and largely white contributor base, and part of that is economic privilege, but you know part of it is just open source isn't very welcoming as uh and uh so you know to be to to make sure that you're doing everything you can to not put off potential contributors is is is is to make your project more sticky, is to make it a better project, is to make it
more open to contribution, but that's uh not always easier.
Uh you know, a a contributor comes and maybe PR's terrible perhaps and it's like this just isn't right, and how can I how can I respond in a way which is is suitable and um you just first of all you have to be lined up and wired to give that response, so you have to you have to want to give that response, and if you don't want to give that response, then perhaps you should you know step away from you know triaging because that's gonna be a part
of it, and that you know there's just no way around that.
There's no I don't think there's any room anymore in open source, if there ever really was, but there certainly was a commu a culture of it, but a culture of um you know just harsh responses.
I don't think there's any room in open source for that anymore.
Um and so if you're not prepared to be opening and welcoming, then you know step back.
Um sometimes does it get too much?
Yeah, I mean sometimes we'll get a difficult contributor, and Maris will say, Hey Kong, can you take this one?
Or I'll say to Maris, Maris, can you take this one?
And we're very conscious of what the other one's doing, and we we try and look after each other.
Um and sometimes you just have to let a an issue lie.
But the last thing is to the last thing you do is come, you know, not deliberately is give the harsh response.
And some you know, sometimes a c oh, that was a bit harsh.
It's oh okay, that's a misunderstanding of language, or you know, you know, the tone could have been friendlier, or yeah, yeah.
Yeah, there are some there's some cultural things sometimes.
Um but you you just have to try to be honest.
And I feel sorry.
Yeah.
I f well I feel sorry for the guy who's in a position where he feels he needs to respond that way.
I can see how you can get to that way with a project.
I mean, just the awesome Django repo itself, I had a backlog of PRs and I felt like I couldn't handle it, and I was gonna step away until I talked about I mentioned it to Jeff and he said he would come on and he was able to do stuff for a couple of months, and so now I have the space again.
So yeah, I can't imagine running, you know, that thing among others solo.
But I think there is that awareness of of how you do it.
And you know, but to speaking about Django and how we make it more approachable, that is something you've spent a huge amount of time and I don't know how we right now it's really just an add-on to Django cons when they happen, when we can, but figuring out if there's something that DSF or others can do to make it easier to contribute to Django, you know, because the code is relatively mature, there's all these doc stuff.
Um I I don't know the answer to that of a working group, but no, I figured in 2022, if things normalize, doing something around that would be important.
One thing that I want to do that I've been on the list for a while is recognizing the contributors better.
So um for 4.0, hoping to put a bit of time in over the autumn, David Smith's been taking an interest in this as well, in just drawing it together as as well as we can without putting too much work into it.
A list of you know the people who've contributed and trying to call out some of the contributions.
And you think, oh, why does that matter?
Like, shouldn't we just get on with coding?
Well, no, because you know, saying thank you, that's that that in itself is a good thing.
But also, you know, new contributors that to call out their contributions to give them something objective to point to that that that really helps contributors.
You know, it's alright if you're an experienced contributor, if you're you know, I'm I I don't I really don't need any one particular pull crest to put on my CV.
But if I'm a new a new contributor, especially you know, one who hasn't not necessarily got all the time in the world to donate to open source until they get recognized, then having a some kind of objective recognition is important.
But then there's also so much sort of hidden work that goes on.
I did a um an awesome workshop over the summer whose name totally escapes me, but um it was it was about on this very topic.
I I'll I'll put it in the show notes, I could I really can't remember it right now.
Um but you know, like I don't know, the people who run the um internalized internalised nationalisation localization list and the translation of that because what do they do?
What do they even do?
Like, you know, there's all these hidden jobs that they do, and so if we can call out what they do and say thank you, then that becomes the basis of kind of a like a how-to, like because there's a list of jobs that all need doing, and then it also becomes a a a kind of um the basis of a volunteer a call for volunteers.
We say, look, there's all these jobs that need doing, and they're in the hands of two people who've been doing them for a decade, and one day those people are gonna need to step away or just need a break, right?
And can can we just can we make that into something that's more addressable?
And so recognition is not only important for in in itself as like what kind of morally the right thing to do, it's also about maintaining the the the sort of stability of the framework as we go forward, as the as the as the people who've been doing all this invisible work need a break or need to step away or you know move on to other things.
Can we replace them?
Do we know what they're doing?
Can we replace them?
Have we got easy addressable jobs?
So a new volunteer comes along and says, Hey, I'd like to help with the localization, what can I do?
And it's like, well, to be honest, short of going and you know, the contributor guide is there and you can go and traw through, and that's but that's quite a hard thing to get we it's quite a hard thing to get going with.
What we don't have is like these clear, identified jobs that a new contributor can take on.
And so part of the recognition effort is is about identifying those jobs and making them addressable to new contributors.
Yeah.
And it's just extra work for the people already doing the work is part of the issue.
But at the end of the day, recognition is easy to provide.
I mean the internet the internationalization they've moved to the forum, the Django Project Forum, off of Google groups because that's something the DSF emails people can write in on the forum.
A lot of them are around someone saying, I want to translate it into this or that language, and they, you know, they didn't they weren't able to find where the internationalization group is.
So we get a couple of those a month, and um yeah, well anyways, yeah, we talked about this before.
Okay, but the document is great to have someone from that team on to talk about the work that they do because it is completely invisible to 99% of Django users.
Yeah, and like the the contributing guide is great, and it is in a way, everything's it's kind of there, but it's it's so dense and so unapproachable that people have repeatedly reported like people are like I can't get started, and there's no good saying keep saying, well, it's in the contributing guide because the contributing guide just isn't working.
So I mean it is we it's okay.
You know, it is okay, it's okay, it is working, but not to the scale we want, and not you know the number of times a potential contributor has come up and been, well, have you got an easily addressable thing that I I can take on?
And the answer is do you know what?
Not really.
And that kind of breaks my heart every time I have to say it because it's like that that's not Django being easy to contribute to, where it could be.
Well, we have these conversations both to have them and also so others can hear what it's like in our positions and and the things we're trying to to do.
So 4.0, is there anything else you want to or can we move move on to what people should expect in 4.0?
Yeah, we'd just talk about 4.0.
Like um, so I mean uh the big thing for me then was um we've we're moving to um zone, we're changing the time zone implic implementation.
So um for years we've been using PyTZ and PyTZ was installed when you install Django, and in um Python 3.9 the added to the standard library was this uh this zone info module, which um is kind of a where's the time zone implementation?
Um and um that from 4.0 that's the default um time zone implementation in Django.
So if you're doing everything in UTC, like you you know the docs I use UTC um in your database and do all your calculations in UTC and then just localize in templates and forms and things like that, it'll all just work perfectly.
But if you're using the the PyTZ um localize or normalize APIs where you you know you you want to convert it into a time zone, then do some arithmetic, and it might have gone over a date time, uh, you know, a DST transition, so you have to load you have to normalize it again.
If you're doing all that stuff, then um you'll need to audit your code.
And there's a there's a transitional setting, so you can set this um transitional used it deprecated PyTz setting, and then um there's a uh PyTZ deprecation shim um package which you can use to um uh to to uh wrap around zone info and give it a um um a PyTZ like interface, and then when you call that in your code, it will raise a warning and that enables you to find your warning.
So that's um that's super
and that's a big deal.
That's one of those things I think time seems not complicated until you get into programming and then you realize, oh my gosh.
And I did want to call out, we'll put a link to it.
Russell Keith McGee had a great talk um 2018, all about time and Django and Python.
Um so learning about time, that's one of those things for students for newcomers saying, you know, it's a great rabbit hole to go down.
It's like, well, time's easy, is it?
You know, like and what
no, I mean it's it's
it seems like it should be.
It's meant it it it's it's just yeah, it's far too barocked for words.
Um the like you know, and there's so that there's this abstract card, TZ info, and then there's this in the the standard library, there's date time talk time zone, and then there's PyTz, and then there's now this zone info um implementations of this.
And none of them are really compatible, they don't compare against each other, and uh it's just it's a weird and wonderful world, shall we say.
But anyway, it's what one of the really important reasons for you to test during the um yeah, the pre-release period is like you know, this should all work.
You know, if you're doing the the right things, it should all work.
And if you are using the you know, if you are using the the PyTZ APIs, you're just gonna have to adjust your code.
And the um the PyTZ deprecation shim package has a really great migration guide that shows you you know how to adjust your code.
Um but if any if there are other issues that come up, then we need to know about them because um zone info is the future of time zones in in Python.
Um so we it's time for us to make this change.
And that will be the the the transitional settings available all through 4.x the 4.x series.
So TILF Django 5.0, you can use this.
But ideally you would get you would migrate sooner rather than later and drop using that deprecated PyTZ and use own info.
So that's that's one big thing.
Um functional unique constraints in the in the database, so you can um you know have kind of uh computed constraints, so you know, that there's only one that's less than this or something like that.
You know, I'm trying to think of an example.
Maris is very excited about those.
Um the Redis cache back end we've talked about, so that's that's not as complex as the you know, as perhaps um Django Redis, perhaps, which is uh um, you know, that that has more options.
Um but for if you're if you just want to spin up a Redis cache with Django, you don't now need to reach for a third party package.
Um and right.
And I did want to, yeah, I I meant was mentioning this to a couple of people who are programmers but not in the Django world.
And it is important to note this just means official Django support.
It's not that Redis is now downloaded with Django.
No, no, no, no.
It's just that instead of having to reach for a third party package, um, I had a couple people make that confusion, so I just wanted to mention that.
It's it's more just yeah, there's an official support, and Django Redis is still an awesome package, and hopefully over time, if we need those things, they'll be moved in.
But yeah, I mean so the thing with so like with the ORM, for instance, um, we support um My MySQL, Postgres, SQLite, Oracle, and so the ORM uh needs to capture what's common to all four, and it needs to abstract to over differences.
Same with the um with the cache backend.
You know, we've got the mcache um memcache backends, we've got the Redis backend now, um, you know, there's a local file cache, but they offer a kind of unified API, and then it's beyond that API, it's open to third-party packages to go further.
So, you know, there's lots of um Postgres add-on packages that you know make more use of things that Postgres can do, which perhaps SQLite or Oracle can't, and you know, so there's always going to be room for um a Django Redis package, which goes beyond what we're gonna offer in core.
Um, but I remember I remember spending a day, two days, um, trying to work out which Redis cache package I should use out of the options and how to configure it, and you know, all these bits.
And then, you know, a couple of years later, when I needed to do again, I had to spend that same day to, you know, compile.
Ah, like which what did I decide last time?
I can't remember.
Well, that's like me with um Heroku deployments for the book because Heroku has not updated their docs in years on the matter, and um I've done it so many times, and every time it's like what a waste of yeah, what a waste of time this is.
Um button.dev.
No, well, hang on, hang on.
One more feature I wanted to mention for um 4.0 is um I mean it's all the the the whole load of minor features, but the other one is template-based form rendering.
So you know where you've got your form as as p or your form as table or your form as UL or well that's all now moved to the template system.
So a few years ago we moved the widget rendering to the template system, and you could customize the widgets, but who's customizing the actual widget?
No one really.
What people wanted was to customize the sort of the HTML that's generated when you when you get in your template and you just go form, you know, like output the form.
And now that's um so the default kind of proxies to as table, but if you you can override the the default template template and you can have it as you wanted.
So this is gonna really it's gonna be interesting how this interacts with the likes of crispy forms and floppy forms, because those libraries they then they may be that they're not needed anymore, or you know, aspects of them aren't needed anymore, um, that they can drop away.
But that's quite exciting because say you want to have forms that just by default render, I don't know, using your your fancy you know CSS framework that you've you've got.
You can create the templates to match that framework.
Well, the those defaults like around template forms, those are very confusing to newcomers.
That's something that I have like a paragraph to to sort of say, hey, this is this is just a part of Django that you need to know why does dash whatever you know dash p work.
Yeah.
Um so that's
but I mean so revisit
that to make sure I'm accurate for 4.0.
Yeah, yeah.
So I mean that ideally you'd s people would stop using as table, as um as p, uh as UL.
And what what they use instead of
Well, because now you would just put it in the view, right?
You would just historically you would change
you just use the string render.
So you know you've got uh double under string, the string method, where you you would just output the form, and that that's always proxied to the as table.
It's always the same output as table by default.
But if you wanted to customize that, you would just customize the default template, you'd overwrite the default template to have how you want the form to appear.
And then instead of going in your template, curly bracket, curly bracket, form dot as p, you just go form, and then you you just however whatever the default string out uh representation of the form is, it would render the template that you've configured for your project.
And then those methods they can eventually be deprecated more because there's accessibility problems with yeah, you know, and it like um the the p element in um HTML, it's not allowed to have other block level elements inside it.
It's it's just not valid HTML.
Yeah, so every time you're using as p, you're outputting invalid HTML.
It's not a great thing, and then there's there's accessibility issues with tables and uh these kind of things.
Then we can make we can try and make those those um templates that better, but ideally, you kind of craft your your this is how I want forms to look in my project, and you know, it'd be very easy for a third-party package to just come along and say, look, and here's some form, this is a default form template for you know tailwind or for bootstrap or for you know, well
that sounds like something I should um I'm gonna play around with that and maybe have a tutorial or two for 4.0.
So anyway, that was the 4.0.
There's loads in four point.
It's another, it's to be honest, it's another massive release.
They just keep coming.
The the community is amazing, and it it it it literally you think oh, you know, there won't be much for the next one.
And then there's just this huge list of awesome features, plus a billion bug fixes, plus, and it just works.
And you know, you update pip install dash u Django Py test to go five minutes later, you're like, Oh, it passes, deployed, and it's you know, Django's just amazing, and yet another blinding release.
Yeah, well, and Python's still taking over the world.
I think um it's officially or pretty close to officially the most used language now.
I saw
that it's gonna take over C and um it's incredible.
Yeah, so you know, well, wait for it.
When 4.0 comes out, I'll send you the Hacker News link saying, oh wow, Django, Django's still a thing.
Like, I know you love the
I know you love the Hacker News and the Reddit conversations about Django.
Just like what
um, don't even get me started.
But like you get down to like comment two, and it's like why why aren't they using why aren't they using js framework hotness of the week.com?
Well, I just don't know what the what the current default hotness is, because back in my day it was Rails, and then is it expressed like it's
still it's still Rails.
It's not fast API, like what is it?
It's still Rails, and it's still Django, you know, because if you you know in the real world, away from Hacker News, away from Reddit, in the real world, you like it's these these mature frameworks.
And then the exciting one in the Python world is fast API.
Lots of people are using Fast API, and that's super, and that's great, and that's that's awesome.
Um, and then Flask has just done a big update, and so you know, so that's I mean it's a really vibrant time in the Python ecosystem, but that's a different question from you know these threads on you know.
Yeah, well, boot boot camps.
I mean, just as a quick aside, I mean there was um yeah, let's go into this.
So boot camps are struggling.
Um you know Team Treehouse is having some problems, uh, among others.
But there remains, I think of this because I teach, you know, there remains this problem of how do you get people into coding?
And it's just hard.
I think at the end of the day, there's only so many people who can pay out of pocket and have the time to teach themselves.
You need, even if you had the perfect curriculum, people need a company to sponsor them.
They need to be able to take out in the United States, take out loans to go study this stuff.
It's just a really hard tr problem, and there's not that many people who can pay $30 a month and get very far.
And so all these companies, you see, if they take outside funding, which they usually do, they veer towards being internal training tools for corporations who say, you know, General Electric says, let's skill up a thousand people to be engineers as opposed to something else.
Um, and it's so it's a it's a hard nut to crack.
Um there's free code camp which is amazing, and then there's kind of nothing else as I see it out there.
So if anyone has any answers, that's something I think about a lot.
How do you I you know, aside from saying you just need to keep it small, keep it solo, keep it sustainable, and over time provide these materials.
Um and then what do they teach?
You know, no, I don't know of boot camps that teach Django.
Maybe they teach Flask.
I still think they're all JavaScript-y 12-week things.
You you know, you have a CRUD JavaScript app and then you're released into the wild and it's kind of sync or swim.
Yeah.
I think the point you made about like people not having the capacity to teach themselves, like, because it takes ages, right?
It takes it just takes you gotta have so much time to sit at the keyboard being confused that very few people have that time and they're they're all the same demographic, and that ties back to the contribution problems we were talking about.
Well, right, that's that's the Coursera and all these places, you know, where people are taking 100,000 people signed up for a master's course on AI, and it's like, yeah, well, they already all have a master's and went to Stanford.
You know, it's that's not the anyway.
Anyways, as an aside, that that was unfortunate.
I don't like to see ed tech companies not do well, um, but so be it.
Um button.
What else is that you mentioned?
So button's button.
Yeah, so button still sign up for easy to play.
Yeah, that's coming.
That's um it's always it's been coming forever, but this juggling balls and um COVID issue.
So that's been that's coming on really well.
It's it's it's coming together really nicely.
I've got the first users on board um at Solo and Team, you know, starting to play with it and make sure the edges are right.
Works just as I it's it's you know, it's a it's a principle, keep it simple, it's you know a guide, how to, it's a community of people doing it the same way, and it's it's some tooling.
Um, and it the question is just my capacity to put it out.
And because I I'm not super, you know, I'm not um funded to do that, it's very much what I can fit in in the space around you know, fellowing, around other work, around my children, around my you know, family, around all those things.
So it's gone slower than I would imagine, but then you know, everything's gone slower than I would imagine.
So I'm still I'm I'm really happy, I'm really excited.
It's coming very soon, you know, very soon in in real terms, like you know, over the next period.
Um and yeah, I I I the people I've got using it are are saying, yeah, you've thought of everything that I that I'm concerned about, right?
And that's what's nice, is it it's not, you know, that's what you that's what I set out to do.
That's what I said out to do, because it's not it's not you know, if you're already an ops expert, it's not for you.
It might be for the people you're provisioning for, right?
Instead of you, you know, building this platform for them to be able to provision on, you might just be, hey, just use button.
But if you're already an op expert, it's not for you.
But if you're not interested in all that or you haven't got the time to learn it or whatever, then you know, maybe it'll be an option.
So that I'm quite pleased.
It's coming.
Yeah.
Well, and it's something you you can't get wrong.
I mean, if someone's deployment doesn't work, that's a real problem.
It's not it's not a typo in documentation, it's you know, yeah, the bar is a bit higher with your project than
yeah, and also I want to be able I want it to be easy to use, right?
So there's no point having a simple deployment that's just as hard to use as a hard one.
And so it's gotta be, you know, you might as well just use the hard deployment then, you know.
I don't want to give you yet another command line thing where it's horrible and you've got to remember these in incantations, and if you can't get if you don't get the incantations wrong, it gives you an opaque error.
I don't want that.
Um and so okay, if it take if it if it's taken a little while because of COVID and because of you know life stresses, then that's totally fine.
That's totally fine.
But it's yeah, it's it's
well that's exciting.
I'm ready, I'm ready for it.
When you when you're ready, I'm
Will, I'm so ready for it.
Like it's so it's so like just like oh, I just want to get this stuff done.
But you know, life has had other things to say over the last couple of years.
So that's okay.
Slowly, slowly catching monkey.
It's it's it's it's it's long haul bootstrapper, not VC, you know, fancy.
So, you know.
Yeah.
Well, every time I update my books, I spend more than half my time on Heroku and Sungrid, which are the only two things I haven't been able to strip out, and it's just a pain.
So I would love for you know something similar.
Okay, so well, hopefully when you're rewriting for the 4.0 versions, we've got uh we've got something for you to point to.
You think well by December?
Yeah, you think
maybe I'm there like it's all works, it's all that.
We don't need to set time for it.
I'm ready with I've just literally got to wrap up the bits in an order that I can deliver them.
So you know, I've I'm I'm I'm so bored of having inventory sat on the shelf with it that it's coming and it's just a question of how I can wrap it up in the nicest way.
That's all.
Yeah.
Well, on my end, I have finally, in some earnestness, started a Python book, which is sort of when I get flustered in my Django stuff.
So this is I've been talking about it to myself and to a couple other people for a long time.
And I've I bought the domain name, so it's gonna happen, right?
I I spent the $12.
Yeah, yeah, there you are.
There you are.
I bought a domain name, job done.
It's a it's official.
It's like that self-part thing, buy a domain name, profit, what's B.
Yeah, collect underpants.
Um, but it's it's actually it's really fun.
It's really fun to write something new.
Um, I love doing the Django books, but they they first came out three years ago, I think.
Um so it's a different thing to rewrite them as opposed to something new.
And you know, there there's so many good Python books out there.
I mean, Eric Mathis's Python Crash Course, for example, is a fantastic book.
So I'm having to think a lot about like, well, what would I do that's different?
Yeah, you know, besides my voice.
Um, so there's you know, I'll I'll talk about it when I have stuff to talk about, but it's been very fun for me to do.
It's been educational just to go and revisit to think about what level to introduce things, how can you incorporate projects and maybe multi-step, you know.
So you have a mad libs, and then that's a basic thing with variables and strings, but then maybe you can add in functions and logic, and you know, how do you make it a a progression for people?
Um so that's a fun project, and I I can't put a timetable on it, but I'm excited to have something else to work with.
Yeah, no, that sounds really exciting.
I mean, I think the um Python crash course and then the other one is automate the boring stuff, right?
I mean I think those that those are the two.
Yeah, Al's book.
Those are the two
that those are the two.
Canonical if you're sort of looking at them and saying, well, well, what different can I offer?
Then that you know that's an interesting that's an interesting thing to be thinking, I think.
Yeah, and then you know when you get more advanced, there's um you know Fluent Python is among the best.
And I think he's got it, he's got an update coming out soon.
Yeah, I'm so excited
about it.
That's an amazing, he's been working on it.
That's an amazing, you know, next tier book.
Um, so I'm really interested to see.
So it would yeah.
The one there's a lot out there.
Um but anyways, it's giving me an excuse to buy even more Python books and you know see what I like and don't like and how it's presented.
And yeah, uh, the one I picked up um recently was David Beasy's done uh um Python Distilled, um, which is just it's just
I know who he is, I didn't realize he had yeah.
So he did the Python essential reference years ago and was it sort of updating it, and I think over the course of it being updated it became this Python distilled.
Um so you know, if you if you look at it,
Oh, because he does all the compiler course.
Yeah, it's really amazing stuff.
And he he he dogs on typing the whole time, so you know I'd like to get him on and see if he'll talk to us about it.
Not Python typing, typing.
Oh, typing.
Wow.
That just came out like a couple days ago.
As ever, Carlton.
You're you're an aspiration to me, so um anyways, I think that's it.
We have um right, is there anything else beyond we have uh a whole number of guests scheduled?
Yeah, um so it won't just be us yammering on, it'll be
I like it when we yammer on.
We haven't yammered on in private for ages.
Yeah, that's true.
And you know what?
We don't have any sponsors, so yeah,
we'll be our show, we do what we like.
Um what was I gonna say?
Uh did I did I mention to people to download the 4.0 alpha and test against their code?
Did I mention
you should.
That'll be the top link.
Please do that if you're listening.
Um that's very important.
And yeah, and thank thank you for mentioning the the Redis survey thing.
This is a small thing, but honestly, that's exactly the example of like it's hours and hours of time kind of in the dark, and just just knowing that makes me feel justified in all the time on the the two surveys because I didn't really know that it did much.
Yeah, no, I I think frankly, no, but uh
to a new board member next year.
When we have a new board saying, get you know, Anna and I have a list of things saying, okay, there's a number of things we're doing now, and um, you know, that's one of them.
I think it'd be better to have someone fresh, but also yeah, it is helpful.
I mean, if if as you've done it, you can outline the steps that are involved, and at least then you've got that how-to, which is the you know, who's gonna volunteer to do this, you know.
Right.
Well, and you know, Tim Graham had the had done the last one six five, six years before, and so the one last year was a Google form.
I got a lot of feedback from you and Marius and Jeff and some others.
And then this year it was quite a bit easier.
There were still 20% new, and then we remove some things.
So I think we it's already in a re refining stage, which I think is an easier place, but a better place.
Um, and uh um with this AI component that um jet brains have, the kind of long form answers we can decipher that, we can do a lot more than just check the box.
Okay.
So I'm interested to see because that's because that's what they do with the Python survey, they're able to do stuff around that.
So they had a number of questions around tooling and other things, um, and they can we will see, but they say they can you know analyze that in a way that obviously a
Google Forum cannot nice I mean, you know, they've already got that capacity, but it's nice for them to lend that capacity to help, you know, us and maybe they do it with other projects.
And they're the biggest um sponsor to Django.
And actually, one thing for next year, actually this is an important point, um uh translations.
So we didn't have time this year to translate the survey, but that's something I really want to do for next year.
And I think we'll have the time so that we can put it out there in either JetBrains or we can ask the community to translate it so it's available in um other languages, not just English.
Okay, let's call it quiz.
Lovely to see you, Carlton.
Congratulations to you and Marius on 4.0.
Yeah, well that's my name, Mario.
Congratulations, Marius.
He's he's he's uh been driving that.
As ever, DjangoChat.com, chat Django on Twitter, and we'll see everyone in two weeks.
Yeah, join us next time.
Bye.
Bye-bye.