DRF Token Authentication
Summary: In this tutorial, you will learn what is token authentication and how you can implement it in Django Rest Framework (DRF). What is Token Authentication? Token authentication is a…
Articles, discussions, and solutions for Python’s Django web framework.
Summary: In this tutorial, you will learn what is token authentication and how you can implement it in Django Rest Framework (DRF). What is Token Authentication? Token authentication is a…
Summary: In this tutorial, you will learn the difference between AbstractUser and AbstractBaseUser classes in Django. What are AbstractUser and AbstractBaseUser? AbstractUser and AbstractBaseUser are both classes provided by Django…
Summary: In this tutorial, you will learn to create a custom user model by extending the predefined AbstractBaseUser and BaseUserManager classes in Django. What is user Model in Django? In…
To do a "not equal" comparison in a Django queryset filter, you can use the __ne lookup type. For example: MyModel.objects.filter(field__ne='value') This will return all the MyModel instances where the…
Summary: In this tutorial, you will learn to build a real time chat application using the Django web framework. To build a realtime chat application in Django, you will need…
Summary: In this tutorial, you will learn the significance of the on_delete parameter in ForeignKey field in Django. In Django, the on_delete parameter is used to specify what should happen…
Summary: In this tutorial, you will learn how to handle file upload using model and form in Django framework. In Django, you can handle file uploads using a model field…
You cannot revert a migration in Django but can migrate to a previous migration to apply the old changes on the database. For example, consider the following as the last…
related_name in Django is an attribute that is used to specify the name of the Manager that returns the instances of the source model in the model's relationship i.e the…
A Slug in Django is a string that contains only letters, numbers, underscores, or hyphens. For examples, 'hello-world', 'what-is-slug', 'learn-django', etc. Slugs are generally used in URLs. For example, in…