- Extending class-based views
- Building a REST API
- Working with GraphQL
- Building a basic schema
- Optimizing your environment
- Working with Pipenv
- How Django handles testing
- Securing the Django admin
Skill Level Advanced
(typing) - [Jeremy Spencer] Hello and welcome to Mastering Django Web Development by Packt Publishing. My name is Jeremy Spencer. I've been working with Django for about 10 years now and I have several years experience teaching Django to other people. I was a speaker at DjangoCon in 2017 as well as my current position being the Lead Developer and Senior Web Architect at Frostburg State University. If at any point in this course you have any questions or concerns about any of the code provided or any questions about how something works, please feel free to contact me @jeremytiki on Twitter.
I'll try to help as many people as I can get through the course as possible. This course will be divided into six sections. In the first section, we're going to talk about the advanced uses of class based views. We'll go over how class based views work, what the dispatch method is, how to work with class based views, and how to use class based views more effectively in your code. In the second section, we'll be building a rest API with Django rest framework, we'll go through all the steps required to build a simple rest API from the ground up.
In Section 3, we'll be looking at GraphQL as an alternative API. GraphQL is a rather new API that's exploded onto the scene and garnered a lot of support from many people. GraphQL has multiple advantages and disadvantages over the generic rest API that most people are used to. In Section 3, we'll explore exactly what the pros and cons are, how you can use GraphQL, and how you can build out a GraphQL API with Python. In Section 4, we'll talk about managing multiple developers and environments. Once you start coding for any amount of time, we'll eventually need to start working with other developers and other environments.
Whether it's a Mac to Windows environment through different developers, or a Mac to Linux environment through a developers station and a production hosting environment. Environments change and so do developers. So in this section, we'll take a look at strategies you can use to minimize the amount of change between environments and how to more quickly and easily onboard people onto your project. As an added bonus, this section will also look at the new pipenv tool that's been released and is set to replace pip as the Python packaging tool of choice for most users.
This is a fairly new tool for Python. So if you haven't heard of it yet, don't worry, we'll go into detail about how to use this tool in Section 4. In section 5, we'll be talking all about tests. We'll learn about how tests work and where they're found, as well as how Django manages test discovery. We'll learn how to write good and effective tests that actually provide coverage for your code, and we'll introduce a few extra tools that help with testing to make it quicker and easier. Finally, in Section 6, we'll talk about security in Django. Django is a wonderful project that comes with a ton of built in security, but you still need to understand how that security works and what different threats you're facing.
In Section 6, we'll review all of this. We will look at the basic security tools that Django provides, as well as a couple additional tools that will help make Django even more secure than it already is. Lastly, we'll talk about planning for failure. Failure is inevitable and happens to everybody. So it's better to have a plan before you get caught in failure than to wind up there by accident. Before you start this course, though, you should know a couple of things. You should have a basic understanding of Django's concepts. You should understand what models, views, and templates are.
You should also have a basic understanding of how functions work and what class based views are. You should also need to understand how Django's templating works. You also need to understand how Python's object-oriented programming works. You'll need to understand how to build objects and classes; and you'll need a base-level understanding of how Python's inheritance system works. However, if you understand that; by the end of this course, you should be able to effectively use Django's class based views to build your own views. You also have a good understanding of how Django's generic class based views work.
You'll be able to build a powerful rest API quickly and easily with Django's rest framework. You'll be introduced and have a good understanding to what exactly GraphQL is, how it interfaces built with Django, and how GraphQL compares to a rest framework. You understand how to make your Django project more easier to use in a multi-developer setting. You also understand how to effectively unit test your models, views, and templates separately and together. And, lastly, you'll understand how security works in Django.
You'll learn how to secure Django against the most common threats, and you'll understand what threats Django protects against inherently. So, in the next video, we'll jump right into it and start discussing advanced class based views in Django.