Emma is a longtime Django community member and newly elected member of the Django 6.x Steering Council. We discuss the future of Django, what it can learn from the Ember community, class-based views, django-ninja, and more.
This episode was brought to you by Buttondown, the easiest way to start, send, and grow your email newsletter. New customers can save 50% off their first year with Buttondown using the coupon code DJANGO.
Carlton Gibson 0:00
This episode is brought to you by ButtonDown, the easiest way to start send and grow your email newsletter.
Hi. Welcome to another episode of Django chat podcast on the Django web framework. I'm Carlton Gibson. Joined us ever by Will Vincent, hello, Will,
Will Vincent 0:15
Hi, Carlton.
Carlton Gibson 0:16
Hello. Will, today, we've got with us Emma Delescolle who's the author of The DRF schema attack adapter, the very classy Django classy docs, a long time Django community member and a newly elected member of the Django technical board for the upcoming six point X cycle. Emma, thank you for coming on the show. Thank you for joining us.
Emma Delescolle 0:33
Thank you Will and Carlton,
Will Vincent 0:35
well, I'll just let the two of you talk. Since you're both steering Council and in the hierarchy of things that's that's at
Carlton Gibson 0:41
the very top, you can bring us tea and biscuits and will, yes,
Will Vincent 0:45
yes. So yeah, we're
Emma Delescolle 0:47
diving directly into that, right? Well,
Will Vincent 0:50
maybe, maybe, let's just, let's just start with that. Like you. We just had elections for the six point X Django steering Council. This is the first time for both of you on the on the board. Maybe Emma to you. Why did you decide to run and I know you've written a lot about some of the issues Django has. So what are your goals for the board?
Emma Delescolle 1:13
Yeah, well, they these issues. I feel none of them are new. But for some reason there seems to be renewed energy in the Django community. Maybe a new influx of people. Definitely, Django nut space is helping with that. But there seems to be a renewed energy, and some people want to change things. So I feel that right now is the time to do it, and more so if we don't do it right now, maybe it will be too late, later. I
Will Vincent 1:49
agree. I think there is a lot of momentum in Django, which is refreshing, and at the same time the web space is changing right? There's fast API is gaining a lot of mindshare. There's flask is still there. There's new things. So as much as we all love Django, it needs some TLC to stay relevant and perhaps answer some of these big questions that are not new ones, but it feels like the community has been a little stuck on them. Yes, definitely. Carlton, what about you? You, you, you also ran, joined, well, we, well,
Carlton Gibson 2:25
as far as I could see, we all, more or less think the same thing, right? Dhango has done very well. And it's, it's, you know, 20 years old this year, and that's amazing. And then there's, but there, there is a kind of, I don't know, how can I? How would I phrase it? It seems like we're going going slightly slower every year, every every time we can just go slightly slow because we kind of accrete more mass, and there's more difficulty in doing new things. And then, exactly as Emma said, with the new community members coming in, there's a there's a push to try and shake loose some of the old craft, and exactly how we can do that is, I think, you know, that's what we're busy trying to work out right now, right? And
Will Vincent 3:08
one of you put in our notes here learnings from the Ember community is that you Carlton, I assume, well,
Carlton Gibson 3:13
it is so. So this is where we have to cut back to Emma's background, because so you, the project that you've maintained for many years is that DRF schema adapter which is about connect, making connections, to Ember app. So perhaps, if you give us a bit of background of that, and you know how that works, and then how you're involved in the Ember community, or how you've seen the Ember community, and then that we can your ideas for bringing some of the things that they do there, maybe to the Django community,
Emma Delescolle 3:38
yes. So a lot of the applications that I write usually have are things that deal with a lot of data, a lot of forms and things like that. Think invoicing plus plus and so at some point I decided to write it in Django, compared to other stuff I've used Odoo and Triton before. I've been part of the Odoo core team a long time ago, before it was called Odoo. And so I say, Okay, let's, let's do that in Django, and one of my first frustration was to have to write serializers and view sets for everything. So this is the first half of the hour schema adapter. It's in some ways similar to Neapolitan, in a way that it lets you write a single class that will define everything for you. And under the hood, it's just a Yarra schema adaptive view set. But then I was also frustrated, because I was using Ember as a front end for that, and I also had to free. Write my models in amber, which are basically exactly the same thing as the serializers in Django. And so this is the second half of TRS schema adapter. It's, it's an it's an adaptive system that lets you take a serializer and transform that into front end code, whether it be for Amber, which is basically the only one that has been maintained over time. But when we started the project, there were a few of us that got together, and some people wrote adapters for Angular and for React. And so the the tilt here is that you write your model, you write an endpoint in Django, and that's all you have to do. You after that, you magically have the access for a credit system directly in amber.
Carlton Gibson 5:58
So that's kind of like the Holy Grail, right? Write it once, yes,
Emma Delescolle 6:02
and honestly, it's been working quite well for me for four years. And yeah, I've been less involved with it lately because I feel we're getting to a newer era, and I would love to, I've tried to change to update the area schema adapter for that, but it's not going to work. So I'm thinking of starting from scratch to have something similar, but with HTML.
Carlton Gibson 6:32
Okay, so that's quite cool, right? Okay, so that's DRF adapter, schema adapter, and that's but specifically we came onto this because there's some things that they do in the Ember community that you think might be, you know, at least ideas or templates for us to do in the Django community. So what? What the kind of good things they do over in Ember so
Emma Delescolle 6:51
that they do a lot of things that they like in the Ember community? I I've always thought that the Ember community and the Django community were kind of kindred spirits in some ways. I think that the thing that seems to be the most relevant to what we're doing right now is their RFC process. So they every every new feature or change request goes through an RFC, whether it's a small thing, or if it's a big thing, whether it's a core maintainer that wants to add a feature, or whether it's somebody that nobody has ever heard of, you start an RFC, which is similar to what we have in Django, is the dev process. It's just that we don't use the depth process that much. While in the amber community, the RFC process is used all the time for everything. And one of the things that I find it really positively that Then everything happens in GitHub for them, and it makes things easier to reference. It gives you historical overview. It's easy to point out, Hey, this is a duplicate of this issue and things like that. Well,
Will Vincent 8:22
Carlton is fairly wedded to track, so those are fighting words. I think, to be fair, it's more the history, right? That would be the main point Carlton. There's 20 years of history that would be lost if we switched over. Yeah,
Carlton Gibson 8:35
no, that's the difficulty for me. Is not that my track. And, you know, I don't particularly like GitHub, per se, because I feel it would be nice if it wasn't owned by its current owners, but that's a slightly separate discussion to have. The thing that track has is the entire history of the Django project in it, and when you particularly, as the next fellow, when you an issue comes in and you're like, I don't know, like, you know? So some weird thing about the back end of the admin when it generates a form, I have no idea about this. The the track is an amazing resource for digging through and doing the archeology and finding out, oh, it's big. Why it is because of this and the filters and all the rest that that track has make GitHub search look like a joke. To be honest, I spent a lot of time working on DRF, and it's a project with probably less than 10% of the history of Django, and it's much easier to find history on Django using track than it ever is to find anything on DRF. And so it's not that I'm ready to track per se, but I am wedded to the ability to find the right piece of history when you need it to work out a decision. But yeah, that's a sort of that is a sort of separate question to this initial i. Or thought about, you know, can we use depth, small all the ideas approach? Because lots of people have ideas, right? And they come to Django, and they open an issue on track, and then they're immediately sent to the forum, and then they don't necessarily get a reply on the forum, and then, so what happens to those ideas?
Will Vincent 10:15
It's, yeah, it seems like Ember is just more streamlined, right? I mean, because again, as Carlton was saying, someone comes in with an idea, and they're sent on this journey, which maybe the first time they've ever done it. And by the time they get through all that, maybe they get a debt, maybe they don't, and then I feel like most of the enthusiasm or time and energy they've had has been extinguished on the process rather than on
Emma Delescolle 10:40
the end result? Yeah, the process is definitely longing complex, I would say, with Django. So
Carlton Gibson 10:49
in your ideal world waver, what would, how would you, what do you think we can do? Emma, so you've clearly got ideas. Well,
Emma Delescolle 10:56
yeah, so I would, I would encourage us to use the depth process more, but in order to use that process more, it has to be more simple. Right now. To create a draft depth you already need a list of things like, you need a team and things like that, which is probably overkill, just to say, Hey, I've got this idea what, what do people think about it? So simplifying that process seems to be really the first step to go. Because, yeah, I would love to see the process used way more like, like it is in amber and
Carlton Gibson 11:38
there's, there's something about the issue tracker. Thing is that you talked about duplicates, like we offer we there's a thing that happens with the discussion based approach, and it's not just on the forums. It used to be on the Google Google Group, the Django developers mailing list. But this thing that happened would be like a conversation would happen, and nine months later, the same conversation would happen, and then nine months after that, same conversation happen, and it's quite tiring to constantly have to repeat the same conversations and remember, what was it that so and so said that was really and you have to go and find it. And then if we could somehow, you know, wanted something like a, you know, GitHub is not my favorite, but a GitHub project where we could identify duplicates and all the rest that's that's got to be a step up from the way we're doing it now. It seems we need something like that. I don't want.
Will Vincent 12:26
And this exists, right? I mean, it exists in GitHub. I've, I've just joined a new company that uses this tool called you track, where you start typing something in a auto populates. Did you mean, yeah, it's, yeah, it's doable. It's a, I venture to say it's a solved problem. I don't know, but, like, we're not the only ones having this pain, and it doesn't require crazy, crazy search or anything, right? It's just looking for the terms and your title and headline and just auto showing what else is in the database?
Emma Delescolle 13:01
Yes, and GitHub is maybe not the best solution. I agree. I personally have everything on a GitLab that I host myself. I only have duplicates copies on GitHub. But we also have to be in face with reality that everybody has a GitHub account. Everybody who might want to contribute to Django has already a GitHub account, and probably they spend quite a bit of time there, because either this is what they work with every day, or they are involved in some other projects and things like that. So even if it's not ideal, it's probably not a bad choice either.
Will Vincent 13:46
We can't, we can't fight every battle. No,
Carlton Gibson 13:49
exactly, exactly. I think one thing you've talked about as well is perhaps the contributor comes along, they perhaps don't get the time that they need to really be welcomed in. And so, I mean, I'd ask your thoughts on that. But also, I mean, do you think we're just running too close to capacity, so that we don't have the time?
Emma Delescolle 14:10
Def, definitely, definitely, we are. We're too close to capacity. And it's, it's a vicious circle. People were already involved. Don't really have time for people who are less involved and people were less involved. There's tons of testimonies of people who feel that they have had a door slammed interface when trying to contribute to Django. And so we have a very, very low retention of contributors, which means that the people who stay, they have more work and and we go round and round, and at some point we have to break that cycle somewhere.
Will Vincent 14:58
Yeah. And of course. It's easy to just say, you know, raise some money, have something like the fellows for X, Y, Z, problems that we have. I mean, I wonder, just thinking of ember, are there? Is there anything we can unpack in this conversation around how other communities manage it? Because these feel endemic to open source projects, where you do end up with a handful of people keeping it going, and they just get kind of tired, and
Emma Delescolle 15:30
so I'm not sure how they manage that in the amber community. I know how they do it. I know. I don't know how they got to that point. So there's one requirement to be part of the Ember core team, is that you have to have a full time job. You cannot be full time open source maintainer. So what happens is that most of the people who are on the core team or paid by their employer to write amber or to do Amber related stuff. I'm not and that's that's the part that I don't know. How they got to have that. I believe it's just a matter of getting a few people to have that, and once you have a few people, then you can show other companies. Hey, look this other company. They are paying somebody to work on Amber.
Will Vincent 16:29
You also need companies that really rely on Ember, right? Because
Carlton Gibson 16:34
it's possible there are, there are 1000s and 1000s of companies that rely on Django, like, we don't, you know, like, so, I mean, you know, to take Simon Charette, he's given time by Zapier to work on the ORM, he's he so, but we need more of that. Actually, we need that 5% time, that 10% time the day will eat day every two weeks to give to Django. And I think that would be an amazing possibility to pursue and to poke companies and to say, Hey, do you know that you're writing us? The most useful thing you can do is, well, maybe
Will Vincent 17:10
it's, I don't know if it's formalized somewhere, but also, if we had a page on the Django project site that listed companies, because companies do need to get something, I think, you know, marketing, whatever people need something. If there was somewhere that said these companies, someone is paid to work on Django, maybe that's, I mean, for example, like, I've just, I've just started working at JetBrains, which makes pie charm, and they're like, Yeah, you can, you can work on core Django, but I have to figure, you know, set the goals, figure all that out with my manager, update it, which I'm going to, but you know, there isn't a I'm not aware of, like a document of, here's how to manage this within your company, because I think most company, or many, many good employers would if you said five, 10% I want to contribute back to Django, but you need to spell it out for them. What they get from it. It's not just that they get to keep the employee return on the investment. Like, I don't, I don't know if that idea has come up again. Someone can holler, but like, it doesn't seem like a huge thing to list, I don't know. And then maybe that's unfair to companies that don't have it, but that feels like the kind of stuff that gets us in the way, rather than people wanting to do it, or or companies that rely on Django. It's just the the ease of mechanism of doing what we what we want, like the depths.
Emma Delescolle 18:41
Well, one easy perk is to have an easier time to get the features that you want. So if you're a company that you're paying a somebody to work one day a week on Django, given the amount of time it takes to get a feature in Django, there's you increase your chances, like, by 20 times by paying somebody to do it. And if you rely on Django for your business and you want a specific feature, that's that's a good way to get it or
Will Vincent 19:13
third party right, third party even seems a more immediate way, because often companies right. That's the pathway in so if they're already working on a third party package, yeah, I'm just agreeing with what you said.
Carlton Gibson 19:27
I was thinking about this today. I was thinking, you know, because I built, since I stepped down and spent I've started a new company. I've built it on Django. I now depend on Django, again, as you know, as a foundation of my business. And I was thinking, what actually is important to me. And it's to be honest, it's not features, it's the stability and knowing security patches will get done, and you know that it will keep the it will keep going. That's really important, okay, that it's got the features that it has. I don't want them taken away, but anything it hasn't got, I can think I can do. To add that on the side, right? It's not so important to me, but what is important to me, and important to my business partner, important to clients, is that to be able to say, look, we've got a rock solid core here.
Emma Delescolle 20:12
I agree that stability is important, but there's this little thing. It's never a huge feature. But there is, let's say there is this little thing that doesn't work like you need it to work in Django. So what you do is you copy, paste it to your own library, to your own code, you change three lines. And every time there is a new release of Django, you have to check that those three lines have not changed in Django, because if they have, you need to change your code, and that's the kind of thing that becomes really annoying after a couple years. Yeah, sure. So yeah, there's little thing, but yeah, major features, if not something that the company is going to want to add to Django most of the time, one
Carlton Gibson 20:56
we were talking about capacity and, you know, because the obvious thing when we say, How is to add is to fund a new fellow. But say, you know, could we get more money and fund us an extra fellow? I kind of feel that's that that would buy us an amount of time, right? That would give us more capacity, but somehow that would be over overwhelmed. I think we need a different kind of strategy. Somehow, because the fellows are running at full capacity, we could add another one that would buy us, you know, say, a couple of. You know, it's like when you build an extra lane on the motorway, like, two years later, the motorway is just as congested it was. It was before.
I wonder. One thing I've been thinking about is, could we modularize somehow? Could be split because there's a single point of failure, right? There's this, or not single point of failure. There's this single point of group. Point of throughput. Everything has to go through the mergers, through the two fellows, through Django core, with its eight month release cycle. And is, do you have any thoughts on what? Breaking it up a little bit? Or,
Emma Delescolle 21:53
yeah, I choose. So there's there's different models, there's the pyramid model. Like pyramids they used to have, OK, this is the basics of pyromid. But if you want to have everything, there is this cookie cutter that installs everything. But if you want to have an API, there's this cookie cutter that install everything. I don't think they were very successful with that. So I'm not sure it would be, it would be good. There are definitely some things that I don't use in Django. That's this. And I'm sure that when I'm going to save some people are going to come to me and say, Hey, I use that all the time, and it works great, but you're
Carlton Gibson 22:40
going to upset somebody, so don't worry. But
Emma Delescolle 22:42
the size framework, for example, I've always it either gets in my way when I want to build something that's just one single website, or it doesn't have the features that I need if I want to do something a SaaS like thing with five domains accessing the same code base. So may this could be a candidate to remove. There are things that are there that are needed. There are tons of things that depend on the size framework as it is right now. But is everybody? Is anybody actually using that correctly templates, that's something that's going to upset somebody, but this
Carlton Gibson 23:29
you can upset me. Now,
Emma Delescolle 23:32
I like Django template. I never, I never use, I never use ginger, but if we want to tint down Django? Do we need to have templates in Django core? There is a lot of applications that just do Django rest framework. So could templates be part of something else that's that's an example, and the wagtail does it in a certain way that kind of works, which is, they remove things from wagtail and they say, Oh, by the way. Now this is a separate application. The problem is that with that is that it will probably go and maintained at some point. But there is a way that works that doesn't break anybody's code. Say, Oh, you're updating from this version to that version. So now you need to add this extra package in your requirements. That's it. So that's a way that we can remove things we've been talking recently about trying to look at the code in Django and try to maybe refactor some, some of the things that are there, there's it's not, it's not going to be half of Django code that's going to disappear by refactoring. Things, but third, things that can go away. And this is something when working on the on legacy codes, usually, this is a good way to starting. When you start somewhere, you see something that doesn't you're writing new code, and you see next to your code, or you're using in your new code, something that's not great. Well, improve it, and sometimes it breaks things, and we have to be ready for
Carlton Gibson 25:31
that. One of the big selling points of Django is it is the ease of upgrade now. And we all remember, or anyone who's been using Django since the old days remembers like, what it used to be like up updating. And there was this. It was kind of almost cultural that bragging rights. I'm still running not point nine six, so I'm on 1.2 other, you know? And it was who was running the oldest, whereas now it's very much. You're expected to be on a on a supported version, and it's so easy to update, there's no excuse for not keeping rolling. How do we balance those two? You wrote a great blog post about this, about, you know, I can't remember the exact title, but it was, it was touching on this issue. How do we balance those two, those two things, perhaps, you know,
Emma Delescolle 26:16
it's, it would be great and Frank. Now, I understand there's something that two fellows cannot do, but it would be great if Adam change Adam Johnson's package Django upgrade was part of Django, because if we have an upgrade pass, we can break things as long as we have a solution.
Will Vincent 26:40
I just keep thinking we one of the maybe it's even a level higher. Yeah, higher, higher. Higher than what we're discussing is that we, we just don't have the people in the money. I mean, we're like, if you look around, for example, like, I just met PHP, I didn't realize has a foundation only as of a couple years ago, like three years ago, and one of my colleagues runs it, and they have, you know, 10 people paid to work on PHP. Now, okay, that's a language, not a framework, but look at Laravel, which, again, doesn't have a community, has one person that makes money, hand over foot, separate from raising venture capital money. But they just have they just have people. They just have a lot more people. And I felt this when I was on the board, that there is a shift from Django exist to exist, and Django exists to kind of thrive. And those of us who've been around for a while can actually make things happen, right instead of it does feel a little bit like the same old conversations, but it butts up against the fact that at best, you have someone like Simon Charette who can do some time, but not A ton of time, and then the organizational stuff, nobody, no company is going to pay for you really, to do the organizational stuff, which leads into, I know the current board, multiple people would like to have an executive director, but it's volunteers meeting once a month trying to meet the needs of a Big Corp that has, you know, there's people whose career is presenting this properly to to these corporations. So I'm using out loud, I guess I just, I keep wishing there was a way we could shake that money tree, because it just, I feel like we're just asking too much of of of our people to do it. So that's not a question. That's just a rant, I guess. But, you know, I feel like we take it upon ourselves, like, why can't I do more? The the, you know, Adam, the same people are just pulled in to solve these problems, and ultimately, until one of us is able to work on it in a more full time capacity with whatever funding it's. It's just too much of a a thing. I don't know, did I just, did I just waste a couple minutes? Or is that something new to proceed?
Carlton Gibson 29:18
I mean, this is the topic we're talking around, right? I mean, Emma, what, how would you, I mean, do you see okay to turn that into a question is, do we need to raise more money to get more capacity so that we can ease up the log jam that we have? Or do you, or do you see, like enough ground that can be cleared to buy us a bit of space, to give us more freedom.
Emma Delescolle 29:43
I think there is ground that can be cleared to give us some freedom. It doesn't mean that we cannot use more money, more
Carlton Gibson 29:51
money as well. Money and more
Emma Delescolle 29:53
time is always good. But yeah, there is, I've always had this feeling that the. The Python community in general is like this very purest open source compared to pH you were mentioning PHP and Laravel. They're very purist, and they don't want to sell out to companies, and they don't want to sell out to this or that. And the side effect of that is, yeah, maybe they sold out. Maybe they're just doing business, but they get money. We don't. This
Carlton Gibson 30:28
episode is brought to you by button down. That's buttondown.com email software for developers like you. There are hundreds of email marketing software services out there, and they will pretty much offer the same thing, collect and clean addresses, send out broadcasts or drip campaigns, get analytics so you can see what's resonating and what's not. Button down is designed to hook into the tools that you already care about, everything from static site generators like Jekyll or Hugo to payment platforms like Stripe and memberful. You can hook your site up to button down with just a form element or a simple REST call write emails in Markdown, and they get on with the actual work you're supposed to do. New customers can save 50% off their first year with button down using the coupon code Django. And if you email support, they'll white glove migrate your existing subscribers and archives for free.
Will Vincent 31:14
Yeah. I mean, and look who, look who's on the the Python Software Foundation Board. It's meta Microsoft, you know, examples, yeah, yeah, I feel like we should we, we like even something. And perhaps I'm coming at this for a new angle, because I'm again, I'm now working for pie charms, or thinking about marketing like I was just this morning looking at the homepage of, you know, flask and fast API. Fast API has very similar to Django rest framework, just on the home page boom companies that sponsor right like, what is it worth to a company to be on the Django project home page? And we say it requires this minimum amount. There's only so many spots. There's no way we couldn't raise six figures doing that. And again, I I'm not currently on the board. We have new board members. I know many of them feel this way, like it's just all the more jarring for me now being on the inside of a company that you know makes money off of Python and Django and has a budget, but there's not even much visibility. You know, part of it is people come and go in larger corporations, but there's not even much visibility around, for example, the Django campaign that pie charm has done for years that I helped work with, you know, because some of the people aren't there, you know, I guess I just see that I have renewed energy to kind of like, go to these companies and be like, hey, like, you've got 2025, marketing goals. You're spending money on Google and other things. Throw a little here and be on the Django homepage. I don't think that upsets anyone. And I would couple that with we bury our existing platinum sponsors, of which JetBrains and others are one like, we bury it.
Carlton Gibson 33:06
It's hard to find, right? It should be fun, essential. I
Will Vincent 33:08
can't find it. I go to Google to find it like, you know. So anyways, I just, I agree that there are things that we can do to clear the path. I also think that we can still be pure without but be more recognize the fact we compete in this world in which other frameworks have far more resources than we do. So can
Carlton Gibson 33:29
we call the episode? There is no ethical open source under capitalism?
Emma Delescolle 33:35
Sure like that.
Carlton Gibson 33:39
That just to get, just to give context. So I throw it back to Emma. That number you, you said you we can easily make six figures. That's the mythical extra fella, or that's the mythical Executive Director, right, just there. That's in that package that you just talked about, that there's the money to fund the thing that we say we want, wish we should get the board on and, you know, harass them, right?
Will Vincent 33:59
I'll go, I'll go paying them after this episode, here's a new idea. No one thought of, what if we
Carlton Gibson 34:06
what if we made the money? But no, but it's so, yeah, I was gonna throw it back. Do you have any more thoughts that you wanted to say on this topic? Because I want this one other thing I want.
Emma Delescolle 34:17
I guess I touched on it a little bit with mentioning the templates, there's also the thing that with Django, we the Django project from the start as had a point of having everything in house, So we have everything written inside the Django project. Maybe we can leverage other open source projects like click, like Jinja for the templates, or click for the for the management, comment and other things like that. That would be a way. To cut down the to cut down the lines of code, and there is always a risk by using a third party application that is not going to get maintained and things like that. But is it really that bad? Let's say we use click and click doesn't get maintained anymore. Then we have to bring click in. Oh, well, that's the situation we started with. So it's not that big of a deal,
Carlton Gibson 35:27
interesting. Interesting because just this week, there's an Armin, what's his surname
Emma Delescolle 35:33
from that car? Yeah. He did a thing
Carlton Gibson 35:35
about vendoring, you know, writing your own one. And then there was
Will Vincent 35:38
a Yeah, he's done, you, you, you felt seen in that. Yeah,
Carlton Gibson 35:43
exactly. There's and the HTML website and USA appeared on vendoring and, you know, arguing the opposite. So what? What's nice? Yes, we could take on dependencies, maybe, like we at, but how far do we push that? Are we suddenly using the SQL alchemy. Or, you know, well, what point is it?
Emma Delescolle 36:02
Well, Poe, not not SQL alchemy, right? Okay, okay.
Will Vincent 36:09
Emma, I wanted to ask you, we're talking about Django rest framework, what do you make of Django ninja? Because I would say that that's not even the hotness that that is on pace to replace Django rest framework, for reasons that aren't completely clear to me, but that seems to be the trajectory. So I'm curious. Your your thoughts? No,
Emma Delescolle 36:29
it is. I believe it is. And I think that one of the reasons, probably not the only reason, but one of the reasons is that Django rest framework is in maintenance mode, so the people who are using it are going to keep using it. If you have to choose a new framework today, a new rest framework today to write your Django application. Which one are you going to go with? The one that is actively developed, or the one is that's in maintenance mode changes, or that you're going to go with the actively developed one,
Will Vincent 37:09
and it's faster in quotes too. So yes,
Emma Delescolle 37:15
I don't
Will Vincent 37:17
Carlton is reacting. We don't. I'm just, you're
Carlton Gibson 37:20
gonna just trigger me on my synthetic benchmarks ran any second now, I agree, user monitoring, I've
Emma Delescolle 37:28
never actually thought that's Django Python or Django rest framework, or that slow. Most of Yeah, Python is that fast. If you want something so fast, go with rest or go or C or write your web server in assembly, but usually it's not this layer. What's going to be slow is your request to the database is going to be your file access and all that. So I've never felt that Django or Django rest framework was a bottleneck when it comes to speed.
Will Vincent 38:06
No, and I just had this last week with so my new company is the platform is built on Java. Java IntelliJ is the main product. So there's a lot of Java developers, and you know, they tend to be older, and, you know, at lunch, one of them was telling me, Python slow and web is slow. And I was like, What are you talking about? Man, like, abstractions are bad to that point. Like, why? So I think part of it is people, not people come in focused on the language, and they don't know the web at all. They don't understand what infrastructure is. And, you know, arbitrary benchmarks, you know, I did, I did pause it. I was like, Well, what is an extra minute save the developer time versus milliseconds later? And, yeah, Carlton making the face, I have
Carlton Gibson 38:54
no no, I'm actually going to have to fire off now, because this, this whole fascination with speed. It's like fascination with scale. It's ridiculous. Sorry, define your metrics that you need to hit for. Define the performance that you're looking for, and does your application fit inside that app, inside those performance metrics? Absolutely, a Django app or a flask app or a, you know, whatever Python web framework will fit in that as well as anything else, exactly, because what Emma's talking about, your bottleneck is not your web framework, right? It's the connections to the database and your limits to, you know, scalability are there not you know which web framework to use or which programming language you wrote you using. You know, I'm going really low level, a brilliant it took me months to write, you know my Hello World, no, just so get so it's just so backwards. It's so it's not an engineering mindset, that's the thing. It's almost
Will Vincent 39:51
like, it's almost like a political question, where you just like, we're just talking past each other here. It's
Carlton Gibson 39:56
like, yeah, hooray. I support the Eagles. No, I'm a Cowboys. Right? No, that what? It's not engineering.
Will Vincent 40:03
I don't know how many sports fans there are. What Emma, I wanted to ask you about Django, classy, classy doc, if we can shift gears,
Carlton Gibson 40:15
this is amazing project. It's
Will Vincent 40:17
relatively new couple months old, so classy, class based views for your docs, for your code, right? Like, tell us more. What made you take that next step of putting it into a package?
Emma Delescolle 40:33
Because, once again, with everything I needed it, I wanted it for me, and it's much easier for it to be in a package. And when I work with Django, I either have ccbv or cdrf open on under the screen next to my code, because this is what, what I use, is documentation.
Will Vincent 40:58
We don't have to argue about function based views. Than good, good. It's another.
Emma Delescolle 41:04
And those are great. But when you start to build more complex application, and you have a code base that is 10 years old, and you need to find something, sometimes the class based architecture does not let you find it easily, and the way you can do it, you can open a shell, manage that by shell, and go from there and find what you need. But having it on a website that is generated by your code is also much, much nicer. So every, every piece of business logic, of properties or anything that you've added on top of class based views or Django rest framework or models, it's right there. It's auto documenting in your in your code, and even if you don't have code comments, if you have doc strings and everything is really, really powerful. Even if you don't have doc strings, just being able to say, Oh, this is defined in that file, and this is the code that I'm calling right now, it's super helpful while you're working
Will Vincent 42:20
agree, yes.
Emma Delescolle 42:25
The only question is, why hasn't anybody written this before and published it? What's
Carlton Gibson 42:32
your answer? I don't know. Ever thought you don't know? I don't know. I've
Emma Delescolle 42:37
looked, I've the thing I've seen, I've looked, or maybe I didn't know where to look, but what I found, I found some people who've done it for Python in general, and that use ginger for templating, for example, and but that's not fun, because we're using Django white load To templating engines. I didn't find any things specific to Django, and that was fine tuned for Django. There's probably a lot of progress I still can do there on fine tuning for Django. But for example, a Django model is something specific with fields and things that will not map correctly, or it will not be intuitive if you just take a Python version of this kind of tool,
Carlton Gibson 43:25
yeah, you want to represent it in a way that makes sense to a Django developer, yeah,
Emma Delescolle 43:32
and yeah. Maybe it's because of what you say Carlton, maybe nobody uses class biscuits because they hate it.
Carlton Gibson 43:41
Well, no, you must be. I love class based views. The criticism is about the implementation, not the class based views, like the the whole function based view versus class based view thing, that's just a myth. That's like, oh, I don't like the extra indentation you get in a class, but then in your function based. View you've got if, if, no, but no, but no, but that's what. That's the sort of what the complaint comes down to. And then it's like, but hang on, in your function view you've got if, request, dot, method equals post, and then you've got everything indented a block. It's, it all just works out the same. It's
Will Vincent 44:16
those are fighting those are fighting words. Carlton, I like it.
Emma Delescolle 44:18
Yeah, I I feel like this is touching on another issue that I feel we have with the Django, maybe not with the Django community, but with the Django resources, is that there's something that Python does very well. Python is welcoming to the newcomer who is Python is a new basic, if you want to, if you're eight year old, you want to start programming, start with Python. But if you have 30 years experience and you want to do things more advanced, Python is still a great language for you. And in Django, we have focus. A lot of energy in making Django welcoming to newcomers and easy to approach. But once you get to mid or senior level and try to find resources, it starts becoming harder, and this is a space where I feel that class based use and Django implementation of class based views are useful. It's a bit more often more advanced topics, but there is roughly zero, not zero, but very little, tutorials and resources for people who've reached that level. Once you're at that level, basically you're on your own, and that that might be one of the reasons why, uh, Django class based views get so so little love.
Carlton Gibson 45:47
Will you're an educator, you you're in this space. Like, what do you think? Yeah,
Will Vincent 45:52
I mean, what do I think about, I guess, how many people would sit through an educational thing on class based views, as opposed to having a specific problem with the generic class based view, and then kind of stumble through and find classy class based views. I suspect most people are in the latter category, though I'd certainly be happy to I mean, I in my books. So my books, for example, i i Now start with function based views and the beginners one and then work into class based views. That was something I had just started with class based views in earlier editions. For the more advanced cases I do, I do have things where I show how I found something. I show searching in the source code. I show classy class based views. But I'm guilty of not having gone, I guess, deeper on it myself. I suppose it would need. I would need to think of good examples of, you know, build a blog, build a bookstore where you can have fun playing around with the class based views a bit, because I think most people work backwards problem they want solved and then the teaching. They'll accept it along the way, but to just be more comfortable with class based use. I haven't figured out how to do that, but I don't know if anyone else has either. I mean, I guess that's this is the problem too, with educational content in general, is that I feel like beginner, intermediate, it's okay. Advanced stuff is very difficult to think about because everyone does it so differently. It's difficult to it needs to be more, I guess, pedagogical more about teaching rather than helping someone, you know, build a Pro project.
Carlton Gibson 47:31
I think, can I Yeah, can I ask? Does it work from a market point of view? Because if you think about this addressable market size, there's an awful lot of beginners, and there's some intermediates, and there's very few advanced people. So if you write, if you create content for advanced people, you're automatically limiting, like you well, you have
Will Vincent 47:49
to charge a lot more, whether or not you can. I mean, you know, I don't want to make this about that topic, but, like I did, just accept a full time job to give people a sense of how big the market is for Django educational materials. You know, I'm still doing it, but, you know, that's part of the problem. I
Emma Delescolle 48:09
mean, there must be your market for it, because there's all those certifications in you were talking about Java. You can get a ton of certification in Java on every different levels. So, right, you
Will Vincent 48:23
know, people, yeah, people get it from Coursera or meta. I, I guess it's that question of a sort of certification to fulfill a requirement for a job or to just be good enough, versus, you know, for me and other content, you're paying your own money and time to get better. So you really have to want it. It has to be that much better to pay $50 for something of mine when you could get lots of other stuff for for almost free. I don't know. I don't really want to get into the educational side thing, but, but it's
Carlton Gibson 49:01
just, it's the same as the open source problem, right? It's like, you know is people aren't going to pay or this is the problem. The marginal cost of delivery for open source project is approximately zero, right? It's, you go and fetch it, off pi PR, you pip install it. They cost the Django developers nothing. And so there's a kind of economic grind to the bottom where nobody pays for open source, and we end up in this that we've been talking about all episode, this sustainability problem. I
Will Vincent 49:29
feel like I'm going to get wound up on this. I mean, yes, there's, I don't know. I'm
Carlton Gibson 49:35
going to shoot my So, Emma, I'm, I'm going to swing it back to Emma. Now, Emma, so I've just feel from the I know you've got lots of positive ideas and lots of positives. Say, we've been quite negative in what we've been talking about a little bit, and we've, we've been hitting on problems and digging into those problems. What's your, what's your sort of solar punk, positive out, where do, where do we want to go? Looking positive. Be dynamically for Django now.
Emma Delescolle 50:02
So in your first of all, only people who don't do anything don't do anything wrong. So the fact that we've been negative, it means that at least something is being done, and where I want to go is that I feel that Django can is probably still a framework for the future. There is a tremendous push toward things like HTML right now that bring the ball back into the back end camp. I'm going to say it's slow. Corporation are still not on board and things like that. But work slowly. The pendulum is swinging back to send server side things. Website and Django has a great ORM. It's got nice forms. It has some batteries included, even if they are not perfect right now, their authentication is their authorization is there. And so it's got all the basis for for you to to write your your application. And let's, let's write that wave and jump on that train and stay the best framework that can be there to to write your application. Well, I'll
Will Vincent 51:25
say something positive too, which is, I mean, we are riding the Python train, which I think anyone that's the train you want to be on. It's growing and growing and growing and growing. I even, even internally, I was just looking at marketing stuff for for pie charm, like at JetBrains, pie charm is not the biggest seller at the company. It's IntelliJ, which is a JavaScript IDE, but Python is the even, even for a company with 100 prod products, or whatever it is, like, the Python stuff gets the most traffic, right? So we are riding the train up into the right and Django, you know, I know I know there's different metrics of which GitHub stars, or different surveys. I still think, practically speaking, Django is far in advance in terms of real developers on real projects using it. So I'm positive by all those things, right? Like it's, it would be hard if we were like waging this battle and those trend lines were going in the opposite direction. But it is. It is balancing those two barbells of, how do we stay friendly to beginners and and make the batteries not imposing at the same time, do stuff for the people who, yeah, are using it and want it to be better and slight, you know, Django, Django upgrade, right? I mean, we should have that.
Carlton Gibson 52:49
It's an interesting one. Because, like, let's say we didn't, let's say we said, No, we're not going to merge it into core. How do we package it with Django, even if we didn't merge it into core? That's an interesting well, because if we could solve if we No but let me finish. Then if we can solve that problem, then we can also solve the other problem, which is, how do we pull bits out of Django without them disappearing? Right? It's so is, if there is limited capacity and core for quick things, big things to come in because with limited state. Well, okay, what can we do? So from the UX perspective, so fast API. Fast API by default. You do pip install fast API or UV these days, but pip install fast API, square brackets, standard, right? And you get various bits that come with it. If you just want the the core bit, then you just install the core bit by itself. But we could. Why couldn't we do something similar in Django? I know it's not what we've done historically, but, you know, Django, pip install Django, split square brackets, bells and whistles. I don't know it's just an idea, but we can play in this space now,
Emma Delescolle 53:52
isn't isn't there somebody who is working on taking the arm out of Django? I noticed this is something that people have been talking about for 10 years. But I thought I heard somebody was actually doing it.
Carlton Gibson 54:04
I don't know. I've heard various people talk about making it easier to use Django in a state, so to use the ORM in a standalone project, a non web project. So, you know, you could use the ORM in your in your command line tool, a bit more simply than currently is you kind of at the moment, you have to know the black magic to get it to it works. It's not very hard, but you have to know it, and it's not really documented. But wouldn't it be nice if you could use the ORM everywhere? This
Emma Delescolle 54:29
could be, this could be the first step pip install Django ORM. If we could achieve that, maybe then I think we have a recipe.
Will Vincent 54:44
We should just go all plugins like Simon Willison, right? Just plug in.
Emma Delescolle 54:49
I'm experimenting with that. So Simon did a talk in go on. No, I'm experimenting with that one, one of the one of my side project, right? Now it's a static site generator based on Django, and I am trying to have everything be plugin. So just have the basics that does web pages. That's it. That would be the core. And then you have plugins for teams, and you have teams and layouts, and you have plugins for a blog, and you have plugins for collections and plugins for a lot of things. This is one of the size projects that I'm playing with right now.
Will Vincent 55:34
I love that idea. I was just having a conversation with a experienced Python person who wanted to do something update their personal site, and I won't use the gender was, was mentioning different options. And I said, why not just Django? And, well, I don't want to pay hosting costs. Okay. Well, why not pelican? Well, it's not quite what I want, you know, but this is someone who knows Django, right? So if, if someone could wave that wand and go local Django static pages you can deploy on wherever. So, yes, sign me up what
Emma Delescolle 56:09
I'm using so I'm not writing anything special for the static part I'm using distal, which is a tool. You have to decorate your URLs with it. So you have to tell distill, for example, how to find all the blog posts or all the pages, and you decorate your URL patterns with that. And then you generate your website, and it will generate everything in a folder, and then you can FTP it wherever you want, or to or put it on to the pages or anything.
Will Vincent 56:54
I'm putting a link in the notes Django distill that's new to me. I didn't know about that. I
Carlton Gibson 56:59
see a little birdie told me that might be getting a little rewrite and an update at some point. I can pick a big new version.
Emma Delescolle 57:09
I don't know if it's still on the table, but, oh, fingers crossed.
Carlton Gibson 57:13
It's not on mental it's that, like, that's my
Will Vincent 57:16
marketing hat on that could be a cool like Google Summer of Code thing to try to push some momentum. Because, you know, how do we promote Django? Lots of people want a static site and again, no disrespect to Pelican or other ones out there, but if you can just use Django for both and solve the hosting cost thing, seems like a good idea to me. Yes, Carlton,
Carlton Gibson 57:40
for years, you try every web framework, right? You go and you give it a try, you give it a play. You see what it's about. But when it comes down to actually getting things done, what do you pull out the bag. You pull Django out the bag because you were that much more efficient with it, that much more you know familiar, you know every little corner, you know all the nuances. So did the Django to have a static site story that was kind of, you know, modern, up to date and well supported? That would be a great addition to the tool belt. It'd be like, Yes, I can use, I can use my best tools,
Will Vincent 58:10
right? And it's already how I'm teaching it, which is, I start with URLs and templates and views. I we do a couple projects. We don't even touched the database. And I've even I've seen how off putting deployment can be. I used to show deployment progressively more complex with every project. I've moved it entirely to the end of my beginner's book, because so many enough people told me that they just skipped that stuff. So I think separating it out, Madra, modularizing that I'm in favor. Well, we're somehow we've come up to almost an hour. I feel like there were other things. Is there any things we specific, things we didn't talk about? Emma, that you wanted to shout out while you have a microphone?
Emma Delescolle 58:58
I love to give a shout out to piscript. So pyscript is a way to run Python in the front end, and we've mentioned that things are getting back to everything server side, with HTML and things like that. But I feel there's still some products, anything that is long lived in a browser, or anything that you would install in as an electron application. It is a great fit for by script, if you want to write it, to be able to write everything in Python, piscript is already there. It's a bit slow to start, so you're not going to use it for your blog, but if you're, I don't know, writing a point of sale application, piscript, can come here and replace JavaScript front end if you want to do
Will Vincent 59:58
everything in Python. How are. You using it these days, these
Emma Delescolle 1:00:02
days? I'm not using it much, but I did write a proof of concept front end framework in PI script that has that has everything it's got. It uses SQL lights for caching any requests to have a local copy of anything that it gets back from the API. It uses Jinger for template rendering. It uses it has routing and everything. And I did that. It was the early days of pyscript. And by script has come a long way from there since then. So at that time, there were bits that were a bit junky and not very pretty, if someone has the time to look into that right now, I'm sure we can have a very nice front end framework in piscript. All right. I like it.
Carlton Gibson 1:01:00
I've seen Django running in by script as well. And you know the rocket page there, and you just think, well, there's that as that Postgres version that can run, run in it as well, running wasm as well. And you could have Django running sort of fully locally or fully remotely, whichever way you like to think of it possibly. Yeah,
Emma Delescolle 1:01:22
I feel that it's a great it can be a great tool for documentation and tutorials. If on the documentation website, you have the website load a full Django and pull you into the shell and say, hey, now you can type this comment, and this is what's going to happen. Or you can run migrations. Here's what's going to happen. You don't need to install Python local. You don't need anything. You don't even need a computer. You can do that on your phone. That can be very powerful for teaching.
Will Vincent 1:01:54
I'm gonna have to look into this more. Yes, I I've tried earlier versions of this a number of years ago, and I need to get give us a go again. So thank you for that. You're
Carlton Gibson 1:02:06
welcome. I guess we should wrap. Yeah, I guess we should wrap. I would, I was gonna fuse madly about I'm as you, I'm positive about the future channel I have been there were two sort of points in my life where it was very pivot. But one was around the birth of DRF and the Kickstarter around that. And, you know, I jumped on the beat using DRF and helping that. And then the second was this modern, this switch in the last few years that you were talking about to HGM X and alpine and these other technologies that are more lightweight and more Django developer friendly. So I've been excited like you. Thank you so much for coming on. It's been a real, real pleasure. Well,
Emma Delescolle 1:02:48
thank you for having me. It's been a pleasure for me too.
Will Vincent 1:02:51
Thank you so Django chat.com and we will see everyone next episode, bye, bye.
Carlton Gibson 1:02:56
Join us next time this episode will support you by button down the easiest way to start send and grow your email newsletter.