Django Chat

Fall 2024 Podcast Relaunch

Episode Summary

We’re back! This mini-episode starts off the fall season and focuses on what’s new in Django, upcoming DjangoCon US talks, our thoughts on the User model, Carlton’s new Stack Report newsletter, mentoring mentors, and more.

Episode Notes

Episode Transcription

Unknown Speaker 0:00
Music.

Carlton Gibson 0:06
Hello folks, welcome to another episode of Django chat. We're back after a long summer break. Now. Don't get excited. This isn't a real episode. This is just me, and will warming up for the season. So will. How are you?

Will Vincent 0:15
Hi, Carlton, I'm good. I'm happy to be back. Yeah. This will be we're going to update everyone on various things in the Django world and that we've been up to. And the next episode, which will be in two weeks, we have actually no next week, excuse me. Right before DjangoCon, we have the two Django fellows, Sarah Boyce and Natalia Bidart. So stay tuned for that, but this is just a special. Get back into an episode and update everyone, because we have been off for the summer. So DjangoCon, we're both giving DjangoCon us, which is happening in Durham in a couple weeks. Tell us about your talk. You gave a version of it at DjangoCon Europe.

Carlton Gibson 0:52
It's the same talk I gave at DjangoCon Europe, but it's compressed slightly, because the time slots at DjangoCon us are just much tighter. And I got done with this a couple of years ago when we just, well, I'll just give my same talk. Went nicely at junk on Europe. And then I was like, Oh no, Caleb gorkons holding up the like, what I got more than 10 minutes. So I've got a, yeah, you

Will Vincent 1:14
were like, 2x speed on, on, remember? So I wonder what I do

Carlton Gibson 1:18
have to tighten my talk, you know, a little bit. I have to drop various bits, or just, you know, skip past them quickly, and when I do it in Durham, but, yeah, so it's this idea about API. Maybe, do you do you need an API? So I've started building my new application parts, which is what I'm working on. You know, since stepping down as a fellow and we've been using Django and HTML and Django template partials and, you know, Alpine js. And a year and a half in, we've got a rich application. It's, it's kind of coming to maturity now, and we've hardly got an API endpoint in sight. There are one or two just there, but it's, it's a whole world different than before. I started the fellow where I was working on rest framework. And in those days it was those days it was API first, or API only, right?

Will Vincent 2:05
That's how you started with Django, right? Was via. Dr, yeah, so,

Carlton Gibson 2:09
and it's just a matter in the talk is essentially about that change between the world of 2018 say, when I started following those API first to the world of 2023 24 where it's API, maybe,

Will Vincent 2:24
and that's the idea. I mean, if you need a dedicated native app, you still need an API, but if you just want a rich web experience, well, not necessarily, but in general,

Carlton Gibson 2:31
yeah, no. I mean, yes, you'd still going to build the API endpoints for a swift integration, or a Kotlin integration for Android, definitely,

Will Vincent 2:40
right? And you've been, I mean, before starting on paths your own button deployment, you, you did a bunch of work with Swift, yeah, no. I mean, this is, this is a very recent switch for Yeah. I mean, this is not like you've been doing this for a long time. You were API first recently. I

Carlton Gibson 2:57
mean, I'm so I'm still building that. I'm still using button myself. I just never i, because my son was ill last year, I missed my window to get it shipped. And so it's a bit like, Okay, where do I now find a chunk of time to take that from works on my machine to productized, which is, you know, that big step,

Will Vincent 3:12
but, but, but that has a big Swift, yeah, no, I

Carlton Gibson 3:15
mean, so I'm building, you know, I use a Mac. I'm, you know, it's swift UI is the Mac development environment that you use these days. And it's, it's lovely, and it's nice. And yeah, so, but yeah, so I was Yeah, and that was only six months a year before embarking on paths, but it came to be the case that it's like, okay, we need to get this shipped in very tight times, schedules. What's the most realistic way to do that? And the htmx, Alpine, HTML first approach was literally the only way that, with the budget and the time constraints we had, that it could be done, because it literally it's only me on the development side. And so it's not like it was before. It was always like, you know, you'd have a back, back end developers, you'd have a front end team, and you'd sort of, but you're, you girls, no, but we didn't have the budget for that multi team, multi disciplinary thing. And yet, you know, we're producing an app, which is, it's quite rich, it's quite nice. And, you know, we get the we get the clients. Oh, that's good. Oh, that's great. Oh, that's and it's like, okay, yeah, that's all doable without this need for these much more elaborate tool sets. Which is, which is fantastic, I think. And

Will Vincent 4:33
that's one of the biggest questions I get with my Django for APIs book, is people saying, Should I, you know, should I do this for my solo project? And I almost always say, if it's just, you know, like you can build to that, but just start with, start with a team, htmx At this point, yeah, there's no need to go native, unless you have to, and unless you have an existing team. If you

