django

Creating thumbnail in Django with using django-imagekit

Django-imagekit is an app for processing images. You can programmatically change images with imagekit. For this blog post, we will create thumbnails and look for its Django Rest Framework usage (DRF). 1. Installation of django-imagekit pip install pillow pip install django-imagekit INSTALLED_APPS = [ ‘imagekit’, ] 2. Creating thumbnail with django-imagekit For creating a thumbnail in Django from an image…

Continue Reading

Uncategorized

How to use UUID in Django

What is UUID and How we can use it in Django? UUID(Universal Unique Identifier) is a Python library that generating random objects of 128 bits. It is a standard built-in Python library that means you don’t need to install anything. There are three main algorithms used for generating randoms: Using IEEE 802 MAC addresses as a source of uniqueness Using…

Continue Reading

django, python

Usage of *args and **kwargs in Python, extra example in Django

What are *args and **kwargs in python? While defining the functions sometimes we also specify parameters which we will use these parameters when we call these functions. Sometimes we don’t know the number of parameters of functions, in these cases, we use *args and **kwargs. Basically *args and **kwargs allow us to pass multiple arguments or keyword arguments to a…

Continue Reading