Django

Django Tutorials

We found 8 Django Tutorials
Query your Django REST API like a GraphQL API with Django RESTQL
Query your Django REST API like a GraphQL API with Django RESTQL
The hype around GraphQL in recent years has been hard to ignore for any web developer. In short, GraphQL is a query language and runtime for APIs, and it has taken the web with storm. GraphQL makes it possible for front-end developers to query data from a single API endpoint and retri...
How to Cache Django REST Framework with Redis
How to Cache Django REST Framework with Redis
Django REST Framework is an awesome package that will aid you in writing REST APIs faster with Django and Python. Though Django REST Framework has many strengths, performance out-of-the-box might not be one of them. However, there are many ways to fix that, and one of them is caching....
How to Rebuild Django-MPTT Tree Structure
How to Rebuild Django-MPTT Tree Structure
Most application utilize some sort of tree structure to managing data, in one form or another. One common use-case is nested categories. If you are using Django for your current project and are in need to implement tree structures, there is a big change you have come across Django-MPT...
How to Count Reverse ManyToMany Relationships with Django REST Framework
How to Count Reverse ManyToMany Relationships with Django REST Framework
Sometimes it's useful to count the numbers of reverse m2m relationships for each specific object of a queryset. Normally with Django you would do this at the view level and it would automatically be available for you in the templates, through Django's template engine. #views.py from ...
Display Multiple Models in One Django Rest Framework View with DjangoRestMultipleModels
Display Multiple Models in One Django Rest Framework View with DjangoRestMultipleModels
Django REST Framework is a powerful package that makes it easy to create REST API's for Django. It comes bundled with everything you need to create a complete API quickly. There are some edge-cases however, for example when you want to display multiple models in view it becomes tricky...
Serve Scaled Images With Django Rest Framework and Django ImageKit
Serve Scaled Images With Django Rest Framework and Django ImageKit
To achieve optimal speed for web apps and web sites its important to minimise file size at almost all cost. Usually the biggest culprit is images (Apart from video of course), Images can easily add up to 90% of the total load your application if your are not careful. You can mitigate ...
How to Order Objects with Django REST Framework's Nested Serializer
How to Order Objects with Django REST Framework's Nested Serializer
An important part of building solid API is to utilize the power of nesting. With Django, and Django REST Framework its super easy to do so. But what if you want to order and manipulate these objects? One powerful feature of Django REST Framework is ability to nest objects with seriali...
How to Print Queries in Django Views
How to Print Queries in Django Views
If you are building a web application with Django you are well aware that the database is an integral part of your application. The need to analyze queries and to then query your data in the most optimal way is at the for front of your development process. Django provides a handful of...