Carlton Gibson 4:54
can already build a UI in whatever framework, if you know, if you. You're already an Android expert, you're already an iOS expert, or you're already a React expert, then why not build the back end? That just ties into that. But if you're having to learn two tool sets at the same time, no, no, no, no, no, no, no, just not,

Will Vincent 5:19
we're all full stack, yeah, well,

Carlton Gibson 5:20
right. There's this idea that full stack, the the native app, was this glowing, this glowing Castle, this Disney like Castle, you know, the princess castle. And then the full stack is like a sort of shed held together by,

Will Vincent 5:35
yeah, I mean, it is interesting to try to take a step back, I don't know, 510, years, it used to be that you just couldn't build anything interactive that was any good without going API first, right? I mean, it's, it's sort of, I don't know if it's snuck up on people, but I mean, htmx, you know, we've had Carson on the show. I mean, that technology has been around for a while, so I don't know if it's confluence of alpine js or just general frustration with what kind of react and Android are doing. They're becoming, you know, they're almost trying to become full stack frameworks themselves, where there's this, you know, the pendulum has definitely swung. Okay,

Carlton Gibson 6:10
so I think on a technical point of view, from the technical side, the web native DOM got good in the interfering period. So there was this golden age where you just sprinkle on some jQuery and you could build anything you wanted. It was just like, you know, build my website, sprinkle on some J few lines of jQuery, and, you know, copy and paste it from plugins galore, you it was just, it was glorious. And then it just got ever more complex, because ever more things wanted to happen, and native DOM manipulations were terribly slow and

Will Vincent 6:45
jump that's the point of React

Carlton Gibson 6:47
was, yeah, virtual DOM and the diffing of the Dom It was all about. It turns out that the browsers got faster and DOM manipulations are weaker now than virtual DOM manipulation, so you might as well just do it natively in the browser. The browser's caught up, and they, in fact, got in front of the virtual Don diffing technique.

Will Vincent 7:10
And so I hope that's in your time. No, no, I

Carlton Gibson 7:13
haven't got time for that in my talk.

Will Vincent 7:18
All right. Well, won't give away too much.

Carlton Gibson 7:20
I can't and I'm not going to apply. But DjangoCon, US does have these 45 minute time slots. But I couldn't apply for one of those. I couldn't have 45 minute talk. That's crazy.

Will Vincent 7:30
Yeah, I think my 40 I did one two years ago, a 45 minute one. I've done a couple of 45 minute ones. I think those days are behind me. I'm also, I think we're back to back on Wednesday. We're both doing 2025

Carlton Gibson 7:39
there's a Django chat hour near the end on Wednesday afternoon.

Will Vincent 7:44
Yeah, so kudos to those of you who do, and maybe, maybe sometime again. But it is. It's sort of like a marathon versus a half marathon. It's not twice the effort to do twice the amount of time. It's at least four times as much effort. Because, you know, 25 minutes, I don't know you sort of introduce it, talk about it, the time's done, but 4045 minutes, you're up there for a while,

Carlton Gibson 8:05
time to show what you don't know in 45 minutes, what is what are you talking about? If you only doing 20 minutes?

Will Vincent 8:12
Yeah, so I'm doing a talk that I gave at Django Boston back in February. I think Django Boston has started up again, and they asked me if I would do an inaugural or re inaugural talk. So I said, Okay, so this is on Django user model, which also I feel like has had a lot of movement and momentum just in the the zeitgeist. So Django is user model, past, present and future is the discussion. And I realized that until I did this talk, I didn't really know the full history of user because I came to Django in 2012 and actually 2012 was about the time the first there's a whole wiki that Russell Keith Magee put together about all these decisions around we should do something about the user model from back when Django first started. And so the talk talks about how we got to where we are now, where we can all agree username is a little bit outdated. Maybe we want email. We have Django all off, we know. So I'll go through what I think are the current patterns user profile, and then I can talk about the future, which is kind of exciting. You just published this magnum opus on stack report all about your thoughts on user model, and definitely I've been influenced by you over time. So it's all about user model, kind of how it's developed, where we are now, and give some context for discussions that are happening now around we really probably should do something about simplifying it. And it basically comes down to custom user models were introduced to solve a problem, but it means that now authentication and authorization, if you will, or permissions are conflated, and that has a performance tax, it has a complexity tax, and it's just Ick. When I'm teaching people that, I have to say, here's the user model, and then I have to go, oh, wait a second, you need this custom user model. What's that? Oh, and then there's also a custom user or a user profile model. So. It's a bit of a mess. Most web frameworks just give you off and off you go. And so I think it's a little bit of Django being it's so customizable, which is why we stay with it and love it, but it is off putting to beginners. So anyways, and you've made some moves around in core, maybe we can actually do something here, around updating user which I know is it's one of the blasphemies. Well,

