So, you’re a mid-level Python developer and want to learn Django? This article is for you. Finding beginner Django tutorials is easy. But if you’re a little more seasoned Pythonista looking to build a quality application, some of these learning materials might just be too slow or filled with basics you don’t really need.
Just starting your adventure with Python? Be sure to read this: 12 best Python tutorials for beginners
Fortunately, you can still find some insightful Django tutorials that address the knowledge needs of more advanced developers. The Django community actively participates in the creation of these materials, so you can find many amazing tutorials free of charge.
Here are 6 useful books and tutorials for mid-level Pythonistas + some extra resources to help you jump-start your Django project.
To be fair, the official Django tutorial assumes that its readers have zero knowledge of Python. Still, the official Django documentation created by the amazing Django community covers everything developers need to know about the framework. I think it can serve as a valuable point of reference regardless of your current level.
The tutorial walks beginners through the process of coding a basic poll application which consists of 1) a public site that allows people see polls and vote in them, and 2) an admin site where users can add, change, or delete polls. For more advanced Django developers, the best way to explore this tutorial is by accessing its table of contents on the right-hand site.
There you’ll see all the chapters covering the tutorial, but as you scroll down, you’ll get an advanced tutorial to writing a reusable Django app , as well as detailed information about Django models and databases (including search, aggregation, making queries, tablespaces, database transactions, database access optimization, database instrumentation, multiple databases, and examples of model relationship API usage).
Further on, you’ll find more info on working with forms, handling HTTP requests, Django templates, class-based views, managing files, migrations, testing in Django, user authentication, Django cache framework, conditional view processing, logging, pagination, security in Django, as well as a wealth of Django how-to guides that take you step by step from writing your app to testing and deploy.
The book introduces readers to different tricks, patterns, code snippets, and techniques the authors have picked up over the years of developing Django projects. One of the best tutorials out there, it’s an excellent resource for people who are no longer beginners but still need some help in figuring out Django best practices for building their web app. It answers some of the most pressing questions intermediate Django developers might have and help to quickly learn Django best practices.
The key strength of this book is that every chapter can be read as a standalone part. It works like a Django-focused set of Stack Overflow questions followed by quality answers. The book comes in handy when you’re building a Django app and need to solve a problem quickly.
You can find the official repo here.
This classic among Django tutorials guides readers through all the steps of developing professional web applications with Django. It’s basically a detailed walkthrough of four Django projects that allows readers to learn more about solving common Django problems and implementing best practices.
It starts with building a blog application and then moves on to developing a social image bookmarking website, an online store and, finally, an e-learning platform. The developer who reads this book gets to learn how to build a search engine, a content management system, a recommendation engine, and an e-commerce coupon system. Moreover, the book shows how to set up a production environment for Django projects, boost apps with AJAX, and create RESTful APIs.
All in all, the book leaves you with a good understanding Django and shows how to integrate it with other technologies to launch your Django project and build advanced web applications. You can find all the book’s code repository here.
Ok, it’s one of the introductory tutorials that help beginners to learn Django. But I believe that offers a really insightful take on the basics of Django – and it’s always a good idea to refresh our knowledge of these basics once in a while. The tutorial does an amazing job of explaining why you should use the example code. Also, its organization is really great and helps to find answers to your questions easily. Yet another example of the Django community doing a great job!
This set of RealPython tutorials is a real treat for any advanced Pythonista looking to gain new Django skills and build the best web app they can. I think the platform offers the best Django learning materials today.
This section of RealPython includes intermediate to advanced articles that cover key aspects of Django development like testing, REST API, caching, and deployment. It also includes modules that help developers to learn critical Django best practices, recommended workflows, and project structures. The resources also show how to avoid common pitfalls when building Django projects.
Just have a look at the page and scroll down to see a great selection of individual modules that deal with one topic or help to solve a particular problem in a Django project.
6. The Ultimate Tutorial for Django REST Framework
Joining a project that uses the Django REST Framework (DRF) can be a little complicated because of issues like spaghetti code or antipatterns. I’ve seen these problems so many times already that it got me thinking about where it actually comes from. The DRF documentation is comprehensive and generally well-organized. So why isn’t it helpful in addressing this issue?
Once you finish reading the Django REST Framework tutorial and learn the basics, it seems that you’re now ready to implement its contents into a real application. But that doesn’t seem to be happening.
Here’s what I noticed:
The original DRF tutorial looks as if someone wrote it from the end. It delves into the details instead of showing its greatest asset, ViewSets.
That’s why I decided to write a series of articles where I show the Django REST Framework from a general to detailed overview. In my guide, I adopted the approach typical of Django – first the basics, then the details.
Follow this series to get a clear and highly manageable code:
- Django REST Framework Tutorial – CRUD
- Django REST Framework Tutorial – Login and Authentiction
- Django REST Framework Tutorial – Custom Fields
- Django REST Framework Tutorial – Pagination
- Django REST Framework Tutorial – Filters and Filtering
- Django REST Framework Tutorial – Functional Endpoints and API Nesting
- Django REST Framework Tutorial – Selective Fields and Related Objects
Some extra resources
This is a helpful resource that uses a real-life example (building an HN/Reddit clone) to introduce topics like class-based views the help to understand Django. Mid-level developers can find many useful code snippets to copy and use in their projects. The video tutorial covers the development of a site that takes advantage of as many built-in features as possible and using external apps only when there’s no other choice. The completed project supports user signups, link submissions, voting, adding comments, as well as a great ranking algorithm.
Similar to above, this resource offers a use case which is pretty common and offers developers a collection of code snippets that can be reused in Django projects.
So many ways for expanding knowledge
When it comes to building web apps in Python, Django is one of the most likely technology picks for your project’s stack. I hope this list of the best Django tutorials helps you fine-tune your Django skills.
You may also be interested in: 5 fantastic books on creativity and innovation for 2018
Are you looking for a workplace that supports the community as a whole and individual developers in expanding their skill sets? Join our team, we’re always looking for talents!
We offer our engineers a growth budget and access to exciting open-source projects.
Check out all open positions here.