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 3 years, 10 months ago | 1527 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 3 years, 10 months ago | 1525 views

Tags:- Python

The answer here is no. The modules with circular references to other objects, or to objects referenced from global namespaces, aren’t always freed on exiting Python. Plus, it is impossible to de-allocate portions of memory …

Last updated 3 years, 10 months ago | 1525 views

Tags:- Python

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 3 years, 10 months ago | 1525 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 3 years, 10 months ago | 1521 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 3 years, 10 months ago | 1520 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 3 years, 10 months ago | 1519 views

Tags:- Python

Python | Global, Local and Nonlocal variables Global variables are public variables that are defined in the global scope.  A variable declared inside the function's body or in the local scope is known as a …

Last updated 3 years, 10 months ago | 1518 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 3 years, 10 months ago | 1514 views

Tags:- Django

Django | ORM ORM stands for Object-relational Mapper. Instead of interacting with the database by writing raw SQL queries and converting the data returned from the query into a Python object, ORM allows us to interact …

Last updated 3 years, 10 months ago | 1510 views

Tags:- Django

The two static analysis tools used to find bugs in Python are Pychecker and Pylint. Pychecker detects bugs from the source code and warns about its style and complexity. While Pylint checks whether the module …

Last updated 3 years, 10 months ago | 1509 views

Tags:- Python

Python | Slicing  As the name suggests, ‘slicing’ is taking parts of sequences like lists, tuples, and strings. Syntax for slicing is [start : stop : step] The start is the starting index from where to slice a …

Last updated 3 years, 10 months ago | 1507 views

Tags:- Python

Python | ‘is’, ‘not’, and ‘in’ operators is: Returns True if both variables are the same object >>> x = 5 >>> y = 5 >>> z = 1 >>> x is y True >>> x …

Last updated 3 years, 8 months ago | 1502 views

Tags:- Python

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, 8 months ago | 1498 views

Tags:- Django

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, 8 months ago | 1495 views

Tags:- Django