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 readrohansblog.hashnode.dev
Compiled vs InterpretedLet's compare two popular languages and see how they are executed. On one side we have C#, which is a popular compiled language, and on the other side we have python which is a popular interpreted language. TL;DR C# code is a compiled into IL code a...Aug 31, 2024 · 2 min readrohansblog.hashnode.dev
Generators vs ListsDifferences GeneratorsLists DefinitionThey are a function that return an Iterator. Generators are lazy iterators. They return an item only when requiredLists are a sequence type that can group together several items of different types in a sin...Aug 11, 2024 · 3 min readrohansblog.hashnode.dev
Python: Less is moreHello, code lovers! In this article, we will explore features of Python that enable us to write less code. We will mention each feature and see with a practical example, how it can be used to reduce the quantity of code. Readability will not be the f...Nov 11, 2023 · 3 min readrohansblog.hashnode.dev
Auto escaping in Jinja and FlaskAuto Escape Auto escape means applying a proper escaping modifier to each variable in your template. As per the documentation, Flask configures Jinja2 to automatically escape all values unless explicitly told otherwise to help prevent XSS. Let's dive...Oct 21, 2023 · 3 min readrohansblog.hashnode.dev