Carlton Gibson 10:23
it's, it goes against the stock advice. The stock advice is, you should be have a user, custom user model, and, you know, and that's just, that's just what the docs say. And I don't agree that. I never really agree that I've never used a custom user model. I've never felt the need for it. And at the beginning it was all about for me, it was all about logging my email. But there are ways around that. And I think what we the discussion back in the day went largely it's not feasible to migrate the user model, and so we need some other solution, and custom user models are the option. Now, I think we gave up too early on that. And by doing that, we created this kind of world of complexity that, and this world of complexity, particularly for new users, where they come in and they they're going along. And either the

Will Vincent 11:11
established ones, you have your pattern, you just do it, how you do it, but a new person's like, what do I do? It's like, Well,

Carlton Gibson 11:16
yeah. And the thing that we see all the time is people start off and they start with auth, dot user, and then they find these warnings when they've leveled up a bit, but they're already, like, several months into their project, and I've got to restart from scratch, and it's just, no, you're totally fine. Don't worry this. The projects using orthodies Are Legion, and they don't nothing bad happens to them, right? But I think we I put out a project early in the year called Django unique user email, which just shows how you can do a kind of bolt on migration to the user model, and all of a sudden you've got unique emails. And then you can do login by email. And I want to do one about the profile fields, like the first name and last name fields, which are bit icky. And we should, we should try and you we can just kind of get rid of those as well. And you know, if people wanted to while we're in, while we're while we've opened it up, we can. And people then give people the option to toggle on or off username or email. You know, because you don't necessarily need login by both. I like login by both, but some people just want email only. And all has to do this kind of trick where it populates the username field behind the scenes with a unique identifier, which is fine, but if that field just kind of could kind of disappear, that would be even better. But then the idea would be to pull those credentials off of the user model and allow them to say, Well, what about GitHub logging? And what about Microsoft? You know, my Microsoft org login from my work, and what about, I don't know sesame login, where I get a unit login code and have different credentials, more different ways, tying in with things like the touch ID on your computer, or the face ID on your phone, or all these things which nobody even imagined back when Django was born, right?

Will Vincent 12:55
And then you know the fact that two factor auth is a third party package, which I think people like but again, that feels like something that should be 2024,

Carlton Gibson 13:04
having a there should be some story, visual version. Back to Roth in Django, there were batteries included, right? And that's that's pretty bad,

Will Vincent 13:12
right, right, right. Less magic, more batteries. So anyway, so the talk will be about that your post is already out there that that's great, because that gives me something to point to for the future, and I sort of go into the history in the present a bit more. Nothing's

Carlton Gibson 13:26
going to change quickly here, right? This isn't like, Oh, we're going to suddenly, because we've got to do it in a backwards compatible way. We've got to get consensus. But I

Will Vincent 13:33
think this is important context for people to know who are new or intermediate to Django, because in practice, I mean, there's a lot of people I know who use custom user models loaded up, and they're fine with it, you know. So that's, but it's, it's one of these things that, when I gave the talk the One Two years ago, which was sort of this, in a way, my magnum opus of like, here's all of Django, I tried to point out, you know, cover every area. Be like, this is one where there's differences of opinion, and the difference is, sometimes it matters and sometimes it doesn't. This is one where you just need to pick one and stick with it. But unfortunately, we have a good half dozen areas around where someone who's new has to just pick something, and it can be confusing, because this one, you can do it both ways right now, and it's fine, but there's some other decisions you can make that will hurt you in the long term that you want to get those choose your own adventure. Yeah. Anyway, so I'm looking forward to that, and we're going to be back to back, I believe, on Wednesday of DjangoCon in the afternoon. So

Carlton Gibson 14:37
anyway, so speaking of giving people you know who got to choose their own adventure. The advice they need. You've got the books. Got an update, right? You've got the fifth edition? Yes,

Will Vincent 14:46
fine, yes, yeah, yeah. Fifth Edition of the Django for beginners book, so it's 5.0 plus compatible, has a real cover. I updated, I added a whole nother project, so I dove more into template. Con. Text, which I, I felt like was kind of missing. There's a lot more on function based views. So I show both function based I actually start with function based views, add in class based views. We do some projects with both, and then I go purely class based views for the last the last one. But I really wanted to get across function based views, because people see that it's important to understand. I think it's a little easier to teach with it. Understand how the request object and the context work together. So there's so it's expanded, it's updated. I'm happy with it. I'm still gonna get need to update the APIs and professionals books. But anyways, that's out, and the main thing I've been working on is this learnjango.com where I'm going to have all my stuff online. You can get free, premium versions. You can sign up for an account right now, actually, if you want, it doesn't do anything, per se, but you're in the system. But username, yeah, reserve a username. I can't put a date on it, but certainly by this fall, if not certainly by this fall, it will be out with the courses on there, and then I have updates. I have an E commerce course that I've been building alongside building my own building this out. So that's one that will come out. Oh God, I hope it comes out by the end of the year. But it has basic payments, how to do subscriptions, how to build a shopping cart with sessions, how to build a store with a database. So in the way I do it progressively four different projects, but I've learned a lot just building that because it's doing payments, is, you know, it's sort of not complicated, but it's also really icky, how people do it, and a lot of times there's a lot of JavaScript, which could just be done in a Django form. And so anyways, this is kind of the course I needed to feel comfortable building this out and doing it right in quotes. And I think it will help a lot of people, because there are e commerce courses out there, but to me, they just go, they're 10 hours long, and they go way in the weeds, and there's a lot of personal customization that doesn't need to be there. So this will be something that covers, you know, builds you up and shows you look. It's just have the product, do the payment? Do the web hook? You know, goes into web hooks. And I, I'm happy with how the web hooks portion is. It's not crazy confusing to me anymore, but I think web hooks, web hook sounds very scary at first. It is. So, anyway, so,

