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 1 year, 9 months ago | 399 views

Tags:- Django

Django | Cookie  A cookie is a small piece of information that is stored in the client's browser. It is used to store a user’s data in a file permanently (or for a specified time). Cookie …

Last updated 1 year, 9 months ago | 415 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 1 year, 9 months ago | 376 views

Tags:- Django

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 1 year, 9 months ago | 384 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 1 year, 9 months ago | 358 views

Tags:- Django

Django |  Loosely Coupled Framework Django is called a loosely coupled framework because of its MVT architecture, which is a variant of the MVC architecture. It helps in separating the server code from the client-related code. Django’s …

Last updated 1 year, 9 months ago | 675 views

Tags:- Django

Django | Model  A model is a Python class in Django that is derived from the django.db.models.Model class. A model is used in Django to represent a table in a database. It is used to interact …

Last updated 1 year, 9 months ago | 410 views

Tags:- Django

Django | Difference between a project and an app The project covers the entire application, while an app is a module or application within the project that deals with one dedicated requirement. So, a project consists …

Last updated 1 year, 9 months ago | 395 views

Tags:- Django

yield is a keyword beares the ability to turn any function into a generator.  Much like the standard return keyword, but returns a generator object. It is also true that one function may observe multiple …

Last updated 1 year, 9 months ago | 392 views

Tags:- Python

Python | Module and Package Module: The module is a simple Python file that contains collections of functions and global variables and with having a .py extension file. It is an executable file and to organize all …

Last updated 1 year, 9 months ago | 367 views

Tags:- Python

Python | context manager Context managers allow you to allocate and release resources precisely when you want to. The most widely used example of context managers is the with() statement.  with open('some_file', 'w') as opened_file: opened_file.write('Hola!')   The …

Last updated 1 year, 9 months ago | 419 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 1 year, 9 months ago | 366 views

Tags:- Python

Python | Memory manage Python has a private heap space to hold all objects and data structures. Being programmers, we cannot access it; it is the interpreter that manages it. But with the core API, …

Last updated 1 year, 9 months ago | 387 views

Tags:- Python

Python | accessors, mutators, and @property What we call getters and setters in languages like Java, we term accessors and mutators in Python. In Java, if we have a user-defined class with the property ‘x’, we …

Last updated 1 year, 9 months ago | 410 views

Tags:- Python

No. However, Abstract Base Classes (ABCs) are a feature from the abc module that let us declare what methods subclasses should implement. Python supports this module since version 2.7.

Last updated 1 year, 9 months ago | 412 views

Tags:- Python