With the release of Django 2, a lot has changed in the Django world.
Not just because we have finally got rid of the complications with having to deal with both Python 2 and 3, but also because of the numerous new features, tweaks, updates and optimizations that ensures that Django just keeps getting better and better.
What many of you may not know, is that the current book is an update of the original book written by two of the creators of Django – Adrian Holovaty and Jacob Kaplan-Moss. Given that the book has been around since Django 1.1, it has got pretty dated. There are also a lot of similarities to the Django docs in several chapters.
(FUNNY ASIDE: I have actually had a couple of people email me and take me to task for copying the docs. Lol! Given that the guys who wrote the original book also wrote the original docs, that’s going to happen folks!)
I have decided to start with a clean sheet of paper for Mastering Django 2 – which means you don’t just get an update, you get a completely new book, written from scratch to meet the needs of today’s programmers.
First and foremost, the book remains the definitive reference to the most commonly used core functionalities of Django – so the plain English, easy to follow deep-dive into all of Django’s functions doesn’t change in this book.
Second, the book compliments the existing docs, it doesn’t just reproduce them in a different format. I have removed all of the original material from Jacob and Adrian’s book and all of the material that can be found in the Django documentation. There are lots of topics that are not covered adequately in the docs, which provides ample opportunity for me to create resources that will make you a better Django programmer. I have done my best to include them in this book.
Third, the book takes a more practical approach, with less emphasis on theory and more exploration of working code. It’s impossible to put all of Django’s functions into a single book, but I have done my best to include all of the functions, classes and tools you will use regularly. With each major function or class, I expand them into functioning code examples. Source code is also available for Mastering Django 2.
And finally, while I will not be releasing the book as open source, a large part of the book will remain free to access and read on djangobook.com. As with the previous book, you can buy PDF, eBook and paperback versions, with all income from sales supporting the project, allowing me to keep the core content ad free and accessible to all.
Exciting times ahead! 🙂
All the best with your programming journey!
This book is a programmer’s manual targeted at intermediate to advanced programmers wishing to gain an in-depth understanding of Django.
In saying that, it doesn’t mean beginners can’t get value out of the book. Since the publication of the first edition of the book, roughly half of the readers I have spoken to identified as being a beginner when they started out with the book.
The way I write – building on simple concepts and explaining every step – is highly accessible to beginners, so if you are a beginner, you will still learn a great deal about Django from the book.
Where the book can be challenging for beginning programmers is all the peripheral stuff – HTML, CSS, Python and web development in general – that I don’t explain in any detail. The book is big enough as it is, without me trying to teach you all the stuff that you need to know that isn’t Django-related!
I do, however, give you lots of references so you can easily get more information if you need it.
The book is broken up into three parts:
As you work your way through the book, you will be putting your new Django skills to use building a practical project – a website for a social club, which includes multiple pages, forms and an event calendar. The complete website can be used in your own career – maybe as a site for your local sporting club or even setting up social events at work.
The book assumes you have had no experience with Django.
You are expected to have a basic understanding of web technologies like HTML and CSS, as well as a basic understanding of how to structure code. You should also be familiar with your OS’s terminal or shell program. Absolute beginners shouldn’t be too concerned, as it’s easy to learn the basics and that’s all you need to get value out of the book.
As Django is written in Python, a basic understanding of Python is also assumed. Although, since Python is so easy to learn and there are such great resources available online for Python, I haven’t heard from a learner yet who saw not knowing Python as much of a barrier. You are going to learn a lot about Python just by learning Django, and all the extras you need to know are easy to find online.
As the book only covers core Django, you don’t require any special functions or libraries, so the latest versions of Python 3 and Django 2 are OK. At the time of writing this is Python 3.7.3 and Django 2.2.1.
Installation instructions are provided for Windows and Mac users. Linux users can refer to the 90 million or so linux installation tutorials online. OK, so that’s maybe an exaggeration, but there are lots.
All the code in this book will run on Windows, macOS or Linux. While the code and screenshots are all from a Windows machine, the fundamentals remain the same – all three have some form of terminal or command window and management commands like
runserver work the same on all three platforms.
Coding style is also identical across platforms with one exception – Windows style backslashes are used in file paths. This is to assist Windows users differentiate between Windows’ native use of backslashes and Django’s implementation of forward slashes in path names. Linux and macOS users, simply need to substitute forward slashes in these cases.
You can contact me via the help page on the Djangobook website.