Talk Python To Me cover image

#277: 10 tips every Django developer should know

Talk Python To Me

00:00

Django Templates - Ten Ways to Write Templates That Work

Django has a construct that if there are no objects, then it goes into the empty block. So instead of like doing if books, look over the books and else there are no books, you can actually do four empty. It's just shorter, right? Oh my God. Is this a proper use for like an else block on a four, four in loop? Something like that. Yeah. Ten. Build and template tags and filters. And yeah, there's a bunch of stuff there. I think it's just good to assure writing a lot of templates where you're going to reference the objects that you pass in from the views.It's kind of handy to know how

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app