Carlton Gibson 17:22
so what? You know, you're too shy to say this, but I'm gonna say, like, what's when you say you're happy with it, that means it's gonna be, like, your absolute usual standard of great canonical reference to, right? Go back to time and again. Yes, this is just how I do it, right? It's gonna be exactly that. That's,

Will Vincent 17:38
that's the bar, right? Good, good, good. So, I mean, if I can understand it, then anyone can. So, yeah, so I have that plans for other things. I'm still doing the newsletter, Django news, newsletter with Jeff

Carlton Gibson 17:49
that's been going out every week.

Will Vincent 17:53
Yep, that's the number one Django newsletter, the only one. And you can sponsor that if you want. We have some sponsors both spots.

Carlton Gibson 18:01
We can have sponsors on the podcast as well. Well,

Will Vincent 18:05
we are, you know, maybe people notice we had, we had a sponsor in the spring mail trap. And then we have some sponsors coming up for the fall. And also ways on the website people can reach out. So, yeah, trying to cover costs a little bit. And so if it's something Django specific, you want to reach developers or companies

Carlton Gibson 18:27
audience, right? So, I mean, if you, if it's very targeted, yeah, this is, this is good for someone looking to reach the Django user base,

Will Vincent 18:36
yeah, yes, that's an option. It's on the website. What else? Oh, yeah. And then I guess the last thing's for me. And then we'll let you talk about your stuff. Also, I've updated so I have this awesome Django repo that I do with Jeff Triplett that's still, still maintaining, still curating, still growing. And then Django X repo, which is a starter project, a basic starter project, I've updated that to, I think I adapted that to 5.1 Yeah, just did that. So that sort of gets you started. And we've talked about, you know, there is a pipe dream of everyone thinks their own starter project is, like worthy of everyone else to use. But doing so is a requires a lot of steps. And you know, the ones that are out there, like Corey SAS Pegasus are an immense amount of work. So we shall see if anything more comes to that, because a lot of times, and I say that because people ask for more advanced things on Django X, and I have my own version of, you know what I use, but to take that and then have the docs and everything else required to make it user accessible is, is like a book worth of work. So I

Carlton Gibson 19:43
might, I understand, probably working in an agency, right? Who need to turn out projects regularly. So they need a call. You know? They need a project that they just, this is our SNAP, a rubber stamp. Here's the beginning project. They're all the same. We know exactly what. I understand all of that. What if I may start a project in general? Not saying yours or picking you on anyone in particular, but they just end up getting more and more and more things in them. So that when you create the starter project, there's so many files, so much to see, so much to do, that you can't really navigate it.

Will Vincent 20:12
I It's the under the understanding piece, and I get that. I mean, in every framework, there's some version of a SAS starter where someone says, I need to, you know, I have something I want to charge for, and I'll kind of backfill the understanding a little bit. I I definitely understand that. I guess I've always because I take a teaching first perspective, you know, I did Django X got six, seven years ago because Django cookie cutter, which is fantastic to me, was overwhelming. I mean, I think I only now mostly can wrap my head around it, and yet, rote beginners use it and but, you know, that's fine. They just want to get started, and they'll kind of learn that stuff later. But, yeah, anyway, so Django x is, is kind of where I where I'm at, and people who want more advanced things, I usually just say, you know, you can fork it and go for it. It's deliberately very minimal, but but gets you up and going

Carlton Gibson 21:05
like just what you need, no more, right? Rather than everything you could possibly have, which sometimes is a temporary until

Will Vincent 21:13
we have that master toggle in Django where you go from local to production. That's one of the other mythical

Carlton Gibson 21:19
thing, where you'll be able to do that. I don't know if that's ever gonna happen, but, yeah, who knows? Okay,

Will Vincent 21:24
all right, so, Carlton, so you so let's start with stack reports. This is this new newsletter you've Yeah, you've been doing,

