ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents characters in computers. Each character is assigned a unique number between 0 and 127. You may encounter a problem where you are supposed to write a Python program to get the ASCII value of a character. Getting the ASCII value of […]
Django Migrations Tutorial: How to Make Migrations in Django.
This post will show you how to do migrations in a Django project. Creating migrations and then applying them to the database are two separate steps in the Django migration process. The makemigrations command is used for the former, and the migrate command for the latter. What are Migrations in Django? Django migration is a […]
Exponents in Python: A Complete Guide
Exponentiation is a mathematical operation that represents repeated multiplication of a number by itself. To raise a number to a power in Python, we can either use the exponentiation operator (**) or the pow() function as well as some other ways to raise a number to a power that we will cover in this post. […]
How to Create Form from Model in Django
This post will show you how to create a form from a model in Django using the ModelForm class. Assume you’re developing a book website where users may add Books with information such as title, synopsis, and cover for each book. You will, of course, need a form for this. But instead of creating the […]
How To Access The Django Admin.
The Django administration site is a wonderful feature unique to the web development framework. It’s one of the Django features that makes it stand out against other web development frameworks like Laravel. The admin allows you to interact with the models you have registered in the admin.py file. Django professionals can go away with using […]
How to Generate a Secret Key in Django
In this post, you’re going to learn about the Django secret key, what it is used for, and how to generate it for your Django project. What is a Django secret key? To perform cryptographic signing, or to create hashes and tokens for sensitive information like csrf tokens, password reset tokens, etc, Django makes use […]
How to use Environment Variables in Django
In a Django project, there is information that needs to be kept secret like a Secret key, a Database username and password, and API keys. This is because their exposure to foreign parties can put your project at risk of security attacks. In Django projects that are not meant for deployment, this may not be […]
How to use Django offline?
Sometimes, if you are a Django developer, you may want to create a Django project without an internet connection. This post is going to answer the question can Django be used offline and if it does, how can one do it. Can Django be used offline? Yes. Django can be used offline. Meaning, you can […]
How to Make a Multiplication Table in Python
A multiplication table for a number displays all the number’s multiples and their corresponding factors; usually in the ascending order of their greatness. We normally do this manually by writing down a set of ordered numbers and multiplying each of them with the number concerned then writing down the product we get next to them. […]
How To Add favicon to Django project
A favicon is that small icon that appears at the top of a tab in a browser. A favicon can make your site look professional almost instantly. In this post, I’ll show you how to add a favicon to your Django project to make it look a bit more professional. Below is an image of […]