RRohaninrohansblog.hashnode.dev·Nov 24, 2024 · 4 min readDjango 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...00
RRohaninrohansblog.hashnode.dev·Aug 31, 2024 · 2 min readCompiled 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...00
RRohaninrohansblog.hashnode.dev·Aug 11, 2024 · 3 min readGenerators 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...00
RRohaninrohansblog.hashnode.dev·Nov 11, 2023 · 3 min readPython: 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...00
RRohaninrohansblog.hashnode.dev·Oct 21, 2023 · 3 min readAuto 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...00