Django 4 By Example

Fourth Edition

Build powerful and reliable Python web applications from scratch

Antonio Melé

To my sister Paloma.

Foreword

Django: The web framework for perfectionists with deadlines.

I like this tagline because it can be easy for developers to fall prey to perfectionism when having to deliver workable code on time.

There are many great web frameworks out there, but sometimes they assume too much of the developer, for example, how to properly structure a project, find the right plugins and elegantly use existing abstractions.

Django takes most of that decision fatigue away and provides you with so much more. But it's also a big framework, so learning it from scratch can be overwhelming.

I learned Django in 2017, head-on, out of necessity, when we decided it would be our core technology for our Python coding platform (CodeChalleng.es). I forced myself to learn the ins and outs by building a major real-world solution that has served thousands of aspiring and experienced Python developers since its inception.

Somewhere in this journey, I picked up an early edition of this book. It turned out to be a treasure trove. Very close to our hearts at Pybites, it teaches you Django by building interesting, real-world applications. Not only that, Antonio brings a lot of real-world experience and knowledge to the table, which shows in how he implements those projects.

And Antonio never misses an opportunity to introduce lesser-known features, for example, optimizing database queries with Postgres, useful packages like django-taggit, social auth using various platforms, (model) managers, inclusion template tags, and much more.

In this new edition, he even added additional schemas, images, and notes in several chapters and moved from jQuery to vanilla JavaScript (nice!)

This book not only covers Django thoroughly, using clean code examples that are well explained, it also explains related technologies which are a must for any Django developer: Django REST Framework, django-debug-toolbar, frontend / JS, and, last but not least, Docker.

More importantly, you'll find many nuances that you'll encounter and best practices you'll need to be an effective Django developer in a professional setting.

Finding a multifaceted resource like this is hard, and I want to thank Antonio for all the hard work he consistently puts into keeping it up to date.

As a Python developer that uses Django a lot, Django by Example has become my GO TO guide, an unmissable resource I want to have close by my desk. Every time I come back to this book, I learn new things, even after having read it multiple times and having used Django for a solid five years now.

If you embark on this journey, be prepared to get your hands dirty. It's a practical guide, so brew yourself a good coffee and expect to sink your teeth into a lot of Django code! But that's how we best learn, right? :)

- Bob Belderbos

Co-Founder of Pybites

Contributors

About the author

Antonio Melé is the co-founder and chief technology officer of Nucoro, the fintech platform that allows financial institutions to build, automate, and scale digital wealth management products. Antonio is also CTO of Exo Investing, an AI-driven digital investment platform for the UK market.

Antonio has been developing Django projects since 2006 for clients across several industries. In 2009 Antonio founded Zenx IT, a development company specialized in building digital products. He has been working as a CTO and technology consultant for multiple technology-based startups and he has managed development teams building projects for large digital businesses. Antonio holds an MSc. in Computer Science from ICAI - Universidad Pontificia Comillas, where he mentors early-stage startups. His father inspired his passion for computers and programming.

About the reviewer

Asif Saif Uddin is a software craftsman from Bangladesh. He has a decade-long professional experience working with Python and Django. Besides working for different start-ups and clients, Asif also contributes to some frequently used Python and Django packages. For his open-source contributions, he is now a core maintainer of Celery, oAuthLib, PyJWT, and auditwheel. He is also co-maintainer of several Django and Django REST framework extension packages. He is a voting member of the Django Software Foundation (DSF) and a contributing/managing member of the Python Software Foundation (PSF). He has been mentoring many young people to learn Python and Django, both professionally and personally.

A special thanks to Karen Stingel and Ismir Kullolli for reading and providing feedback on the book to enhance the content further. Your help is much appreciated!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset