Deploying Django web applications (episode 301)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everyone out there on the live stream thank you for being here we're just about to get started so throw some comments into the chat and we'll try to make that part of the show so you guys ready yeah let's do it carlton will welcome to talk python to me again welcome back guys thank you for having us thank you yeah you came on you came on our show and i was on your show three years ago so carlton's first time on your show yeah talk to python newbie yeah it was it was great to have you on the show before will and we talked about django then and i suspect it won't surprise people with uh you and carlton here that we may touch on django i think we've got to talk about django a little bit a little bit carlton tell people who you are okay so i'm i'm carlton i'm um i'm django fellow so what that means is i help to maintain the framework um the a framework the size of um oh you've got me on twitter there so yeah on twitter and on github and numerous other places probably but a framework the size of django's it just simply doesn't get maintained um on purely volunteer effort so there's a there's a body called the django software foundation which will's on the board for he can tell you a bit about that in a second but they are the a charitable foundation which um well they collect money from donations from github sponsors and you can donate on djangoproject.com and then they the main thing they do is they contract the fellows which is myself and maris felicia who's my colleague now um and we do that we i don't know what do we do we triage the tickets we do um pull request review we do handle security issues we handle the releases um not least the alpha releases today so today literally today we released django 3.2 uh alpha alpha one which is fantastic is that the very first two release yeah that's the that's the first one so that's like you know if you've got if you've got a django project and you've got ci you download it now and you run it on your ci and you tell us all the things we broke better better better before we release the final you know it's much better during the alpha pre-release period than you know just after that 3.2 final you go hey everything's broken yeah you really need people to test it now before it's too late right yeah but yes but it's quite exciting because the last couple of weeks have been building towards the feature-free so the alpha marks the feature-free so um the beat over the pre-release period now will merge bug fixes in the new features um so anything that people find and report will fix and get out before the before the final but there's no new features going into 3.2 so um on thursday just gone i branched the stable branch for 3.2 which will be you know that's that's django 3.2 and it will be that for the next three years because the long-term release gets you know quite the the long-term support release which 3.2 is gets three years of support yeah that's that's really great all right we're gonna definitely have to come back to that but also uh welcome will um tell everyone yeah real briefly you know you were on the show a while ago and we talked i believe it was learning django we spoke about right involved in django it's the time so i'd written i think a couple books so i have three books go for professionals and apis and the last two years i've been member of the django software foundation board so there's about two who are voted in who are play a prominent role in the community one way or another and then the board is seven people annually voted on who managed django itself which is a nonprofit talk about that later so yeah and i ha and i have now a website learndjango.com which is an online version of additional content um but in addition to having a podcast with carlton uh django chat since he's a fellow which is contracted by the board we have another touch point as if we didn't need more exactly yeah so i was on your show a while ago and that was super fun i really enjoyed our conversation there and you know maybe just tell people quickly about your podcast what kind of stuff do you cover there obviously django but you know yeah where do they find it what do they cover okay so we get people on from the community um it's kind of an interview type basis we get someone on it it's fortnightly now we were doing it every week but you know we not like you michael can't keep it up for forever so we've gone fortnightly which is taking a bit of pressure off with covered and you know the kids off school and all of that but we get you know people who've contributed to django or people are using django in their business and you know we talk about it so it's it's chiang mai chat it's chatting about chatting about django yeah yeah yeah yeah and it's also i think recreating a little bit of what you would have at a djangocon event so these are annual events um so we started after i went to my first djangocon and met carlton and was like why can't i talk to people about django more often and at the time there wasn't a django podcast um so yeah so we've gotten to interview really my dream list of guests i mean we we had actually i was just talking to someone else who works at stripe which is still running on sinatra which is a ruby thing and i was like yeah yeah i've i've talked to dhh because he's came on our shows we talked about rails versus django we had carl myron who's at instagram was formerly jingle core um all the basically everyone almost everyone we want to talk to who's involved in django is willing to come on and share their story um so i think it's a really nice connector and educational for us too i i do as well and you're just sort of a sidebar for our show here you know being all of us fellow podcasters i think it's really interesting the role that podcasts play in keeping connections to the broader tech community when we can't go anywhere i mean even if you weren't typically going to conferences or meetups you could still go to work and see other people right it's just it's for me it took at first when covet hit i was like i'm just i'm not traveling anywhere i'm not taking my kid to school or anything like that so there's no like natural place here i'm stuck for 45 minutes i'm gonna just listen but as it's drawn on i started to listen to shows especially with multiple people trying to it brings sort of a a normalcy and uh hey i get to kind of hang out with these people even though they don't respond to me i still gotta hang out with them and i think that's a really interesting societal thing that's happening right now yeah i think it's beneficial across the board i mean probably like like you all i listen to podcasts outside of tech as well and it's sort of like people i'd want to sit in on their conversations anyways so um for me it's probably my primary media consumption aside from books yeah yeah but i mean i'm not reading ancient greek like carlton carlton has a phd and all that so so by comparison yeah but we should i mean i think we're going to talk about we're going to talk about specifically um deployments on django i mean we can go on and on about obviously all the intricacies of django but i think suffice to say i'm an educator on the and on the board and carlton's a fellow so he's he makes the releases happen including 3-2 alpha which just dropped today and i guess yeah you mentioned lts so that's confusing to non-django people so since having fellows like carlton django has a pretty rapid release cycle where it's every nine months or so so there's three zero three one three two this december i think carlton is four zero yeah um and then every one of those is a long term service release so that will last two and a half years um so if that is it three years yeah it's it's on there's a link on the django project site um so that's a way that so django doesn't really have it's rare to have breaking changes these days but the lts is designed to help um people who can't keep up with that cycle uh stay up to date though we have a lot of podcasts and opinions about why you should always stay up to date and it's worth it yeah because that's one of the most fair things because as carlton mentioned there's bug fixes constantly so it'll be there's three one one three one two there'll be you know three two then the three two one a month later or so so stay updated i'm a big advocate of um you know if you possibly can get on the latest major release so you did like hanging out historically the long term release was really the long the lts release was really important because there were breaking changes right in each major version of django there were new things and it was difficult to keep but that's not the case anymore it's really easy to update so i'm a big advocate of that now and then when i you know i talk to fellow people in the django community they're like well you know i work in the real world and you can't always keep keep up on the latest major version so for those folks then you know the lts is a really good option because it's once every three years you know it's coming yeah you know you've got you get a six-month window of overlap of support so the old lts gets six months of security release after the release of the new lts and that that's your window to update well i think that running and maintaining software built upon frameworks like django it falls into two categories for me it falls into here's something that we have a team or at least somebody dedicated to owning this project and we care about its ongoing life and then we have the ones that are the oh please don't touch it and the oh please don't touch it is we've long since stopped developing that maybe the person who developed it left but it's still important and yeah we don't want to break it it's working right now but if you touch it and you break it you've now adopted it you know what i mean like it's that thing that just it's like if you break the build yes but but worse because it's legacy build right it's like so to me i feel like that please don't touch its side the lts makes perfect sense for them yeah entirely entirely i i the way i like to think of it is uh is this the thing that you're feasibly going to add new features to and if you're feasibly going to add new features too then you should be on the latest major version and because it's once every eight months you need to allocate a day or two to to keep up to you know fix up download the new version run the test suite see the deprecation warnings fix the deprecation warnings you know maybe you have to wait a couple of weeks for a dependency to update and and then you can push forward and that's once every eight month that process and if you're adding new features if it's a live project ideally you'd be there but yes if there's something which you just need to keep running for the long run you know you could do that much less frequently right but it allows people who have that please don't touch it but oh there's a security problem you know if the if there's no lts and and there's a security problem that not only do they have to figure out how to redeploy the fix they've got to say well we didn't touch it for three years and it doesn't quite work the same so then you get into the discussion of well what's the risk will they really it's just java swing i mean come on what's the problem right how bad could that go with you know like the entire world technically isn't it i mean yeah now that we're in python 3 world bango was part of that it's really it's really beyond the security thing it's also all the ecosystem around django the third party packages like a lot of times if you look their project that says i can't update why can't you update they did two things they're using a third page which falls into that you know touch it you you broke it situation or they did something custom at one point they they went off the guardrails and uh you know the bill comes due i mean it's so tempting actually and i actually want to speaking of going off the guard rails quick note that um django just passed flask to stars which is a really poor metric of um popularity but nonetheless we'll take it um because congratulations it's very easy to you know spin up a couple api endpoints and boom you're using flask that's a very different thing that's like you know as dhh would say that's a lego versus the lego truck that is a framework like django um and anecdotally a lot of places use flask but in terms of a big site that's all flask that's much less common than all django yeah well i was thinking about this this morning and it you know the flask and django are pretty neck and neck in terms of popularity right they're they're not on github yeah yeah sure um there's these metrics in popularity they they're like all over the map so one of the one of the thoughts i had though is the people that use flask and i'm this is not a knock against flask i like it but one of the my sort of impressions is if i just need to like you said just create a couple apis and just we're just going to get something going real small and simple and just roll like those people are not in as invested in the ecosystem and the framework as i feel like the django folks are i feel like the django folks it's a more encompassing part of their development experience and their development life cycle like django feels more part of the project uh when people adopt it and love it yeah i don't know what do you guys think about that yeah i mean i mean it has to be right you need a dozen apps to use flask and and actually i i hope i hope that we get david lord on to talk about flask because he's a chango cons i mean it's not a competition i don't mean to say there's a competition between the two but serve different purposes i would say carlton right yeah different styles as well like you know if you want to um if you want to put together something with why not flask but i mean i've been using jag for so long now that if even if i just need to spin up two end points it's much quicker for me to do that in johanga than it is to go and get a supposedly micro framework and work out you know how am i supposed to use this in fact do you have a whole talk on this carlton i think from james yeah no djangocon us actually i have a we can put the link in the notes i have i made up a repo with the code because you didn't provide code um [Music] but yeah you can have a single file django project same way you can for flat because a lot of times that hello world comparison will lead people to assume that flask is much less complicated than django and it's a little bit less but it's a little it's more around to how it's structured which is the point of dalton's talk yeah so the the talk was called um how to use using django as a michael framework or something like that and it was about the base http handlers the kind of that really real core of the framework and those right you know i put up a few examples from different frameworks from like flask and an old example and um style you know async micro framework from tom christie and then yeah so for people who uh sorry yeah for people who don't necessarily live and breathe the web stuff like the three of us do yeah give them a quick definition of micro framework before you go on well the i in the talk i get i was like you know what is a micro framework and i think yeah i'm asking you because i don't want to put my foot out there right but the the answer i came up with was it's got a great hello world right yeah okay sure like you know it's just the term but i think the i the idea is that um it's easier to contrast it with like rails or jang rails and django they come with the batteries included with everything you need you know you've got you've got an org you've got databases you've got migrations yeah all those stuff was your micro framework you perhaps get the call http handling and that's about it and then you have to go and find a forms library okay i found a forms library and then you have to pull in an orm or a database of that okay i'll use that one and you know so there are there are um node full batteries included frameworks like happy is very good it's got everything you need but like the classic nodes example is oh you know i get express and i pull in this this thing for passing urls and that thing you know so there's a continuum but micro frameworks fit more towards that you know you put the pieces together yourself whereas the batteries included framework like django you get not everything but a lot in the box right right so your your experience is more django pieces django building blocks then a little flask a little sequel alchemy a little this little that yeah yeah definitely definitely and i've been doing it so long now that i i'd struggle to break out of that i i just you know i throw in a bit of starlet or a bit of fast api see what's going on with the new frameworks every new frame that comes out i'll always give it a run and then my question is well okay well what can we learn from that for janet yeah i think it's gonna be interesting goodwill i just think it's really a large site if you ask them like what language and frameworks you use it's like everything you know i mean just because of the needs of a massive site it ends up being it's hard to say that it's truly one thing i mean instagram is still has pieces of django in it um but you know it's at that scale it's its own thing uh and i think you know the micro frameworks are really good for for doing that there's also this might be a pessimistic take but i've heard people make that a micro framework allows you to switch the complexity from individual developers who may be cheering you just as much up to your upper level because they only can touch a tiny part of the the monolith so they can in a way do less damage um that's actually an organizational argument for micro framework is that only the software architects or the senior people fit it all together they they uh they weave the pieces or they put they don't know whatever that i guess especially if your testing suite isn't as good as it could be yeah i don't know i think there's an interesting conversation about like monolith type software styles versus not i'm actually a big fan of the monolith style like all my attempts to break it into little pieces uh at least in the micro services which is not the same as micro framework but i always feel like i've i've quadrupled my deployment complexity to half my software complexity and i'd rather manage half as much software complexity as you know twice as much deployment right like if you were part of a five-person team in a large organization assigned to fix something and you're just like there's no way we can get done within this monolith but like oh we could spin something up and solve the problem and move on you know play that by a lot i think you know or in an individual project you get you get fancy and you customize django or you use a third-party package that is out of date or maybe you shouldn't use any of the same issue yeah well i i don't know like okay we were segueing slightly back in into the deployment topic which obsessively we came to talk about yeah i think the thing with microservices right so if you've got a massive corporation you can't have all the things going on right in one team so you need to segment it somehow and then you can define service boundaries and it starts to make sense but when then all the the tech blogs become about microservices and how this is the way and then learners come along and they're like well i've got i've got to build my thing using micro services it's like no that's since that's really not a good move but there's where the the blog posts not for you know and now this the pendulum swings back and the you know there's there are lots of posts now about how micros monoliths that making return and how they're the way to go and so hopefully the beginners come and see those posts but when you're learning and everyone's saying oh you must use a micro service architecture it's like hang on yeah yeah because the people who are knowledgeable are writing about their day job they're not writing about spinning up a django app on a weekend yeah yeah which is possible and you can deploy it too which we could should we get into that deployment well i you know i i do want to just point out i think this might be the article that i read like yeah you're not google you're not linkedin you're not facebook you're not netflix there are people who actually that's an inaccurate statement about there's plenty of people that work at those companies but like you said carlton the people who come along they see these these companies who they respect and say they must be doing it right and so often with these these deployment stories with these design patterns you know should you have like separate caching servers that run like something like redis yes you should no you shouldn't and that's the right answer at the same time but with the the contacts that you need right are are you trying to run 10 000 servers and let 500 people work on this project or are you two people trying to do a startup like those are not the same trade-offs and balances you want to make right right yeah and it depends as well on your model so one one example that i really like is stack overflow now they're built entirely on the microsoft stack so they've got sql server and they're using.net and but the basic point is they've got a really big database one and then you know a few worker processes in front of those and that's it it's a it's a classic monolith and they're one of the biggest sites on the internet and yet they're incredibly fast yeah yeah and yeah exactly as fast as you could ever want okay they they do it in this kind of um monolith old-school styles um you know vertical scale make it bigger don't spin out parallels just make the thing bigger buy a bigger um database server so that's that's you're not going to be bigger than stack overflow right and then another example we have when you are you will reevaluate it anyway whatever you do now is not going to solve that problem yeah but you're not going to be bigger than stack overflow and then we had another example which was dr uman they came on um matt lehman from those from docker and came on django chat recently and he was um they they've got a more containerized approach to the to it but the thing is they're doing peer-to-peer communication between you know many simultaneous peer-to-peer video communications because doctor on demand is like a tele medicine right right right like i need to book a uh a video appointment with my doctor yeah exactly and so but they've got they've got so many um so many of those processes needed to be spun up that they need something which scales out and then back down again very easily so they've got a kind of more like modern more you know a cooler technology they're called technology they're not as big a stack overlay probably in terms of raw talent raw traffic but they need that flexibility of architecture that's what we always think about right we say it depends that's our yeah it depends it depends exactly that's your your subtitles yeah i do context right people talk about design patterns deployment architecture there's those are always within a silent not mentioned most the time context in which that makes sense and you've got to decide are you in that context are you not yeah yeah what problems are you trying to solve like you can't innovate everywhere like there's so many pieces to a website do you want to innovate on deployment not until you're you know instagram i don't think yeah yeah yeah absolutely that's all yeah well i think that's a great point and you know it's when you're small the most important thing is adding features and going quick right when you get bigger the most important thing is to not go down right if random little project that is like an ordering service for a restaurant in milwaukee it if it goes down for half an hour it's not ideal but it's not the end of the world if google goes down for a half hour people really notice you know it's like front page news type so it's it's just a totally different thing now before we move on to more deployment stuff uh we're kind of in there i do just before we get away too far maybe we could touch real quickly on some of the new features that are coming in three two and like the the django three stuff that you guys are excited about yeah maybe can you start with just three in general carlton because i think that makes three two have more context well okay so but three introduced is it three began the process for making django async right so we added um so historically python has this um the whiskey the web service gateway interface so django is a whiskey framework flask is a whiskey framework it was this this standard so that application servers could talk to protocol servers which could talk to the internet without you know each framework having to have its own protocol service a gunner called right it's a whiskey server and it can speak to flask and it can speak to django right you can use that and i can use microwhiskey and yeah it's we don't have to coordinate or do anything it just happens that's because of the wsgi or whiskey thing right yes so that so that's the standard and so in order to make things async um there's this thing called ascii which is the asynchronous web gateway interface i don't know yeah i don't know i don't really yeah right anyway it's not whiskey it's asking so first of all django 3.0 brought in an ascii handler so it wasn't async at all but you could run it under an ascii server and then 3.1 brought in uh brought in async actual async views and you can um define an async deaf view and you can use i don't know httpx which is like an asynchronous um http client it's like request three yes right what about what's the orm story does that uh support ac can await yet right no so that's not there yet so this is something that will develop over probably over the course of the four jungle four lifestyle so there's plans and there's thoughts and we need to get to the point where you for with the orm where you can down to your kind of filter call and so things like filter they can be totally synchronous because they don't actually make do any io they don't actually hit the database but when you then go well i've got my query set and i'm going to iterate it and i'm going to fetch the objects from our database we need that bit even if the actual connection is run in a thread or whatever we need that bit to be fully async and then django will feel async as it is at the moment if you write an async view in django you kind of have to say well i'm not going to touch the db i'm not going to i mean you can't you can you can wrap the orm in a in a sync to async rapper but yeah you kind of lose the point um at that yeah yeah but that that's coming right yeah that so andrew yeah so andrew golden who's uh driving this effort he's he gave a talk at uh djangocon europe about the structuring of this and what it's going to look like and it's like yeah that makes sense this is going to this is going to work and we don't have to get what's it nice is we don't have to get async all the way down very to the very bottom because we can run the actual we can sort of hand off the actual database connection in a thread executor but from the outside of the orm it will look async and then you can you know you can stream out your you know your content records of maximum throughput as you want to that kind of thing yeah well the fact that you can already do external apis and if you're going down the microservice path you can do your micro service calls with httpx and await those that's already yeah yeah exactly so so this is so without and this works what's amazing about the way andrew is just absolute hero but um he put it together in such a way that you you can run this with a whiskey service you're running django 3.1 with gunner corn like you always have and you think yourself i just need to make a couple of api calls but they're quite slow and i want to make them in parallel you can do that just by writing an async def call and then you know making the parallel calls using http xa and it just works and django does all the rest for you and adapts it and you didn't have to change your application server you didn't have to do you know it it's just like yeah right one of the challenges if you're talking to the database is you say okay find the the bottleneck was we're waiting at the web server level at the django level and then we're going to push that down to the database we're going to just make all that async all of a sudden all the pressure is now on the database which can be a problem but if you're talking external apis you're now pushing the pressure onto the internet which is way scalable yeah and it's it's always going to scale more than you right like you know you're you're not going to need that many client requests probably um yeah yeah i mean also david smith out there says 3.2 will be a great release uh you guys have done a great job getting many patches over yeah for sure thank you dave we had were working really hard it was we had a we had two longer lists and we got you know one we had to bump for django 4.0 but the rest we got in so we were very pleased okay so 3.0 async and away this is a big deal and three and yeah and so what's yeah and so those are the big features for 3.0 and then what's coming in um 3.2 is we've got various other bits bits and bobs you can customize um primary keys so traditionally they've just been autofilled which is in in 32. well eventually you know if you get 22 billion of those or something you can run out so we you can now customize that for begin and over the next couple of releases you know major releases we will um we will make the default big in because that that's probably what it should be in 64. because then you're never going to run out of primary keys but that's something that you know came in um the big sites run into that especially if you start creating i don't know um events an event log you know a site can generate a lot of events and they can add up quickly you know so anyway that's important functional indexes in the in um in the orm so you can um create an index on an on an expression like you know that that these were greater than all that the sum of this was and and then you can query on those at full speed because they're indexed that's a really oh really so you can do a query like that the sum of the orders of this the customer is greater than a hundred dollars and that's a relationship yeah and then you can create an index on that value and you've been able to do that in raw sql for you know any amount of time but that's now exposed at the orm level and that's nice that's awesome yeah for people who are doing reporting or or that kind of thing it's yeah that's massive and then we've got i don't know a new memcache back end for the cache we've got um you know updating the the api for using the admin for um nice decorator api for creating um various admin con customizations we've got themes in the admin we're going to show the dark that's a big one for people will see right away is to because the django admin could use a refresh and there's been all sorts of third-party ways to customize it but now be built in a bit more that'll be cool in the in the blog post for the authorities i described it as a mess with new features and that's exactly what it is it but what what's nice is it's not there aren't apart from async which is coming um there aren't any new major features in django right it's 15 years old it's it's it's rich and mature and feat largely feature complete but each major release each eight months it's a it always amazes me when we're drawing to get up the final release notes how much depth and extra like substance there is in the features that we've managed to add and that have been contributed over the eight month period yeah that's fantastic i don't have anything to add carl yeah well one thing i did want to one thing that i you know comes to mind so i feel like you're capturing much of the modern python awesomeness one other area that's i think interesting i have no idea what your plans are around but maybe you could just give us your thoughts is uh type ins and type annotations yep that's difficult for us carl about that a little bit yeah i mean that's difficult for us because django i mean if you take the one it's super dynamic um and there's an amazing project django stubs where they've got stub files and they've got you know they've done a super job and it really does work well so if you load up vs code or pycharm these days you get very good um autocomplete around things like django model field definitions yeah and that's all powered by um django style yeah underneath right yeah yeah it totally is a year or so ago there was some discussion about whether we would make those inline hints in django itself and the technical board at the time said no um because this we need the typing technology to evolve a little bit further in python itself before django can jump on a and jump on and say look we endorse this particular technology there is yeah there's various ways of doing it in various various type hinting type checkers and various and so say we'd say we we favored my pi which is obviously the the endorsed one but what about the others you know we can't support them all and they might change and high right all the different various uh initiatives yeah yeah and we can't we can't take it out once it's in the thing with the reason why people love django is because it's super stable you know you right you write a site five years later you don't really have to do very much to keep it going and so the technical board at the time said no we're not going to bring those taipings into django but that will be reviewed you know we'll look at it again in a little while time one thing i will say about typing in all the peps it says type type into to remain optional they're not meant to be compulsory even by convention right and i i do feel maintaining django a certain pressure to have them i i do worry that that optionality of type hints is perhaps undermined a little bit in the day-to-day development i'm not sure i mean because i also code in swift right which is a statically touched yeah swift is pretty strong in its syntax like you can't even null out objects even even if they could be right if they're not allowed to be optional explicit there's a lot of interesting stuff happening in the swift type yeah i mean swift is a fantastic language but there's no option right it's it's type hints or it's type annotations all the way and then when i come back to python after a few hours of that i'm like oh this is so i know you know the thing that i i really the comparison that i make a lot is between typescript which is type annotations for javascript and python type hints and i always walk away from typescript feeling like ah that was way harder than it should have been why was it so frustrating and fighting me whereas in python you might get some squigglies because you didn't quite define something just right or it wasn't defined at all but then it just it carries on right whereas things that are completely it must work within this context they they can become challenging especially the reason i bring up typescript is this the stuff that it brings in is not necessarily typed just like python whereas swift is end to end it's all from scratch under that same system so it's coherent but you know bringing to say jquery into typescript like there's no typescript jquery i know there's like stubs you can put on and whatnot but like that kind of stuff is more python like so i think it's it's pretty interesting yeah and jan goes in that very much in that boat where it was never written with tie pins in mind yeah of course they didn't exist and if you look at django stubs it's awesome but a lot of the things are like string or any and it's like but that's horrible right you don't want to write that every single time so that's that's a that's an issue and and then another thing i see which i'm not sure about sometimes they they make a type like a model um the django model admin they make it a generic that takes takes the model type which tells you what it's the admin of and i remember and i look at that you're like back to c plus templates or something right yeah yeah yeah and i see i see where they're going with that and i it's amazing what they've been able to do there but i remember coding objective c ui table view say and what you would always do is you get you get your object your row class in from the ui table view delegate where you're getting a list of sales right so like a list of email messages and you'd immediately cast it to the type you wanted so that you knew what you were dealing with and yeah in a way when i get something back from a model admin method i'm quite happy to write colon you know model name yeah to tell the the editor what it's meant to be to tell the type checker what it's meant to be and then for the rest of the method i i get the author and you probably don't put any more type hints because it just now flows and it's i agree so good at generating like allowing you to generate code incredibly fast if the tool supports it uh one quick comment or thought that uh before we move on um this having typed around the orm is really interesting because all the the meaning all the big orms seem to do the same basic flow you know i'm thinking you know django rm um sequel alchemy the even no sequel ones like engine which i use they all have a class which has the columns defined as descriptors so at definition time they create the tables or the collections and then at runtime they become the scalar versions of the thing they say they are right an integer column is now actually an integer so what i've i've done when i define the model class is say like name colon stir equals string column and so the python thinks it's all the types are actually what i said the primary types like in the model and then the underlying orm can do what it needs to do but you know the rest of my code is like oh that's a that's a float column right there or float field that's been really helpful i don't know i haven't run any problems doing that but uh it's been pretty helpful yeah i mean it's the thing that that brings money to it well there's data classes right which they bought in three seven or three eight yeah and then um pedantic is the other exciting thing which is yeah so you define a model call it a model with exactly this it's like field name type with an annotation string or hint or whatever and that works really well and i can imagine us generating um django or m models from that kind of thing but then you end up needing um options like is it um is it nullable or is it yeah you know is it required is it what validators does this field have and then it starts when you start to add validation it starts to look almost like what we've got now i mean pedantic's got one good advantage in raw serialization speed is very fast so that's something we can learn but the short answer is yeah i don't know but it's exciting times isn't it it's very exciting times all right uh let's talk uh really quickly about maintaining maintaining your your content or things that you generate like you guys all write articles books do online stuff even podcasts um so 3.2 is out you know what what broke like real quickly well maybe you want to just talk about what you've been doing to you know yeah up-to-date django books because the release cycle of every nine months doesn't uh overlap with the traditional publisher cycle so for me i mean i'm on version i think five for most of the books so yeah i was on 1 10 or 111 so i've it's sort of like writing the book again every time i basically go through from scratch and because all the code is linked to the text um because i'm self-published i can do all that i have my flow down so really it's i i have a kind of a list of new features i know that are in there so i'll play around with them to make sure that things don't break and then i'm constantly emailing with readers so i have feedback on kind of what works and what doesn't so half the new features or fixing things so it's smooth and then half um just making the text so so at this point i feel pretty good about the flow of of all three and um you know people say what about this and maybe i can explain a little bit better i added i mean so for a 3-1 added in the beginner's book i really wanted to have proper deployments but not go as deep as i do in the profession so i i did introduce environment variables and showed um i think a pretty elegant way to get environment variables and to have some lockdown um for the deployed site whereas before in beginners it was just sort of like the local version which is pretty even was what you deployed because it was more about getting something up but i was able to introduce environment variables we could talk about that more um there's a third-party package that's great so so that's always the tension for me is showing and telling right like i will explain everything but i don't want to overwhelm people and so that's part of the the thing i have to think about for 3-1 so i don't know for bingo being so stable at least you can say all the stuff is still the same there's just new features we haven't mentioned or a new way maybe is better but yeah as opposed to this does not work anymore well it's the difference between what trips the professional programmer and someone who's new so for example in 3-1 the path lib was added when you create a new django project the settings.pi file which is the default settings the way the routes are done is a little bit different it's like a minute stack overflow thing for someone who's used to using django or breaking stuff um but that can completely derail a beginner so there's there's there's usually a couple things like that um and you know so in that case like i have a dedicated blog post because i knew that was coming and just this morning i got more questions around it so it's that's sort of the the thing that fund me is figuring out how do i um you know be compassionate to the true beginners but i think we're more further along yeah absolutely um it's not a lot absolutely not it's a it's a lot of work to do i don't know how you could do it with uh yeah i i don't either i was just dealing with some github issues on uh some folks who are having trouble because a mismatch of pip upgrades and other packages and it's just like it's just how it goes uh real quick uh john from the live streams really excited about the admin themes uh so that's really cool that um that is gonna come along yeah they add up to greatness i think that's i love that yeah that's a great great say all right let's spend some time we talked a lot about the plymouth already um which is why i've been dancing around a bit but let's go ahead and talk about deployment so when i create a web application with django or really honestly with flask or anything i'm i've got a cool app but it's you know web apps are not generally meant for the individual they are meant to go on the internet and be amazing and and connect things and allow the people to do stuff and that's a huge gap right so maybe i've just learned how to do django you just talked about your beginner's book will and yeah i've i've already finally got that one page that wouldn't show and the database stopped you know crashing when i did that one query because i checked for none now and it's all good wait i have to learn linux and i have to become an admin and what the heck just happened right so like how do you guys approach that like what do you tell that person yeah first of all i hand on shoulder i feel you because yeah it's just there's this massive deployment gap like we've got the the django tutorial we've got the django girls tutorial we've got the the django rest frameworks we talked people have done those they've got their app together they've come up with some ideas they've learned a teeny bit of javascript to make it that bit better and now put it online and exactly this i've got to learn linux oh my word well yeah among other things i mean it's two things though right i think i think like when i think about this well there's there's two there's two ways to think about one is making a government friendly which we can talk about and then there's the specifics of do i you know do i do it on a vps do i do it on a a pass so there's two separate things the first one i think we can generalize and django has some good notes on that um the second one is sort of a deep end of uh opinion i guess i'm in favor of like i use i use a roku um i'm a big fan of platforms if somebody had something that like hosted aws for django i would use that um well yeah i mean so and i'm i'm just going to throw it in here now i'm working on an app for this exact problem it's called button it's btn.dev and it's the idea is to be able to spin up a small environment for this exact i just want to get my app on line use case without you know you having to become a cis admin expert yeah so the spectrum looks like to me pass right platform as a service which you said you like heroku and there's other options as well um then i think maybe button is even before that i'm not entirely sure like so okay so how let me jump in you've got the platform you've got heroku which is there at one end and that's kind of like um they'll run your app but they don't that's it right or you know you can run another worker instance but then you say to yourself oh i want to i just want to put a file online and it's like well how on earth do i do that i can't or i want to put up a static website so i've got to bring in i know netify because another section yeah nullifies really nice for just your static sites actually yeah it is it's awesome but then all of a sudden you're running two services and then you want to you know do some log analysis so you've got to bring it it's like oh hang on i've got three services now running and it's it it gets a bit out of hand so then on the other hand you've got aws and you go to aws and it's like oh my word it's the paradox of choice it's just like that and azure i mean they're both incredibly powerful but it's just like oh my goodness look at this admin dashboard like i there's there's this huge thing with 50 choices i go into one and it expands into 20 then i need to figure out the right one of those 20. it's just it's mind-boggling yeah yeah exactly and so but where button fits in that is it's on aws but it's it provides the very simplified environment this is because it's part tool it's the tool to do it but also a guide that says look this is how you should deploy so the app puts together the environment for how you should deploy your django app or you can you do any app but you know i begin with django because that's where obviously what i know and then the the the difference between well why wouldn't i why would i use that instead of um a um a a platform as a service like heroku well because if you go out of it it's just aws and so you can go and move on to other things then you can when you do go closer to now you are kind of google or whatever i mean obviously you've got a growth now or down that road but your little ways you can go oh we actually need to do this other thing yeah and so that's what i'm aiming for and that that's launching very soon to be early access by the middle of february um you know beta by end of the quarter and then you know what what i call version what ends the beta i don't know end of the year i would imagine yeah yeah that sounds really cool we'll definitely link to it in the show notes i was when i was pausing there i said okay well on one end we have pass like heroku and other platform as a service options what is the other end is the other end linux virtual machines or is the other end kubernetes cluster no yeah it's it's kubernetes question it's well beyond virtual machines right so like to spin up a virtual machine is not a problem the the problem is that you get a bear os and then you've got to do all the apps get installed to turn it into yeah you can deploy on right and then you do that once and then the second problem is that six months later you need to upgrade it and you've got to replace that vm so that's very difficult and i think that's what leads people into this kind of world of containers and then into containers it's like oh well i've got i need an orchestration platform to ah and that's you know there are people who make a career doing that yeah you what you can't expect to do yeah i agree with carlton i will say it depends slightly and that like so in my professional's book we i show how to use docker and docker is for a smaller site i think actually you can put your containers online so you can in a lot of different flow is actually quite nice um but i agree with carlton's broader point about you know daddies and all the rest it's so yeah i feel like uh sorry carlton i feel like is the goal i'm setting up a kubernetes cluster and i'm running the data layer and i'm running the caching layer and like if you're managing that whole thing in a cluster you're at the far right end of the most complicated but if i'm going to deploy to a hosted kubernetes container and consume a database as a service in a caching tier as a service then it's then it starts to fall back to well i just get my container to run and plug in these connection strings and we're good to go i think there's it can kind of live on both sides honestly yeah i mean there's there's different approaches and different sweet spots for each individual the different the difference for me from is you can containerize your application and run it up but where do you container that too where do you run that container is that on a set of vms which you provisioned yourself and put a container management system on like kubernetes or is that on somebody else like is it basically service the cloud run cloud run takes your container and runs it and you don't know anything about where it's running so that's more like a platform as a service again yeah it is it falls back in that so will said he's a fan of heroku carlton let me ask you this question if you were writing an application in django that was expected to get five million data driven like proper requests not for css and whatnot but proper requests a month how would you deploy it right now i would deploy on a pretty big vm with as many um process workers as i need so i'd put stick engine x as my front was my front end perhaps in i'd probably use something like application load balance in front of it one of these things that aws will provide or azure got their their equipment load balancer then i'd have my nginx which is serving my static files behind that i'd probably have it's also doing ssl for example right your yeah you're investing reports yeah yeah yeah and they're handing or handling all of the certificate renewals and all of that kind of things which is probably worth the money because it only takes you a few minutes but you forget and then your site goes down and no just hand all that stuff off um so i put that on a nice size vm i'd have you know three four five gunacorn workers you know serving the application instances load balanced behind nginx um and then i'd have postgres on a decent size rds which is a managed database service behind it and i would sk as a first preference i would scale up the vm and i would scale up the rds rather than way before you scale out yeah way before scale out yeah i agree yeah edit then do it yeah as soon as you have like scaled out it gets tricky right you become you it takes you up a notch in that devops story yeah and then you you you need at that point you you're hiring you know an extra hand just to manage the ops an extra hand to manage the opposite it's like well what was the revenue of the application that justified that the salary and the social security of that extra hand yeah i mean maybe you're like well i don't really want to pay for that larger vm that's 80 a month instead of 10 a month but if the alternative is now we spend human hours on making you know three ten dollar vms run you know it's so easy for businesses to become pennywise pound foolish around these kinds of things right it's it's just like well we can't get you a new monitor and eq board like really you pay me like eighty thousand dollars a year you won't give me a new keyboard to be more productive or i feel like that's the deployment equivalent of that yeah no it's it's penny pinching for no reason i mean the other great example is century right so century is your kind of um look you log all your errors to it send your exceptions to it it gives you great stack traces and links it back to github it's awesome why would you not have this and then you're you're on the free account you know would give you 5 000 events a month or something and it's like oh we need 30 bucks to get on to the like the million events a month and the man just like no you can't have paid century like what what are you talking about exactly you're like well we can't log that event because of century and then you you're blind and then your app goes down and you spend four hours trying to work out what it is while you're losing business like that was 30 bucks a month for century just pay it but i think it didn't if your manager has felt that individual contributor themself right because if they if they haven't then yeah stop complaining developer you know yeah yeah exactly but yeah you should i always like i mean and at quizlet which is now um like half of all high school students we had we had a giant which are they still around their hosting company but we were having scaling issues they came in and we had the whole team cto which was great and you know at the end of the day they were just like you need bigger hardware you know if you can get more you know and as a business person if you can throw money at a scaling problem like yeah that's the easiest money you've spent yeah right you know uh one thing uh so what i'm doing right now carlton is i'm running nginx on ubuntu but i'm using micro whiskey and i came across this you know uh although i as i'm starting to think about the the asgi stuff you know unicorn unicorn and like um uv acorn worker processes is starting to look like a really awesome thing but what i wanted to point out is there's this great article by uh the bloomberg tech folks talking about configuring microwhiskey for production and man do they have a bunch of good little tips of like well here's all these things but oh did you know if you turn on like enable threads versus not or if you set single interpreter mode to true you automatically get better performance because it was configured to potentially run like python three seven and three eight at the same time and you're never going to do that in one process most likely and there's just all these really fantastic settings and like vacuum and whatnot to clean up sockets and whatnot so um people if they're running microwave production they should absolutely check that out that's a really i i read it a bunch of the way i was doing things afterwards just scroll to the image at the top if you would please michael the little diagram that they have yeah yeah but like yeah so that that looks almost exactly how i deploy like engine x front of a worker process you know that's running your python applications and you know talking to your database yeah exactly it's it's pretty standard i got more cached in there so i'd have redis instead of memcache but same deal yeah let me ask you yeah go ahead well i just said there's a comment about is does ec2 sit between of eps and and kubern yeah since you're aws expert okay so well i don't know about expert but i um so but on aws like you you this is this is what i haven't found in aw like i would love to love their light sale product but it just seems totally uncared where they kind of manage the cluster all for you but on the i can't even remember what the cluster service is called but the you have to provision the ec2 instances um and you can do it quite easily it's not hard to do but you have to spin those up and they're kind of your responsibility and then it will run the cluster service on top of it the kubernetes on top of it and then you deploy your containers in there um this is where something like cloud run is a bit easier because you don't have that layer of i'm provisioning these the underlying instances myself and you have to choose the size of them and you can scale them up easily enough but you know it's it's it's non-trivial to set up a cluster on aws that's always been my feeling as well i also feel like you're sort of committed to their hosted services and if for some reason you don't want to use them it's the step is not a tiny bit more it's a bigger a much bigger step to like try to rework that yeah i mean the the example is right you can run your own postgres on ec2 instances and you know you can provision the disks and you can do all that rather than rds um and for me i'm like okay if you've got a very specialist use case then yeah do that but rds is great just use audio just use the hosted service because again you're saving money and yet it's a bit more it's a bit more expensive per hour but not as expensive as you your time your life force yeah well i think also it depends right are you one single person who is building up an idea and you have zero revenue and you're just trying to do this for two hours a week to see if you can get a little tiny bit of traction you know maybe maybe you're it is worth an extra five hours right versus okay i have actual money coming in the door and i'm trading off building this feature or that feature like those are really very different contexts yeah and also also though you get yourself a raspberry pi and you can install nginx on it and postgres on it and no but you can run all those right and you can do it locally and you can bet you can run a apache bench again against it and you it will serve plenty so you can get not that you can use but yeah yeah sure but you can get you can run postgres is my point you don't need rds to run a small postgres yeah if you're running a slightly bigger one then yeah use rds and then if you're a specialist and you really need to customize your postgres somehow then okay yeah you know spin up the ec2 install postgres on it and customize it to your heart's content but that's well beyond my skill level and you know yeah but this is why they have hundreds or thousands of employees right like when people say why do the big companies do that it's like well why does instagram have a thousand whatever thousand engineers when carlton you and i could spin up a you know prototype relatively quickly it's like because we're not dealing with the traffic they are and so it just gets exponentially harder which is why you need a lot of people um for all these issues yeah absolutely will you mentioned something really interesting there that i would like to just touch on for a moment okay we're getting short of time ready you said you could run sql light oh well so that carlton has a good story about sql light i mean about how it's so generally people say well you can't use it you shouldn't use it at all but um there are some cases where that's not the case i mean if it's a read heavy application you can get away with it um simon wilson's doing a lot with data set um yeah yeah i just had him on the show uh his episode just came out this week actually yeah so he's great and that is such a cool project i feel like that is actually an undersold story for the beginners right because deployment of web application often means deployment of web application plus database server plus backups of database server plus like all the like all of a sudden it goes from you know 20 to 90 heart or whatever right um or you go to hosted and you're like okay well i still got to back up that thing potentially and you know there's just you've you've got potential migrations i don't know there's a lot of stuff going on and if you can say well until you actually get much traffic you can just say here's the db file and the sql lite connection on the one machine that i have and you back up that file every now and then that might be a good story if the alternative is it's too much for me to get my app out yeah yeah no definitely especially if it's a blog or a um content site like a shop catalog where it's all read only and you know maybe you're using the admin to manage the the content on it if it's only one person using the admin you're not going to have concurrent rights which is the thing about sql lite and so it's never going to be an issue and it is fast it's fun read read only workloads it's fast it's fast enough it's yeah it's very fast yeah um and then it's cool there's no server for people who don't understand are not totally aware like it runs it comes with python and it runs in process there's there's no other server to set up and connect to yeah yeah so carlton correct me on that at one point because i was so saying oh yeah no sequel light and he was so i have to give credit to carlton for there are some instances he's the secret about sqlite it's got a writer headlock like a wow mode which means that actually you've got a good chance of being able to do kind of concurrent rights too and if you you know the django's orm has got a retry value which if you set that you know if you know a little bit higher if it if it gets database locked it will try again in a second and then you know you can go quite a long way enabling these things and then when you finally in production actually get a database was locked error then you could think do you know what i think it's time we moved to postscript yeah yeah in my world i'm running magady b as the database and it it doesn't make sense to consider running that on sql light but i can remember back when i first started deployment like okay well i got to learn linux i got to learn internet i gotta learn microwhiskey like okay what other deployment like how do i have to learn running my database on these things there's just there was a lot and i can definitely see if you could say well here's an intermediate step to get it out and get it going and then you just change the connection string at some point over to a a big separate server you know i think that's a really good path it's a little bit like um you know raw sequel versus django models um this is timely because i've had a thread emailing with a reader who doesn't quite was has something in mind and he's like i modeled it all up i the scheme all out in sql and you know it's like sql is easy to learn the basics and really hard to scale and while jane is equal you really really really should resist doing that unless you're way better programmer than i am yeah um so whereas before you would have to learn tons of the same thing with deployment you can get a lot of the way there by trusting someone who says them until you need it don't bother the same thing with database stuff like okay you know do some basic sql understand a little bit of the relations but that's the power of the django orm is that it will handle so much of this for you and if you think you need to go custom unless you know if you have any doubts you shouldn't do it yeah and in the migration side that's a huge part of a challenge if you were maintaining it yourself yeah yeah i mean i was you know andrew andrew was responsible for the we're just doing most of the a lot of the async stuff now nice all right guys we're getting short on time but i do want to just really quickly cover one more thing server's up and running feels like it works i watched it all day it was fine i want to walk away from my desk i want to know that it's probably still fine and to me like carlton you already talked about one thing there's some really great monitoring services that you integrate at the api level like you plug in as a library to your code uh sentry being one of them um they're they're really great they sponsored the show for a while so thanks for that as well but i i use century on yeah they're great and i uh i've got sentry running on my apps and every now and then i'll get an email and a lot at this point when i first integrated that type of service i got a lot of oh i didn't know that was happening oh crap i'm gonna have to fix that that's why there's a level of vlogging and stuff right yeah yeah absolutely and um but once i kind of dialed in now it's more like well somebody tried to send like some binary hacky thing that broke the url parsing but it's not really a problem it's just right but having that thing there is is really important i think yes absolutely absolutely um century i i just can't see a reason not to use it even you know they've got the free plan why wouldn't you have that um yeah the free tier like once you run out you can decide whether or not you want to pay for it but yeah at least get get some kind of insight into the errors that are happening yeah and then the other the other thing that i've a fan of is prometheus it takes a teeny bit of setting up but again you can get yourself a raspberry pi and you can play with that locally and it's not that hard you can put it on your mac or you put it on your windows machine it will run but get a raspberry pi set it up monitor the device prometheus is good fun there's a dashboard that goes with it called grafana and then they do a log thing called locky which you know yeah they i it's you you know you have to configure it yourself but it teaches you about your application you have to say okay i want to monitor this and then you can put a little couple of tags in and then okay you get metrics then for that bit so you know perhaps you've got a slow view so one thing you can do is you you can put on your nginx logs you can log the upstream response time so you've handed off the garner corner to microwhiskey and nginx will then log how long those responses took and then you can say well actually that those responses to that particular request is taking a long time and then on that request you can go into that view and you can add a little you know a little bit of instrumentation and then you can start getting metrics for what that view is doing and yeah yeah that's really why i want carlson to build his thing so he can do this for for me he does over all of you guys yeah i'm also a fan of beta dog i think that would sound pretty similar oh yeah okay they do they're i think they're boston based actually but yeah they do that yeah yeah nice and so this is apm application processor exactly so there's quite a lot of commercial solutions and then um prometheus is the sort of diy um yeah nice equivalent okay cool um so that's the errors and performance the other side is just the website is down right so maybe there's so many different layers and moving parts um for example like we have very little downtime with our train courses and stuff but one thing that did happen is we have this thing that will take uh the main ip address and switch it to a failover server so we can do reboots and patches and then it'll switch it back and that's all done through an api through like a git push and then it all just sort of goes down the chain well at one point there was a bug where that switch of the ip like disassociated it with either server so the server thought it was fine it's like whoa things are chill right gave me so yeah but but the site was just timing out or so i don't remember what happened but it wasn't good so um i think there's some really nice uptime monitoring things that that are free that people should just plug in to go hit these three pages just to see i can talk to the site it talks to the database and answer comes back yeah yeah for sure i mean i've got those configured i was i know we're almost out of time i did want to mention on deployment i think one thing that trips people up especially around django is static files which is something if you're doing it you know vps you know and i think the key thing is that your server doesn't want to run your static files like it can ways to do it but you know so both within django django out of the box defaults to local settings and the django has a local server they'll just run your static files to put that in deploy and deployment you would run collect static which is a command that makes a single static file and you probably want to use something like white noise but there's a couple steps there but something that really sort of intermediate level django people it really trips them up um i have a blog post on that because i forget the commands there's like four things to tweak you just have to do every time but yeah it worked locally why doesn't work live and it's like partly because people don't understand you know how their server is working because they don't have to um but you know that's that's i just wanna yeah awesome yeah that's one of the big four right so get your code in place however you do that tarball get pulled you know whatever you get it there configure your virtual environment you know so in pip installed all your requirements configure your database and make sure you connect to that and get your static files in place that's the source the database is the other one that big you know well you know this might call like beginners they're like well i update it locally and i i pushed my code why isn't my production database different right it's yeah it is like i still occasionally make that mistake you know just but you know your code is not your two separate databases yeah that's what you want as well is you want you want to be able to um write your blog post in locally and then it appear on your server you don't want to have to go oh no now i have to paste it into the admin on my remote thing yeah it depends on how animate you want to go i mean for for simple like so my learn django site which is basically one admin largely a content site i mean in terms of easy peasy it's just django and i've got cloudfla uh in front for it's done it's super fast i get you know decent amount of traffic i don't have to think about it i've got i think i've got pagerduty one of those you know mm-hmm and yeah okay yeah that's the one that tells you if it's it's completely unreachable right yeah yeah but it's an external one that you know exactly to your point because you can't always trust yourself yeah yeah there's some interesting ones i use status cake uh and it's neat but there's some um there's some one that i heard that dan bader was telling me about that would sound a lot nicer but i'm like but this one's already set up you know it's it's not that important i get i get notifications if it goes it's all this stuff right it's like you know it's plumbing right like i'm happy we have the new silver pipes like uh my bronze pipe's fine i'm just gonna leave it yeah wow that's well that's docker for carlton's you know so i use docker loads your secret user yeah all right now all the time all the time all right let's let's just wrap it up really quick uh there's a django newsletter i i learned about that that's interesting you guys want to just mention that that exists yeah yeah so that's something i run with jeff triplett who's um partner at revsys he's a python board member um very involved with django uh so django dash news.com there wasn't an uh regular django news there wasn't a podcast so he and i have been doing that for a little over a year and has projects articles um i sort of wish someone else did it so i didn't have to do it but um yeah we got a lot of people using it so that's a good resource for the community yeah fantastic all right so before i let you two out of here final two questions really quick uh will i'll go with you first uh okay notable pi pi package out there that you were like oh my gosh i ran across this the other day i can't believe it ah that's a good question i'll i'll go back to an orig an old school one which i think is bleach because i've been thinking about a course on forms and bleach is kind is a pipe you know python one not django specific but you pretty much always want to have that added uh django this validates like user input to make sure there's no like cross-site scripting type stuff yeah yeah so that's okay behind um not a new one but uh i think it you know along with white noise you just got to use it yeah awesome you know the the one that's just really captured my imagination recently is rich which is the yeah richard score the the library for creating basically um nice terminal output nice console but it has like tables and all sorts of stuff yeah that's right but like it's got this inspect functionality where you can get and you're sitting there and you're in this shell and you're like i want to see it and you print it and you dear it and you you look at the dict and it's all it's not and then you go inspect and rich formats this thing where it's like oh yeah i can look here and i can see exactly what's going on and it's just amazing and 20 000 that's what i love about coding right i've never heard of this before and it's clearly a very established thing yeah well i think it's pretty new but it's very it's it's taken off quite yeah it's about a year old it's taken off quite steeply in its adoption uh one that i ran across really recently just threw it out there because it's a django semi-related one is disk cache have you guys heard of that no so it's a really interesting caching plug-in that will instead of using memory for caching it will store it onto local discs because you usually have way more hard drive space than you have memory in the cloud and it plugs into django to like be a stand in for the cache there okay fine yeah i mean i'm a big fan of um file cache in general it's like memory is expensive right so memory cache is is the best way and redis and memcache are a good ways of doing that all in memory but then you think i just want to generate some html once and then just pipe it off the hard disk exactly to me this is a kind of the equivalent of sql lite versus a real database it's like you don't need redis or memcache or something like completely set up just like until it gets beyond whatever anyway it's it's it looks pretty interesting um all right then by the way like we we include packages every week in django news and there's also like an awesome django repo that jeff and i do um you know because the problem is you want some degree of curation right like something new that's right like legit enough to be worth looking at yeah absolutely thanks yeah that's very cool all right and then final question uh if you're gonna write some python code what editor do you use vs code same for both of us yeah right correctly well i have to yes base code very nice um use it a lot also though i still like bb edit yeah right on all right keeping it old school every now and then just for a little nostalgia i tell you what right so i'm using bf code and i'm like but i need to do some transformations or i need to you know do a multifile search different and vs codes go all that stuff but it's a bit you know this is built in javascript whereas you know bb it's a native mac app and it's got a lot going for it what do you usually i use pycharm although i i did very i'm yeah i'm a big fan um local company here in portland panic came out with i said called the nova i think it's nova they just came out with a brand new editor it looks pretty interesting as well yeah yeah what was their ftp they have yeah they make transmit i love transmitting yeah i use it all the time all the time yeah they make great stuff we were talking about yeah fantastic cool well i all right gentlemen thank you so much for being on the show thank you for having me yeah it's been great and thanks for all the work on django and i'll catch up with you all soon all right thanks for having us for joining us bye-bye thanks everyone for listening as well in the live stream and uh yeah i'll stop
Info
Channel: Talk Python
Views: 755
Rating: undefined out of 5
Keywords:
Id: 9SmY2b1EwwY
Channel Id: undefined
Length: 76min 10sec (4570 seconds)
Published: Wed Jan 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.