Lightning Talks
Published November 3, 2017
This video features Dan Dietz, Filipe Ximenes, James Bennett, Paul Bailey, Richard Latimer, Tim Allen, Vic Yang and Wayne Merry at DjangoCon US 2017 in Spokane, Washington, USA.
DjangoCon US 2017 - Lightning Talks Day 2 by Various Speakers
00:00 Filipe Ximenes
05:42 Paul Bailey
10:53 Richard Latimer
14:30 ???
19:14 James Bennett
24:11 Wayne Merry
28:54 Tim Allen
34:23 Vic Yang
35:26 Dan Dietz
This talk was presented at: https://2017.djangocon.us/schedule/
LINKS:
Follow DjangCon US 👇
https://twitter.com/djangocon
Follow DEFNA 👇
https://twitter.com/defnado
https://www.defna.org/
The speakers presented a series of short projects and practical lessons: Fix My Django links Django exceptions to community-contributed explanations, while Zen of Django simplifies setup, secrets, dependencies, URLs, and deployment for newcomers. P-Track provides database-free, encrypted tracking pixels for email and web analytics, and a proposed Django migration backend would use MySQL 5.6’s online DDL options to reduce table-locking during schema changes. James Bennett reflected on maintaining Django Registration for more than a decade, including the challenges of evolving Django APIs, custom user models, templates, and limited maintainer time. Other speakers argued that flexible employment improves access to skilled workers, showed how PostgreSQL and Django REST Framework can expose tens of thousands of research datasets through introspected APIs, and shared brief introductions to job seeking and beekeeping.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: Okay. Alright, so um I 'm Felipe, this is Flavio. We are both from Brazil and we work at Vinta. Uh we are partners there. Um and we are going to talk you to you about fix my Django. So um this started when uh we used to program in Angular One. And Angular One had this thing where whenever it displayed an error, you could click on the on the link in the console, and you it it took you for like a web page where you could see um something about error, how to fix it, uh what was it? And we thought that was pretty good. So we decided to do it for Django. And that's when we created Fix My Django. And we are going to show you in a live demo now.
Speaker 2: Okay, uh so here is some code that has a bug. Okay, so here is like Hope you can see it. Hazer I have a view with a template that does not exist. And then on the URLs, I just try to use that view. And When I go to localhost and open that view, it shows that the broken template template does not exist. And it says that FixmyJungle may have a solution for this exception When we click it, it goes to FixMyGen website, filtering by the exception type we just saw, by which module it was erased, by which line, and then we can click
Speaker 2: And we are able to see more information about the exception, the traceback that generates that exception, this traceback is like sanitizer because it doesn't show you show the the environment before the site packages uh so it it will not show your home pay your home directory or something like that and then show how to help reproduce this book and how to fix it. You should verify if there are any sp spell errors, if the template name is correct, if the folders are correctly uh configured on templates, setting and everything. Uh to install FixmyJungle you just need to pip install fixmyjango and go into the settings and add
Speaker 2: here to install depths and by doing this we override the the full error page for Django development server to be able to have the the this link that I showed to you. If the section doesn't exist in fix my Django, you can contribute with it. So for example here another case where you can add the error to fix my jangle and when you click it you see that we already got the exception information. That you just saw and we don't have it. And you can add some information about how to reproduce and someone else can uh help you on how to solve this.
Speaker 1: All right, so um Fix My Django is is uh uh open source project. It's on GitHub. If you go to uh slash fix my Django, uh I'll try to Together. Um and the history of the project is pretty much we created this two years ago. Um we used it internally in in at Vinta. Uh but the thing was we wanted to gather some initial data so like after after that we could um publicize it more. Um we that's actually why uh we we couldn't get this uh out because because um we didn't got much engagement even inside the company um and we think that was pretty much uh because of the way we are doing stuff so um we nowadays we show the link we It would be good to like actually show the
Speaker 1: the full um resolution in the Django error play page. So next steps would be we got a couple bugs. We s kind of stopped working on this uh a few time ago. Um so we do have bugs we need to add support for uh maybe there's some some bugs on Python tree and um Jam. go the latest versions. Um so yeah we need to put display the how to fix the the errors inside the the error page. We um we would like to have uh So you could like submit the the the have the form for submitting yours inside the Django page as well. And um it would be good to have ticketing for so like anyone could
Speaker 1: contribute um so we will be here for sprints and we will would like to work on this uh and so if you want to help us out just talk to us thank you do do we have time All right, so we got a few seconds. What is it? You closed it. Yeah, so um as I said uh we are from Brazil and we have a PyCon there. Uh it's called Python Brazil and it's going to happen from the sixth to the eleventh of of October. So if you want to come, please let me know. I can help you out with anything. Um unfortunately the the talks are all in Portuguese, so it might
Speaker 1: fine might have some probo but you are welcome. All right thank you.
Speaker 3: All right. Yeah so the Django is a little package I put together. See here. So just a little bit about me first. I'm an extr instructor at a boot camp in Houston called Digital Crafts. I'm also using Django to build a Google Assistant Voice app. So if anyone wants to talk about that uh come see me after the talk if you said those little words probably 80% of you on your phone actually would bring it up and follow me on Twitter I'm the Pizza Panther So what is the Zen of Django? It's just some tools I put together to streamline and get you started with Django a little bit easier. So I have a little bit of flexibility with uh the curriculum I teach. So, you know, I'm a Django guy. I wanted to teach my my boot campers, some Django.
Speaker 3: So I probably, you know, part of it was my fault. I went through it too fast. But you know, I started seeing some of the pain points. of getting newcomers to start Django. Some of the pain points I found, right, you need regex and URLs. That's not necessarily like an easy thing for a newcomer. coming to programming. And some of this stuff too, right, is just with developing Python. It's not necessarily a Django thing. So you gotta worry about package management. You gotta worry about not committing your secret key. Um even I've done this after like ten years of development. Uh thankfully there's that uh guy who like follows all the public projects and makes sure You don't don't commit that secret key. I got that email, so thank you. Whoever that is.
Speaker 3: Um there's no like built-in production server, uh static files, you gotta worry about how you're gonna deploy that. And then switching from your production to your development settings. So I created this little package called the Zen of Django to kind of put this all together, make it easier to start out so that you don't have to necessarily worry about some of these things. So the first thing simplified URLs. So instead of using regex, I stole like the Flash style. And basically you can mix and match between the Zen URL and the Django URL. It's actually just converting it to regex for you. But I think that's a lot easier to understand. I grew up on Pearl and I eat regex for breakfast, but I still know that like
Speaker 3: I don't really want to use regex a lot. So I think this simplifies the URLs a lot Let's see, the next thing, package management. So you get a requirements. txt, automatically generate it with whatever packages are already there. I've also included pip save, so just like with any npm where you can install a package and then it saves it to your package file or requirements. txt so that's built in. Auto generated get ignore. You know, I had people, again, committing their database, their SQLite databases, so just get rid of that problem. Dot env with your secret uh key. Again is initialized for you so you don't have to worry about committing your secrets.
Speaker 3: And deployment. So I think microuski is pretty much the preferred method. So I built that in uh from the general And then the project template is automatically set up to switch between uh your development settings and your production settings. And you can see down here at the bottom, I put in a dev server so you kind of know what you're running. That's just actually an alias to run server. And then when you want to switch to production you just just run the prod server which will run Django uh microwhisky for you. All right, so let's uh see if I can have a demo fail here. So I'm gonna go through it here.
Speaker 3: So we'll do a Python virtual ENV here And do I get time for like network calls here that are slow? Nope. Alright, so I made my virtual environment. Now I'm gonna do pip install djzen. And get that installed. You can see it's installing a bunch of stuff for me. And let's see if I can get to the final thing. So you can just start your project instead of using the Django start project.
Speaker 3: And I kind of issue some recommended settings and I guess I shouldn't use the test. So we'll just use that. And there you go, you got your get ignore, you got your requirements, and then if you can see it here. Ding dong. You got your EMVs and your secret key. Alright.
Speaker 4: My name is Richard Latimer, creator of P Track, along with Sarah Ellis from Indeed. So this is a tracking pixel library. What is a tracking pixel? It's an image tag, typically one by one pixel, transparent, and there's a unique UI. URL that's associated with that. Here, this is kind of the two typical flows. You have this small image that loads on an email or a web page. When it's loaded, when the view loaded User visits or opens the email, you then execute a logging function and you log that this user visited the page. So this is really useful because we like to track email open rates, you can log that data, and then you can can see click-through rates. So then if you have your own tracking pixels, you could do A-B testing. So I could try one subject line versus another subject line, split it among my users, see who's opening my
Speaker 4: more of those emails. With the goals of P-Track, looked at various different ways people are doing tracking pixels and tried to do it the Django way with the best of those ideas. So one, there's no database. Um the data is based uh we put it inside of the URL. You have flexibility with the metrics, so you're not based on a unique ID P track. gives you you get to decide the metrics. It's secure, so these metrics are encoded and then encrypted into a URL, and then it's fast when this decryption and decryption coding phase it happens um in our product production settings within uh 80 milliseconds or lower. So here's what a typical flow would look like for P So you load the PTRAC module, you load the P-Track template tag, you can have arguments. So here we have our test name, email test
Speaker 4: one, and then maybe you want to find some distinct information about users. So you could pass in the user ID, you could do some distinct email open rates, et cetera. Then what links that template to your logging is you instantiate A version of a tracking pixel. There's a callback routine called record. You have access to your request, so you could see through that info what mail clients are accessing you or what users are visiting you. Visiting your web page, you can access your arguments and you can access your key value arguments. And finally, these say here, custom tracking pixel, you can you register it with P-Track, you can actually chain these together. So if you want to split up your code, how you do your tracking pixels, it's up to you. There's no guarantee on the order they execute, but
Speaker 4: you can chain them up. together. For a few extensions, say you want to do internal email tests. So you want to say, you know, people aren't opening my surveys. I want to do some email subject. tests, see what people are doing. You actually can do this. So most mail providers proxy your tracking your images. So you can't actually just host it from your internal network. What you can do here is you can deploy a mirror version of your of of your site, but you know, just a thin client. So it's merely there for tracking pixels. And you have you can define your app URL where the tracking pixel would be loaded, and then you share a secret key for encryption and decryption of the metrics. Um if you don't want to use the encryption scheme that comes with PTRAC, we're using PyNACL, uh you can define your own encode
Speaker 4: And use it there instead. Um and Python 3 supports coming soon. Uh this is the first Django project indeed has open source, so was pushing to get that up before this uh before coming here. So after that we'll work on Python 3 and hoping to contribute more to the community. So here's our uh GitHub. You can actually pip install using Django hyphen P track and want to open a if there's any questions. All right. Thank you.
Speaker 5: Thank you.
Speaker 6: All right. Hi, my name is Johan Heller. I work for rover. com and I'm here to talk about uh non-locking migrations and Django. Um so everybody likes dogs and uh I like Django, so let's mix the two things together. So we got uh dog model and uh just has a name field. Uh we're gonna add a birthday field to that, um, because dogs love receiving birthday cards in the mail. Um It's a well-known fact. Uh and uh it has a database call or database index, so we can make query on it fast. Um making a migration in Django is super easy. Uh you just call make migrations. Um you can pass arguments too if you want more. custom but that works. Uh it will spit out a migration that looks like this. Um actually a really, really handy feature of Django, the migrations uh subject System. It keeps track of dependencies, it has um all the operations it's going to do, it's database independent, so this is uh it can be run across multiple different database backends.
Speaker 6: Um really handy feature. So then you actually want to run your migration on production, so you run migrate. And Django will take that migration file and make this SQL. This is database dependent, so it will change the The SQL slightly. Um, the only difference between Postgres and MySQL here is the quoting, um, but that it's pretty standard SQL, so we're gonna go ahead and run that. Uh is we'll give that to MySQL. Uh that's the database uh system that we use. use uh at rover and uh my SQL does this with that. Um so what happens there is the um the both the alter uh adding the column and adding the index lock the table for rights while it's doing that. And if you have a very large table, the table will remain locked for rights for a long time, which means no users can add dogs during that time,
Speaker 6: which makes for really unhappy users because people love to talk about their dogs. And add them to a website. So what can we do about that? So MySQL 5. 6 added some features for supporting sort of non-locking operations. And how we take advantage of those is we can just alter the SQL that Django generated for us to add a couple um uh more um parameters so that it doesn't lock. Uh just a quick side note here. Um alter table uses commas and create index doesn't. And if you don't get that right, it errors with syntax errors. And I Just it just infuriates me that that's the case. Um so uh going back to the actual full SQL here, the things we added are the algorithm in place, uh which tells uh MySQL that you want to use the in-place sort of upgrade.
Speaker 6: Um Of the table and not a copy operation, which is the sort of other choice. A quick note, it sounds like in place would be faster than copy. It's actually not. It's actually slower and adds more load on your database, but it has the advantage of it doesn't lock things. So you can expect worse performance for the migrations to take longer and they'll be uh doing more work, uh, but they won't lock. Lock none here is sort of just saying the same thing, like please don't take any locks. Um it doesn't actually mean no locks. It just means less locks for less time, uh, because it's MySQL, so it sort of doesn't do what it says. Um and uh Uh a note here is if you run it uh like this and it has to take a lock to do the thing you want it to do, it will just fail. It won't silently downgrade to taking locks, which is actually really handy.
Speaker 6: Alright, so how do we use that with Django? So Django has a run SQL uh migrations uh operation. So we can just specify our own SQL and reverse SQL are our variables that are off the slide. So uh but they just are the same things we saw before in the reverse of that. And you specify the state operations so the migration system knows what's going on. Um and then you're like, oh yeah, awesome. Like This is working really well. And then you realize that this is part of the docs describing all the limitations of the system. So basically every single operation has a different set of uh limits and restrictions on how it works. I can't fit it on a single slide even though I can get really, really tiny. The sort of big ones to point out are it requires an ODB. It requires MySQL 5. 6 or later. It requires that your table have been created in MySQL 5.
Speaker 6: 6 or later, or you have done a copy operation on that table. Um, which you also can't, MySQL won't tell you if it's done that. You just have to know based on dates and things. It's pretty annoying. Um Yeah. Uh this doesn't exist yet. Well it exists, like y you can go there, but there's nothing there. Uh Uh but this is what I'm planning on sprinting on, which is adding uh the migrations uh system to, or adding a database backend that adds these uh parameters for you. At the end, just a shameful hug, uh I uh work for rover. com. And so if you like Python, Django, or uh dogs, come talk to me.
Speaker 7: So hi. Um some of you may be worried about starting your first Django application or writing your first bit of code, I'm here to tell you that I have at least one that I've been maintaining for over 10 years, and I'm still worried, but it gets better and you learn a lot of things. So let me tell you a little story. I want to take you back to a simpler time when the world made sense. It was the year 2007. And Django had been out for about a year and people kept coming up with these So people kept coming up with these cool things that they figured out how to do with Django and they wanted a way to share it, but Python packaging wasn't that great yet. So I built this website called DjangoSnippets. org. Which still exists but is maintained by other people, and was a place that you could share these little bits of code that you'd figured out.
Speaker 7: But I needed a way to let people sign up for it and have an account count there. So I did something silly. I started writing a Django application. This is February of 2007. The initial commit of an application now known as Django registration. This has been around for a while. It was originally Google Code and Subversion, then it was Mercurial on Bitbucket, now it's Git on GitHub. Django registration was built on a thing that I was really pushing hard at the time, which is the idea that a Django application should do one thing and do it really well. So in this case, it was just about signing up user accounts. Nothing else. Not filling in a profile, not you know letting them connect other things, just sign up a user account.
Speaker 7: Unfortunately, there are some things that are hard. So back then Django did not have class-based views. If you wanted flexible, extensible apps that people could add on functionality to, you had to add a bunch of arguments onto your function-based views. I tried to do default templates, eventually I tried to do custom user models, and also I had a dose of real life in the middle of it. So this is the sort of thing you used to have to do with a function-based Django view. You just kept piling in more and more and more keyword arguments there. Some of the worst that I've seen is if you go back and look in the Django repository just before we switched over to class-based generic views, some of them have definitions that look like this. Because if how many different keyword arguments they had to take for all the functionality that they were supposed to handle.
Speaker 7: Fortunately now we have class-based views. Django registration now uses class-based views. This is lesson number one. If something is painful, look at what Django is doing now and maybe see if you can steer it in a direction that it will get better. In this case, class-based views solved a whole lot of problems. This one I was never able to solve. People really, really like having default templates in an application that they can just plug in and it works. Unfortunately, it's really, really difficult, especially if it's something like say user registration where you don't know in advance even what kind of form they're going to use, what kind of fields it will collect, what kind of workflow it will have. Shipping a single set of templates that work for all of that is just impossible. Eventually I gave up. Every once in a while, about twice a year, someone still files an issue at GitHub.
Speaker 7: saying could you please provide default templates and I say I would really like to but unfortunately I can't. Then Django went and came up with this custom user model. thing. Before this, Django registration only had to deal with one user model. And you knew what it looked like. It was Django. contrib. auth. models. user Now suddenly anybody can have pretty much any user they want. At first Django registration just kind of we're not gonna do that Now actually it does support custom user models. That was a bit of work. If you want to go look in the code, you can find lots of places where it does get user model or for keys to settings. auth user model. Support got there eventually, although it is still probably kind of buggy.
Speaker 7: The last two bug fix releases I've had to do involved custom users. Here's the real killer. This is two views of my GitHub contribution graph. One of them is what you see if you're logged in as me and can see all the private repositories that I do my daily work in. The other is what you see if you're a random person who's not me looking at my GitHub profile. As you can tell from this, about two-thirds of all the coding I do happens in private repositories. This means I have very little time. So for a couple of years I kind of dropped the ball on Django registration. Some people forked it, tried to keep it alive. Thankfully now I'm back with some time. I am unable to do this. But it's a thing that happens. Don't be ashamed of it. It will happen to you.
Speaker 7: Django Registration has grown some new things, which you can read about in the release notes activation with HMAC, reserve name validator, disallowing sketchy Unicodes. If you want to hear about sketchy Unicode, come talk to me or Katie McLaughlin. And there will be a future.
Speaker 8: Alrighty, so I'm here to talk about how flexibility saves you money and it it uh gets you diversity for less than free. Alrighty, so the um the old way that things work, um the old HR model, if if you're thinking about a big company is that someone's born , then they get educated, then they go and work for 40 years, and then they retire, and then finally they don't live anymore. The thing is that that doesn't really work in the modern era because there's things that happen. Um people are um people have kids, um families have needs, say you might have a a uh
Speaker 8: parent who needs help and you're uh a a caregiver. So the old uh model of uh of just of being born, educating, work and retiring. It just doesn't really sort of fit the mould. So only a minority of people really can do that. Now the reason this has diversity implications is this This impacts women more than men, but it's impacting men more than it used to. So this affects all of us. And the answer is we need flexible workplaces And I want to think about I want to just quickly go through two examples. One is a large Australian bank, where the CEO a few years ago said that they were going to have flexibility in every position.
Speaker 8: And they were going to find flexibility when people thought there was no flexibility. So like some jobs they could work from home, but if you're a bank teller, you can't really work from home. You need to be your customer-facing. Uh but they they went through and say, well how do w if someone's doing that work, how much they actually customer phase how much like if you've got 10 people that are in the branch maybe only two or three are actually customer facing at one point in time so there is still uh opportunity for flexibility. And so when they went about doing this and they rolled this throughout the whole organization over several years, they found that they had metrics on attracting and retaining women. uh significantly increased. Uh many of their uh
Speaker 8: of their staff that would go off on family leave would uh find that the progression back to work was far more um um smooth and also worked much better when they're having young children and uh and th little simple things like being able to do move in a diff different office so they could pick up their kids from um from from sport. uh started to really come in into play. The bank sees it as a key part of their competitive advantage because other employers as uh just demanding that you work nine to five or eight to whatever and or if you're IT then seven to ten pm and uh Which unfortunately that's really a it's a it's a myth for sustainable productivity.
Speaker 8: So that's a big example. I'll give a few personal examples from the the organization that I'm involved in One is we've got the we've got uh one of our one of our people involved is is someone who's very skilled. Uh she's got a few kids, she can't work five days a week, she doesn't want to work five days a week, she certainly doesn't want to work nine to five. She's got to pick up the kids from school. Her husband is a teacher and he can't pick up at a different school and he can't pick up the kids. And she doesn't want to use after-school child care. care. And so, and I'm like, well that's all fine. We're working collaboratively on our project and I don't need you to be present at particular times. And she's like, well that's fantastic.
Speaker 8: That just fits my needs exactly what I want. The second example is someone who's also very skilled and got a few university degrees, but she's developed a condition where she can only really work about eight hours a day. a week and um but there's a really productive eight hours um she cannot she's on the disability support pension she can't get traditional work hours But she's a very valuable member of our team. So the the core message in all of this, if you're involved in a startup or or or you're in some position where you need to make these these kind of hiring decisions then what are you going to miss out on if you're not flexible in the way that you go about about employing people? Thank you.
Speaker 1: Alrighty, it would have really sucked if I couldn't gotten the A V to work after the run. But I'm going to talk to you about introspective RESTful APIs with Postgres in Django and how it will make your entire life better, but not really. So Words is where I work, that's short for Warden Research Data Services. It's a single source for leading global research databases. So we have a lot of data. We have over 450 institutions worldwide who subscribe to our product. And uh 50% of that growth has been international over the past. past five years. So the upshot of this is we have 50,000 active users who access this these data by web, SSH, remote connects, and uh we support SSH via the cloud, SaaS R, Python, the web, and more. We have 358, 350 raw terabytes of data and two petabytes of total storage that uh we've gathered since 1990.
Speaker 1: And we're continuing expansion beyond financial data. When I started, everything ran on a single Sun E2000 before we maxed out the RAM CPU and pegged the CPU at 100% capacity. In 2009, we switched over to a Sea of White Linux boxes backed by NetApp. We've used Sun Grid Engine, Oracle Grid Engine, Univa grid engine, and LDAP to support that. horizontal scalability. Permissions and ACLs are always a big concern for us because our 450 customers each have access to different financial data sets from different vendors. So you can do the math yourself on how many different permutations that is. Uh we also made some very dubious database decisions. Um spoiler alert, Postgres has made everything better. Uh
Speaker 4: all data was stored in SAS data format in a cryptic format called SAS 7B DET. We had MySQL for website data. We then switched to SQL Server for website data. We then had research data except for the New York Stock Exchange Traders and Quotes database in Oracle. And uh we still had this problem with permissions. So uh
Speaker 1: so Postgres to the rescue. There was apprehension by the heads of our division that we were throwing yet another database into the mix while promising once again that this would be the one all be all solution and they were concerned that yes we were going to now have post-greson edition. of MySQL SQL Server SaaS. If you include LDAP, BDB. And you know, rightly so, but all research data was successfully loaded into Postgres. First time we did a never been able to do that. SQL Server failed miserably, Oracle failed miserably, MySQL we didn't even try. Postgres was uh was backing J Postgres is now backing Django for the website as well. Uh Django and Wagtail are now in our mix instead of uh ColdFusion, PHP, and WordPress.
Speaker 1: Uh we have integration with LDAP and permission. ACLs. And uh uh a goal we're still working on is making Postgres the canonical source for all of these ACLs we need to apply to all of our data. Uh Um we'd promised we'd eliminate at least one of these databases within six months, and we've actually done two. Goodbye Oracle, goodbye MySQL. And uh we've actually got in the entire New York Stock Exchange trades and quotes databases that's growing by one point five terabytes a month into Postgres. It's a very narrow database, but a very tall database.
Speaker 4: You've got to imagine every bid trade and quote going across the NYSE. It's a hell of a lot of data. We have uh shuttered and closed our WordPress satellite site. in favor of Wagtail, which if you haven't used it, it's the only CMS I've used in my life that I haven't absolutely hated after a year and actually still love. So give it a I I've got to give a shout out to Torchbox because it's absolutely Absolutely lovely. So we still have some SQL Server around, but that's going to be the next way the next one mostly on the way out, but some of our data vendors have it as a dependency, so it may never So foundation complete. Now we wanted to build a RESTful API because we can let people access directly through R, SAS , various other ways. Um but we never had a way that we could easily build a RESTful API. And we have over twenty thousand basic data sets and tables available
Speaker 4: uh in Postgres now. So when nine when Words was started in nineteen ninety two it was made to dump data to Lotus 123. So brilliant financial faculty around the world could use a tool they knew how to use, Lotus 123 at the time. And uh in 2017 we created a RESTful API to anywhere because a Fortune 50 client of ours Most of our clients are business schools, but we've got some corporate clients uh really wanted to be able to uh hit a restful endpoint. So we cre used Django Rest framework. We automatically introspected Postgres to create serializers, filters, models.
Speaker 1: and permissions, code generated by introspecting Postgres SQL, and we have web browsable endpoints for the user. Filters were created for any columns that were indexed in Postgres SQL. Grazie QL automatically. So let's do a quick, quick, quick, quick demo. Okay, we're going through the code there. We've gone through the code. And right here, here 's the code to call the actual endpoint using IBM's QSIP. And right here we're running against the actual endpoint, and we're gonna get every end-of-month data price for IBM since 1925 with the volume and the price.
Speaker 1: And this is what twenty thousand endpoints looks like. Thank you.
Speaker 5: Thank you, Tim.
Speaker 3: Uh okay, hi everyone.
Speaker 8: I'm Vic. Uh I'm Vic Jan and I'm from UC Irvine. It's a very short lightning talk for me. It's my first time, for I'm first attendee here. Well I'm here because I want to find a job so I I will graduate this month and they say uh yesterday uh I had a picnic with the uh i in place and thank thanks for Steve Chase Peter and Tristan yeah like encourage me to stand here so I'm looking for a job here. So so why should so why you should hire me because I'm self-motivated, I'm willing to learn, and good.
Speaker 8: habits of writing code. Most important I'm used Django. Yeah, and hire me please.
Speaker 3: And and lastly, thank you.
Speaker 8: Okay, so uh I wanted to just give a quick talk about keeping bees because uh it came up at breakfast this morning. Uh I am actually not a beekeeper. My wife is the beekeeper. She's awesome at running uh an apiary that we have at our house. Uh but because uh of all of the things I've learned from her, I thought it would be cool to share some of them with with you. So this first picture I've got, all of the photos are from the bees that she keeps. You'll see the kind of classic comb shape. It's not all honeycomb, some of it is brewed comb. And it's my understanding is it's shaped. Um they extrude uh the wax um and they stamp it out, and so the shape of that classic uh hexagon shape is from the shape of their head as they press the wax.
Speaker 8: If you want to keep bees you'll need some boxes. So uh there are brood boxes. And uh the typical way of keeping bees is that uh those boxes are filled with frames. So there's usually ten frames in a box, uh, and the bees will uh kind of start building out their uh their comb, whether that's brood uh comb or honeycomb, in those frames. Um and so that's a photo of some of the the boxes and frames that we we have. If uh you want to get those boxes filled with bees, you can actually buy packaged bees. They uh come in these little boxes you see in the front of the um the hives there, uh and there's I think there's about ten thousand in there and there's a metal can that has sugar syrup so that they have something to eat in transit. Uh and you just pop the lid off and then you take the can out and then you pour the bees into the box.
Speaker 8: It's the craziest thing. like quartering bees. I've never seen that before. But uh you just dump the 10,000 bees in there. Um if you don't have packaged bees you can collect a swarm. Uh when you see like a bunch of bees out, they're actually really docile at that point and they all come together and you can just usually just cut the branch off that they're uh they're hanging on and then you set them on top of an empty box and they just kind of melt down into the box and they're like ah I'm at home. So it's really fun to watch them do that. This is a photo of some bees that are on the front of the box. That's called the landing board because they fly in and they land right there. Uh and if you look really closely, you can see the pollen baskets that they have like on those back legs. They stuff them Full of pollen and they bring it back. The pollen is actually protein, so they eat uh pollen besides uh nectar uh that they'll gather.
Speaker 8: Um and so you'll also notice there's that board that there's that kind of like white strip there. Um there's an entrance reducer that you can put on the hive once you first load them in there. This helps them defend their hive. So normally they have a nice big place on that uh landing board they can come and go. Um but at certain times of year you put that entrance reducer And it helps them manage their hive so they keep pests out and stuff like that. This is what a brood frame looks like. So uh they the queen lays eggs. uh into the comb and then they cap it and then you have bees that maintain it and you can actually just lift these frames right out. It's super cool. If you ever have an opportunity to go to an APA or somebody that that keeps bees bees. Ask them to crack the box open and pull a frame out and check it out. It's really neat.
Speaker 8: A lot of times my my wife will use um she has like a beekeeping suit and all that stuff, but sometimes I'll just go out Out there with her and you know, just you just go use your bare hands. It's usually pretty cool. Um and one of the interesting things is the bees actually glue these frames in. They have something called propolis. Uh that's like um super glue. It's ridiculously strong and hard and they will glue things together. Like they glue the boxes together, they glue the frames down. Um and so you'll have like a beekeeping tool. I didn't have a photo of one, but it's this metal kind of like knife looking thing that beekeepers will use to crack the boxes open and break that propolis. But you can actually scrape the propolis out and then melt it down and then use it to to all kinds of different things so for instance like if you had like a bad cut on your finger or something you can use it just like you would super glue
Speaker 8: instead of getting stitches you can just glue it shut with propolis it's crazy it's ridiculously hard strong stuff um Bees also do something that's interesting called bearding. Uh when it gets hot, they actually gather on the outside of the box and so they will cover the outside of uh the hives and they actually look like they're dripping down like a b big beard. Um this photo kind of shows a bunch on the outside. They're not like dripping. Um but they another interesting fact is they don't fly at night. Um so in the evening they all kind of just walk around um and they don't do any flying. Uh and so that's just something I thought was interesting. And the waggle dance, this is also something interesting that bees do. They actually do this, they spin and vibrate, and that kind of tells other bees where uh flowers and sources
Speaker 8: of nectar are located and it's so well known that you can actually put a set up a camera, watch the bees, and then calculate where those sources of uh flowers and stuff are at, uh, and you could like fly a drone out there. and go look at where the bees are headed. And when they come back from getting the nectar, they produce honey and then you can extract it out of the frames. And this is what it looks like when you're extracting. And we're
Speaker 5: two
Fix My Django adds a link to Django’s development error page that opens a sanitized, filtered exception page with traceback details, reproduction guidance, and possible fixes. It can also show when an exception has no existing solution so contributors can add one.
Discussed at 0:58Install it with `pip install fixmydjango`, then add it to `INSTALLED_APPS`; this overrides the development server’s full error page to include the Fix My Django link.
Discussed at 1:46It packages common setup conveniences for beginners, including simpler non-regex URL syntax, requirements management, an automatic `.gitignore`, `.env`-based secrets, and development/production server commands.
Discussed at 7:14Its project template separates development and production settings and provides commands for each; the production command runs Django through a production WSGI server such as Meinheld.
Discussed at 8:51A tracking pixel is usually a transparent one-by-one image whose request records that a page was visited or an email opened. P-Track lets Django applications record metrics such as email opens, click-through behavior, and A/B test results.
Discussed at 10:53P-Track puts the tracking metrics into an encoded and encrypted URL, so it does not need a database or a fixed unique ID scheme. Its callback can inspect the request and custom arguments, and multiple tracking pixels can be chained together.
Discussed at 11:42Replace Django’s generated SQL with a `RunSQL` migration that adds MySQL’s `ALGORITHM=INPLACE` and `LOCK=NONE` options, while declaring the corresponding state operations so Django’s migration state stays correct. This avoids long write locks where supported, but can take longer and may fail if the operation cannot be performed without a lock.
Discussed at 16:09The approach requires an appropriate MySQL/InnoDB setup and MySQL 5.6 or later, and the table must have been created or rebuilt under compatible conditions. Each MySQL operation has its own limitations, so the migration must be checked against the database documentation.
Discussed at 17:44Django Registration is a focused Django application for signing up user accounts; it intentionally does not try to handle profiles or unrelated account features. It began as a reusable way to add registration to Django Snippets.
Discussed at 20:02It moved from function-based views to class-based views and eventually added support for custom user models. The speaker’s broader lesson is to follow improvements in Django when an older implementation becomes painful, although custom-user support still required ongoing bug fixes.
Discussed at 21:27Flexibility accommodates caregiving, disability, school pickup, and other needs that make a rigid full-time schedule impossible. The speaker cites a large bank where organization-wide flexibility improved attraction, retention, and employees’ return from family leave.
Discussed at 25:01The Words team used Django REST Framework to introspect Postgres and automatically generate serializers, filters, models, and permissions. Indexed Postgres columns became filters, and the system exposed browsable endpoints across more than 20,000 datasets and tables.
Discussed at 33:00A beekeeper needs hive boxes and frames, then can obtain bees either by buying a package of roughly 10,000 bees or by collecting a swarm and placing it over an empty hive box. An entrance reducer helps a newly established colony defend the hive.
Discussed at 36:37In hot weather, bees practice “bearding,” clustering over the outside of the hive in a shape that resembles a beard. The talk also notes that bees generally do not fly at night and instead walk around the hive.
Discussed at 39:27The waggle dance is a spinning and vibrating behavior that communicates the location of flowers and nectar sources to other bees. The speaker says observers can even use cameras to estimate where the bees are heading.
Discussed at 39:40Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published November 3, 2017
Published August 12, 2016
Published November 8, 2018
Published September 8, 2017
Published November 3, 2017
Published November 26, 2025
Published July 19, 2024
Published November 22, 2023
Published October 25, 2019
Published September 8, 2017
Published September 7, 2017
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 14, 2026