![]() ![]() It also provides several different ways of doing authentication and has a solid exception-management mechanism.Ġ2:46 REST isn’t meant to be too complicated, and Ninja gives you several ways of organizing your code- a flexibility that allows you to keep it simple for small projects, or have a bit more definition for your larger ones.Ġ3:00 Next up, I’ll start you on your journey by giving an overview of REST. It is heavily inspired by Fast API and uses decorators to change your view into a REST call.Ġ2:31 Ninja includes a layer that handles the serialization and deserialization of your data, meaning you have less code to write. You use something like Django for the server and then Vue or React or Angular or whatever else for the front end, with REST being the communication glue between the browser and the server.Ġ2:19 Ninja is a library that helps you write REST interfaces on top of your Django views. REST is the de facto way of doing single-page applications nowadays. It’s built on top of HTTP operations, like GET and POST and uses the HTTP request and response bodies for payloads.Ġ1:53 Typically, your data is encoded in either JSON or XML inside of the payload. It’s more of a coding pattern which is in very common use. For those that don’t, or if you’re using the versions of Windows that don’t come with it, you’ll need to grab it if you want to code along with me.Ġ1:33 REST is short for representational state transfer, and it is a standard that isn’t a standard. If you haven’t used it before, it allows you to grab the contents of a web page, among many other things.Ġ1:20 Most Unix-like operating systems come with it installed. Links below can point you at some possible material to get you started.Ġ1:08 To demonstrate the REST interfaces I’ll be building, I’m going to be using a command-line tool called curl. And I’m going to be using some sample data, so you’ll either need to know how to load fixtures from the sample code or use the Django admin to enter some of your own.Ġ0:58 If you need to brush up on any of these concepts, you may want to read another tutorial or take another course first. You’re going to need basic familiarity with some of the key concepts of Django, including models, views, and URLs.Ġ0:45 I’ll occasionally be using the management shell, so you’ll need to know how to get into that. This course is all about the Django Ninja package, which is used for building REST interfaces in your Django project.Ġ0:14 You’re going to learn about REST APIs, Django Ninja, URL arguments and query strings, serialization through Schema and ModelSchema classes, CRUD operations, authentication, and error management.Ġ0:33 Django is a pretty big framework, and as such, this course doesn’t cover it. My name is Christopher, and I will be your guide. ![]() Get Started With Django Part 1: Build a Portfolio App (video course)Ġ0:00 Welcome to Sneaky REST APIs with Django Ninja.Get Started With Django Part 1: Build a Portfolio App (tutorial).Build a Personal Diary With Django and Python (tutorial). ![]() Manage Your To-Do Lists Using Python and Django (tutorial).If you need a refresher on these topics, check out: You don’t need to be an expert, but you do need to understand the basics of views, models, and URL routes. To get the most out of this course, you’ll need to have prior experience with the Django framework. Serialization through Schema and ModelSchema classes.If you’d like to quickly build API endpoints and learn the ways of the Ninja, you’re in the right place. Along the way, you’ll be using curl, a command-line tool that allows you to grab the contents of a web page. The Django Ninja library is a FastAPI-inspired tool kit for turning Django views into REST API endpoints with very little extra code. To use this model with Django, you build a project where Django is the back end accessed through a REST API. Many web projects have moved to the single-page application model. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |