How to automatically clean your modified code?

Introduction In this post I will show you some of my ideas to fix Python code style in repositories that haven’t used code formatters so far. Without them, the files content may be difficult to read, especially when developed by many users. I will tell you about

Read more

Writing Django tests for session variables stored in cookies

When you need to somehow keep the state of your Django application, one of the possible solutions is to use sessions. They let you overcome the weakness of HTTP, which is, well, stateless. Django uses sessions by default for e.g. user authentication. You need this function if

Read more

How to decorate a class with a method in Python?

There are many tutorials about how to decorate a function in Python language. In short, we do this as follows: Suppose we would like to decorate the whole class instead of a single method. How to do this? Let’s see next listing and find the difference from

Read more