Django for Beginners /

Foreword

Course Contents

Django bills itself as "the web framework for perfectionists with deadlines," an ode to its origins as a newspaper content management system (CMS) and its overriding approach of balancing features with practicality. From the beginning, Django was created for real-world developers who wanted a fast, elegant, and powerful way to build websites. It is hard to appreciate, almost twenty years after its first release, just how different the World Wide Web landscape is from back then.

I first encountered Django in the early 2000s, shifting from a planned academic career to a self-taught web developer. Back then, Django wasn't the Django we know today, with a vibrant community, regular community-run conferences, fantastic documentation, thousands of third-party packages, and all the rest. Instead, it was a plucky upstart released by early twenty-something kids from a Kansas newspaper. But it was immediately apparent that this was what I was looking for! For one thing, Django was written in Python rather than the PHP most web developers (myself included) used at the time. Python is a wonderfully readable, rich, and powerful programming language that has now won over much of the programming world, but at the time, it, too, was something of an upstart. Django also emphasized a "batteries-included" approach similar to Python, providing built-in solutions for most tasks while still allowing customization. 

As my work with Django deepened, I became a co-maintainer of Django REST Framework and several other packages in the ecosystem. In 2018, I eventually became a Django Fellow. The Fellowship program is a paid position sponsored by the Django Software Foundation, the non-profit that maintains Django. A Fellow works on Django, managing releases, reviewing pull requests, and doing all the unglamorous but necessary things for an open-source project to succeed. 

It was at a DjangoCon US event in 2018 that I first met the author of this book, Will Vincent. He gave a talk on Django API Authentication, and we started talking. We both agreed that a Django-focused podcast was needed and launched the first episode of Django Chat in early 2019; today, five years and 160+ episodes later, it is still going strong. During that time, Will was elected to the Board of the Django Software Foundation in 2020 and served as Treasurer for three years (2020-2023). Looking back now, we’re old hands, we’re veterans.

The first edition of this book came out in 2018 and immediately filled a void. As a Django Fellow, I was routinely asked for recommendations on how to learn Django, and Django for Beginners has long been my answer. It adopts Will's typically patient approach in explaining how things work while including practical examples of how to quickly build Django websites. Although you start building a "Hello, World" app, by the end of the book, you've written multiple real-world Django projects from scratch, layering on new concepts and techniques each time. And don't be fooled by the "Beginners" in the title; this book covers the fundamentals and essential areas such as testing, deployment, environment variables, security, and more. It is full of best-practice wisdom that jump-starts anyone wanting to learn more about Django, whatever their background.

I am thrilled for you to embark on your journey with Django. As your guide, this book will open your eyes to the myriad ways Django can revolutionize your web development experience. I hope your journey is as rewarding for you as it has been for countless others. Django for Beginners is the perfect gateway to the framework, the ecosystem around it, and our wonderful community. Have fun, and welcome aboard!

Dr. Carlton Gibson

Django Fellow (2018-2023) and core contributor / Co-maintainer Django REST Framework

noumenal.es