Carlton Gibson 21:30
yeah. So it's about, I'm about five months in something like that, so I decided to just try something slightly different. And so what it is, is the monthly email. It's long form. So it's like, you know, it's a bit of an effort to write and it's a bit of an effort to read, but it's, you know, it's slightly deeper than just the shorter blog post type, type content. So it's a long form essay on, you know, everything to do with software development or Django or whatever. Done, estimating locality, behavior, growing your business logic in Django, the user model we did, did this month. Other ones, other topics will, will come. I've got ideas for what it means to be batteries included. Where we take, take that for Django. I've got lots of ideas about what, what over engineering means. There's a kind of nice little we was talking Django, about batteries, about using boring technology, right? This idea about boring technology in the known tech. And there's a, there's a counterpoint to that from some of the, you know, let's call them big brains in the community who that they kind of think of it as a sort of anti intellectualism, almost. And so there's this, this, there's this really interesting trade off between, you know, what? We've on the show talked about using boring tech and the money stack and all these, these things that we like, versus, well, hang on, but what is that? Is that sort of Luddite ism? Is that holding back progress or and how you trade those two off? And I've got views and, you know, I've obviously got tape, because I'm constantly experimenting with new things, but do I wheel them into production first date, no, I don't. So, you know, maybe I'll do an essay.

Will Vincent 23:05
This is, I mean, this is, this is a very distilled, you know, your decades of experience, time as a Django fellow, and your deep thoughts, but well laid out. And, yeah, they're sort of essay, you know. And I suspect for you, I mean, Tom Christie has a number of essays he wrote back in the day that, you know, he you referred to as heat, death of the universe. And this is, to me, this is kind of your version of that, right? This is sitting up and saying, Okay, I have thoughts on these things. And let me, let me present them. And as nuanced a way I can invaluable. I mean, even for me, who, if I need to, I can ping Carlton, you know, this is him, like, distilling it, right? It's like him putting some thought into it, and be like, Okay, this is my thought on that.

Carlton Gibson 23:49
But, yeah, no, I mean, so it's more considered, it's deeper, and it's a premium thing. So that, like I've asked people to pay for either five bucks a month or 50 bucks a year. You can get two apps at two issues free. And I thought about that, everyone was always, I'll do GitHub sponsors, like and I kind of, yeah, okay, I like GitHub sponsors, but you don't really get anything for it, and there's no incentive for anyone to do it. So I'm like, Okay, let's call it. It's exactly the same as GitHub sponsors, but you'll get, you know, my condensed thoughts, and there's two or three free issues, and I might keep make the odd one free of its more wider usage, but most of the issues will be to premium subscribers only. And it's just a kind of way of saying, you know, if you like the work that I do on my open source on Django and the other open source projects in the Django community, if you want to help support, you know, me being on the podcast all the time, then, you know, take up a subscription to the stack report, and that's, you know, your way of feeding back. And you'll get, you know, my Considered Opinions after all these years of software engineering. So that's that's going well, not a billion sign ups by any, any measure. But, you know, people are signing up, and they're being very. Be nice about it. So that's, that's good,

Will Vincent 25:03
yeah, well, and it's material, right? I mean, a certain point, it just helps sometimes to be like, You know what? There is some money coming in when you're sitting there, like, do I take that extra time on, you know, it sort of pushes out the burnout of open source. And then, of course, it's also a nice impetus for to take the time to really condense your thoughts where, you know, I certainly have this. I probably over index on just pumping out a free tutorial when it's like, well, but I really should be doing a paid thing, right? There's a there's a balance there. So at least having something that's in the paid bucket is important for longevity. But

Carlton Gibson 25:37
yeah, and it's making a commitment to myself and making a commitment to my subscribers that I'll turn up each month and write that thing. So they've been literally meaning to write this thing about about where to put your business logic in January, four years or more, four or five years, however long it was. And I finally got down to doing it. And it's only because I said, Right, okay, I'm going to make this commitment to write this longer piece once a month, at the end of the month every month. And, you know, allow people to subscribe if they're interested in that, so that it's, I'm really enjoying it. People are being very complimentary. They're enjoying the same they're enjoying the reading it. And so I'm happy, and that's good. And then beyond that, what have I been doing? I've been working on Neapolitan, which is my quick card views of Django. They've been going very well. What can I say? I'm they've utterly changed the way I write Django. It's not just neopolton. It's the combination of neoporton with HTML x with Django template partials, which is the other package I've been working on. But they've, I've hardly used a built in class based view. One of the generic built Django is built in generic class based views. I've hardly used those at all. I might use a simple template view. I might write a view subclass myself. But basically, beyond that, it's all Neapolitan, and it's just like, Ah, this is what I wanted. And the bottom line is, like, you write a list view because you want to list your bookmarks. Then you write a detail view, and then you write a create view, and then you write an update view, and then you write a delete view. And they're all just they all use the same get query set, they all use the same filter into the current user. And you end up having to either put that into a mixing or reduplicate it across all the classes. Whereas with Neapolitan, you've got that get query, set method in one place, and then as you grow but maybe you think, Oh, I'll spin this little bit off into a separate view, or I'll spin that off into a separate view. But it gives you what I really like about it. It gives me this kind of workspace where I can just bash stuff out. And can be horrible. It could be, you know, when you were first writing something, I got no idea what it's going to look like, so just do it all in the view, and then view, and then think, oh, no, I can move that into the view, into the form, and that would tidy that up. Okay, move that into a manager method. But that first pass, I know it's all contained within this, this, this namespace of the of the crud view, and it's like, brilliant. I'm going to keep it all in there until I see the patterns emerge. And that I've just found so powerful and so empowering and so enjoyable. Well, maybe

