Merge and Quick Sort algorithms

Merge and Quick Sort algorithms

These algorithms are what we call intermediate sorting algorithms. The main reason for using these algorithms is the lack of scalability in algorithms such as bubble sort. Understanding the limitations of the latter algorithms is critical. For instance, sorting an array of 100000 elements using bubble sort will take a lot of time to complete. Because of this, we need a quick way to sort massive arrays faster.

Mixins

What are Mixins in Django

When you mix generic views with Mixins, their true power emerges. A mixin is another class you create and whose methods your view class can inherit. Assume you want the additional variable ‘page_title’ in the template to appear in every view. You create a mixin using this method and let your views inherit instead of overriding the get_context_data method each time you develop the view.

Creating a Custom User Model in Django

Creating a Custom User Model in Django

The built-in User model and authentication functionality in Django are fantastic. For a long time, it’s been a Django mainstay. It is Django’s source of preference over alternative web frameworks like Flask, FastAPI, AIOHttp, and others. When a username and password contained in the user model need to be authenticated against a service other than Django’s default, authentication backends provide an expandable system.

Cookies in Django

Cookies in Django

A cookie is a tiny data bit stored in the client’s browser. It is used to save user data in a file or specified time permanently. Your browser keeps them locally, and most browsers will display you the cookies that have been generated under the Privacy and Security settings.