Django ORM: Accessing foreign key objectsOne to many, many to one relationships For demonstration, let’s create a Django project and start an app call books. We will take the example of the relationship between books and reviews and create two simple models for them. As you know, one book c...Nov 24, 2024·4 min read
Order in which operations are processed in pythonUsing a mnemonic to memorize the operator precedence in pythonOct 7, 2023·2 min read
CORS explained using Django and FlaskCross Origin Resource Sharing (CORS) Certain "cross-domain" requests, notably Ajax requests, are forbidden by default by the same-origin security policy. Cross-Origin Resource Sharing is an HTTP-header based mechanism that allows a server to indica...Aug 12, 2023·4 min read
Content security policy explained using FlaskIf you want to improve the security of your website, you can use a content security policy to help detect and mitigate certain types of attacks, including Cross-Site Scripting (XSS) and data injection attacks. Basically, a content security policy tel...Jul 29, 2023·2 min read
HTTP redirect explained using FLASKHTTP Redirect In HTTP, redirection is triggered by a server sending a special redirect response to a request. Redirect responses have status codes that start with 3, and a Location header holding the URL to redirect to. When browsers receive a redire...Jul 23, 2023·2 min read
Logical vs Bitwise operators: AND, OR, NOTUnderstanding the differences in python between AND, OR and NOT logical and bitwise operatorsJul 18, 2023·2 min read
My 5 favorite keyboard shortcuts in VS CodeUsing keyboard shortcuts to increase efficiency and productivityJul 6, 2023·2 min read