Will Vincent 28:04
that's the next post after your logic. One is just to put some, put some code on it and be like, you know, here we go. Yeah,

Carlton Gibson 28:12
yeah. I mean, maybe, I mean, it's always really embarrassing showing the first, that first pass where it's literally, I just,

Will Vincent 28:18
I've been putting out code since I was pre noob. I mean, it's just, I think it's okay.

Carlton Gibson 28:24
No, yeah. I mean, I get that and, you know, the business logic post, I gave a good example of where you start something in in the view, and then you move it into the form, and then you move it into a manager method, and then, yeah, maybe pull it off your managers because you need a service leg, because you're that advanced. I mean,

Will Vincent 28:41
you know, that's like the advanced version of my Django, Hello World, five ways. It's like logic five, six ways, which, yeah, I still think that's, I still need to figure out what to do with that post or make a video or because if you can, you know, it's like, if you can understand that around Hello world, then you really understand how views and templates and URLs work together in the same way that, if you can move the logic around with some fluidity, it just opens up seeing Django as this defined thing that you can manipulate, as opposed to this unknowable blob that it can definitely feel like for people.

Carlton Gibson 29:17
And we spend a lot of time arguing about like, you know, have these debates about function based versus class based views and things. But the bottom line is that the the actual underlying logic is, you know, mathematics isomorphic. It's the same logic, right? It's the same track, it's the same transformations that you've done. And so, the the wrapping you put on it, whether it's wrapped in a function based view or wrapped in a class that should fade away, that's irrelevant, right? But how to express that? I need more advanced. It's

Will Vincent 29:50
like the human wrapping, right? Because, I mean, it's not even, obviously the computer doesn't care, but Django doesn't care, like all these so many of these constructs are just, just. Us humans, you know, like, why do we have apps? Like, just because it's a little easier to to reason about, like, Django doesn't care. And the next one are excited. Yeah, some people don't use apps. You know, there, I said it. Some very senior people don't use apps.

Carlton Gibson 30:16
Well, I've quite gone to this, this single folder model where you just have everything in one

Will Vincent 30:20
there. You had the one up,

Carlton Gibson 30:21
yeah, no, but no. But exactly this is not like, just start with a single folder, make that folder the app, the project folder the app, and then put your models.py there, and it's like, okay, that grows an awful long way. And eventually you're like, Oh, do you know I will have a separate app for the CMS, which is nothing to do at all with my business logic, and you have your wagtail stuff in a separate app, which is then, if you want to extractable directly to a separate project. And you can, you know, wagtails got tooling for exporting your stuff and from one database and importing into another, and that that's all good, but this is why I'm excited by the for your Django for beginners, where you've brought in the function based views, because the web problem is about turning HTTP requests into HTTP responses. And if you can teach that to a beginner, then you can empower them with these more you know, with the class based views, which are more powerful that but they're they they're more powerful by obscuring some of what's going on underneath. And if they've got that understanding and bring them then they are a richer developer. And so you're giving them that,

Will Vincent 31:24
yeah, and I resisted this for a long time, but I think just the teaching component of it wins out. And so I tried to strike that balance.

Carlton Gibson 31:32
So anyway, the other thing I've been doing is template partials, which is this, yes, this is for use with HTML, and it gives you these reusable, named parts of your of your template. So say, you've got a list of bookmarks, and you want to just re render an individual bookmark, whether you can wrap the section, the just the section of that template in a partial, and then you could say, right, I want to, I just want to load that partial, and it's integrated with the template load, and it's been very well received. And it's, again, the combination of Neapolitan plus htmx plus template partials, the three of them together is kind of it's just such a rich combination that I'm just having massive fun with

Will Vincent 32:12
it now, yeah, might get into a future version. Yeah.

Carlton Gibson 32:17
So I'm hoping to get it into Django. So I've got, I'm working on the pull request now. Hopefully I'll get it in before this autumn, so we can get it in for 5.2 but if not, I'll definitely for 6.0 and it was just a template tag, basically, but it's that. It's the it's not just the template, it's the com, it's the integration with the template loader, so that you just add like a, you know, like an ang, a text fragment and identifier, fragment identifier on the end of a HTML, dot, HTML, hashtag, this header, which is the anchor, literally, go to the anchor. You just do that for the named partial to the template loader. And it goes, it fetches the template, and then it goes, Oh, that is that partial defined. And if it is, it will give you just that partial back. And so your view logic just remains unchanged, and it's wonderful. And it's, it's, yeah,

Will Vincent 33:03
simple views, simple views. I you know,

