Python | PYTHONPATH  PYTHONPATH is an environment variable that you can set to add additional directories where Python will look for modules and packages. This is especially useful in maintaining Python libraries that you do not wish …

Last updated 4 years, 1 month ago | 1677 views

Tags:- Python

Django | Check Version  To check for the version of Django installed on your system, you can open the command prompt and enter the following command: python -m django –version You can also try to import …

Last updated 4 years, 1 month ago | 1674 views

Tags:- Django

Python | Pass Statement The pass statement is used as a placeholder for future code. It represents a null operation in Python. It is generally used for the purpose of filling up empty blocks of …

Last updated 4 years, 1 month ago | 1672 views

Tags:- Python

Python has a rich set of built-in exceptions designed to handle various types of runtime errors. These exceptions help you detect and respond to unexpected events during program execution. In this guide, you'll learn: What …

Last updated 1 year, 2 months ago | 1671 views

Tags:- Python

Django | Middleware  Middleware is something that executes between the request and response. In simple words, you can say it acts as a bridge between the request and response. Similarly In Django when a request is made …

Last updated 4 years, 1 month ago | 1667 views

Tags:- Django

Python | namedtuple A namedtuple will let us access a tuple’s elements using a name/label. We use the function namedtuple() for this, and import it from collections. >>> from collections import namedtuple #format >>> result=namedtuple('result','Physics Chemistry …

Last updated 4 years, 1 month ago | 1665 views

Tags:- Python

Python | *args and **kwargs  *args is a special syntax used in the function definition to pass variable-length arguments. e.g: myFun(*argv) def func(*args): for i in args: print(i) func(2,3,4) #Output 2 3 4   **kwargs is …

Last updated 4 years, 1 month ago | 1663 views

Tags:- Python

Django | Disadvantages  Django has the following disadvantages: Django's modules are bulky. It is completely based on Django ORM. Components are deployed together. We must know the full system to work with it.

Last updated 4 years, 1 month ago | 1659 views

Tags:- Django

Django | Set up Database We need to edit the setting.py file present in the project, which contains all the settings related to the project. By default Django comes with an SQLite database; The  SQLite database …

Last updated 3 years, 11 months ago | 1656 views

Tags:- Django

Python has a multi-threading package, but commonly not considered good practice to use it as it will result in increased code execution time. Python has a constructor called the Global Interpreter Lock (GIL). The GIL ensures …

Last updated 4 years, 1 month ago | 1652 views

Tags:- Python

Finalize method is used for freeing up the unmanaged resources and cleaning up before the garbage collection method is invoked. This helps in performing memory management tasks.

Last updated 4 years, 1 month ago | 1651 views

Tags:- Python

Markers in Matplotlib are symbols used to highlight individual data points on plots. They are especially useful in line plots, scatter plots, and custom visualizations where you want to emphasize the individual points. This guide …

Last updated 1 year, 2 months ago | 1646 views

Tags:- Python Matplotlib

List the inheritance styles in Django There are three possible inheritance styles in Django, and they are: Abstract Base Classes: This is used when we want to make the parent class hold the information which …

Last updated 3 years, 11 months ago | 1644 views

Tags:- Django

Django | Session Framework Using the session framework, you can easily store and retrieve arbitrary data based on the pre-site-visitors. It stores data on the server side and takes care of the process of sending and …

Last updated 4 years, 1 month ago | 1643 views

Tags:- Django

Python |  / and // Operator /: is a division operator and returns the Quotient value. e.g: 10/3  will return 3.33 // : is known as floor division operator and used to return only the value of …

Last updated 4 years, 1 month ago | 1640 views

Tags:- Python