Carlton Gibson 33:06
good. Well, what you don't want to do is have to rewrite your view logic just to change the template. Basically, you want to just set the template name on the on the self. Template name equals this, and then the rest of it needs to be restrained, needs to be the same, and then a template view will return a template response which is delayed rendering and other nice niceties about it. But if you end up changing your view logic, you end up changing the response type as well, and it's like that's an awful lot of grief that you had to go into to to just use a partial rather than the full template. So template partials addresses that.

Will Vincent 33:47
So speaking of putting logic in projects, one thing I updated my Django all off tutorial, if anyone wants to check that out, because a mistake everyone makes, and for some reason it's not in the OAuth docs, is you need sites set up so time and time again, even I make that mistake of, you know, so sites is this? It's almost a historical thing at this point. I don't know how many people actually are running multiple websites off of Django project. Maybe we'll come out of the woodwork for that one, but it's there are these. Yeah, sites kind of crops up in sometimes interesting ways that you may not think of. And anyways, all off. That's one of the classic mistakes. If you're getting a funky error, I should probably just do a post on this. Is the error you're getting because you didn't add sites for olauth, yeah. Anyways, I'll do that. That's a common beginner. Even I wrote the auth tutorial years ago, and I was just trying to do it from scratch based on the docs. And I was like, God, what is that error? And then it was like, oh, yeah, that's, that's what that is anyways. That's what learning feels like. But I think the last thing is mentoring mentors, right? You have thoughts on this,

Carlton Gibson 34:53
yeah? So this auto I'm just an experiment. So I was thinking about the steering Council of elections that are coming up. Or not now that, but like after the five, after 5.2 So December, the end of the end of the year, kind of time, but that's when the 5.2 development cycle will start. No, that's what, that's when it will finish. So 5.2 will be released. So April, time, there's going to be an election for the for the steering counts, Django steering council for six point x, for the six point X cycle, 6.0 6.1 6.2 and last time, it didn't go well, because we didn't advertise it very well. We just had a big board election where we had like, 30 people stand, and that was too many, and everyone was a bit overwhelmed by the number of people. And so we didn't really advertise the steering council election. Then only four people stand stood, which wasn't enough, and it wasn't for five spots. And it's like, oh, so we it's like, can we beforehand, like, try and get some excitement about this so we actually get a decent panel of people running. And it's not just so there's one one aspect is getting more people. The other aspect is trying to get look at diversity. It's like, try and not just have white men, because as much as we're all great and whatnot, it would be nice to if the steering Council represented the Django community more widely. And then I was thinking about, okay, so what can we do about that? And what can we think about that? And how can we encourage people who aren't the usual demographic to stand but then I was thinking through maintainers, because it'd be nice. It is important. Steering Council has a technical role, right? So it's important that at least one or two or three members of it are actively involved in the maintenance of Django, because they do have to speak on technical questions. Now, I don't think all five need to be because it's good to have people like, you know, a commercial interest in Django. I run a I rang a Django shop, or I'm part of a Django shop, and we find this or, you know, I think people that are involved in the support side, so in the education side, so like, you know, writing books, or helping on the forum, or helping on the discord, or, you know, seeing the problems that come up, that's an important role on the steering council as well. So it's not just technical, but there is this kind of technical requirement for at least one or two members, say two, I think kind of two at the minimum. But then put those two thoughts together about diversity and the technical requirement, and you look through the package ecosystem, and it's mostly men doing the maintainers, and we have more non white men contributors through projects like Django notes. But what we're not seeing is that leading into, well, you know, actually, do you know what? Of the jazz band packages, half of them are maintained by, you know, women or half of them, half of the that's just not the case. We're nowhere near that. And so that's a real failing. And so I thought, Well, okay, maybe we could try and help prospective maintainers. So just for the the art for this, this next quarter coming up until the end of the year, I'm doing experiment. If it goes well, I'll carry on into the new year, going to put Thursday afternoons aside and be online and do my own maintenance and but be available, in case, either to be a support group for other maintainers. But more in mind, if you've in the Django community, being a maintainer kind of appeals to you. Well, maybe be able to give a bit of mentoring, a bit of advice on that. And most of it is, well, you know, maintaining is just contributing, but on an ongoing basis, right? It's but just to try and be available and try and see if having a kind of an office hour, a support group for maintainers, a bit of mentoring for prospective maintainers. See if we can move the needle. See if we can help some people make that jump from what I've contributed to Django or contributed to packages in the Django ecosystem to, oh, do you know what I could take this package on and as the hopefully we could get some people on board. But the other side of it is that packages are massively under maintained, right? So if you go through the jazz band packages, yes, they're still alive, but they're kind of on, you know, every eight months to do enough to get it updated to the next one. And not too many bit bug fixes get merged. Not too many things get done. Lots of projects are in kind of stasis, and that's okay, because they're very stable, they're mature. They do their thing. They don't necessarily need to grow. But if we were to find a way of smoothing the onwrap for maintainers, I think we can make a big difference to the sort of viability of the ecosystem, just not very much change. I feel like I've been banging this drum for years. But So

Will Vincent 39:20
how will people find out about these sessions? Where should they look to be?

Carlton Gibson 39:23
Well, that's a good question. I haven't quite decided. I only decided to do this over the last few days, and I'm going to start. It's only the next week or this week that I'll start. So

Will Vincent 39:34
we'll let people know in the podcast, the newsletter will let them know. You'll put a post out, but

Carlton Gibson 39:39
follow me on fosterdon. I'll probably hang around, say, on the Django discord, in the packages channel, because that seems like a good place for it. That's on the forum, but it's gonna it. You know, I don't know. I don't expect a billion people to turn up. If a billion people do turn up, I've got no chance of helping that, but I'll try and be online. Not try and be available to answer questions, and I'll try and do the odd post about, okay, so you want to be a maintainer. What does that mean? And just flesh out some content that I've had. Yeah, like thinking about that?

Will Vincent 40:11
Well, I know that we're gonna have Tim Schilling on this fall, and he's been very involved with jazz band, and also he has this Django commons where he's making moves around that, around the viability of main maintenance. So we'll Yes, let him speak more on that. But there are, it's a common problem. It's not a new problem out there. Yeah,

Carlton Gibson 40:30
my F, my efforts at mentoring maintainers may will end up under the Jang of Commons umbrella. That would be an obvious and perhaps Good, good place for it, like I had this workshop that I ran at the sprints several years to get started contributing to Django, I need that to become a freestanding thing, and that kind of that can't require me to be at the sprints to deliver it. So I need to put that into something which isn't just it's on a GitHub repo that I've got, but if that was part of the Django community, that somehow either Django Commons or jazz band or under the Django umbrella, it would be more like sustainable, more, yeah, maintainable, like you can't just rely on me, because, yeah, I'm here now and I'll be here for the the foreseeable future. But it needs, it needs some to be something that people can run themselves. And so, yeah, the bottom line is, well, it's an experiment. I don't know if I have the answers to, how do we smooth the on rope for maintainers, because the bottom line is, you asking people to give labor for free. And so the big, the big issue there is, can you

Will Vincent 41:36
right? As we've discussed, though, it comes with, if you're the maintainer of XYZ, it makes a lot easier to get hired to have, you know, be taken seriously. I mean, there are these other benefits to it, but it is, first and foremost, you're donating your time. And we do have this, these cohorts. Now there's two, think, two cohorts. The third one starting up with these Django knots, who've been doing things such as well doing adding to core, but also contributing to the Django news newsletter, like covering that new and Django section. And so there is this growing group of people who I hope are looking for that next step of ways to contribute to Django. So might, might be an on ramp into these other areas, but we can ask Sarah Boyce about that next week?

Carlton Gibson 42:21
Yes, I mean exactly that is a like, what? Okay, so what if I wanted to do more? What would I do? Well, okay, I'm in a position where I can answer that question. So, so we'll see. I don't know how it's going to go, but yeah, if you find me on Mastodon, or you find me on the discord, or you can send me an email, I'm not hard to track down. I don't know exactly, but more or less, I'll be online. Maybe I'll do a video called login to I know some people have done the kind of working Office Hours type working group thing online.

Will Vincent 42:53
Jeff Triplett has that on Fridays, and that's worked out, I think, really well. There's a group of a core group of people who show up, and it can vary in size, but it's, it's more than just Jeff, so

Carlton Gibson 43:04
yeah, and it's just to add a bit of camaraderie, if nothing else. Like sometimes, sometimes doing these things by yourself can feel lonely and well, okay, you know, there's no magic to it, necessarily. But you know, if you feel like you're not alone, it can help,

Will Vincent 43:19
all right, any anything else, or have we,

Carlton Gibson 43:23
I don't know. The kids went back to school today, finally. So I'm just like, last Yeah,

Will Vincent 43:28
last week for me, yeah, it's a, it's a, that's a big transition, which this has been fun. This is a, be a one off. We're generally going to have guests, and probably be a little bit tighter and more focused in our discussions, but this is what we've been up to. I'm excited to get you know. I'm excited to get Yeah, I'm excited for DjangoCon to see everyone. I'm excited to kind of get back into things and with the kids off at school again with a regular schedule. It definitely makes my schedule easier, and yours as well. So, yep, look, anyway,

Carlton Gibson 43:53
so we're basically Django chats back. We're going to do it again, yes,

Will Vincent 43:57
and so the plan is every two weeks until probably the summer, take the summer off, but we have lots of guests lined up, and I'm looking forward to it. Yeah, it helps. It helps us with community too, just to I know it helps people who listen, but just for us too, to talk to everyone and hear what they've been up to. And then sometimes you see a package, or you see really good work someone's doing, and it's like, well, who's, who's that person, right? What's, what's their story? So as ever, Django, chat.com, all the usual places, and we'll see everyone next week. Bye bye.

Carlton Gibson 44:26
Join us next time bye bye, you.