Categories
Python Software Development

Filter sensitive contents from Django’s error reports

Reporting application errors to a (small) list of admins is a feature that already comes built in and ready to use in Django. You just need to configure the ADMINS setting and have the application ready to send emails. All application errors (status 500 and above) will trigger a new message containing all the details, […]

Categories
Python

Take advantage of Django’s system checks

Today, let’s go back to the topic of the first post in this series of Django tips. At the time, I focused on the python manage.py check –deploy command. In this article, I will explore the feature on which it is built and how it can be quite handy for many other scenarios. So, the […]

Categories
Python Software Development

So you need to upgrade Django

No matter how much you try to delay and how many reasons you find to postpone, eventually the time comes. You need to update and upgrade your software, your system components, your apps, your dependencies, etc. This happens to all computer users. On some systems, this is an enjoyable experience, on other systems as painful […]

Categories
Personal Python

Shutting Down Webhook-logger

A few years ago I built a small application to test Django’s websocket support through django-channels. It basically displayed on a web page in real time all the requests made to a given endpoint (you could generate multiple of them) without storing anything. It was fun and it was very useful to quickly debug stuff […]

Categories
Python

Django Friday Tips: Less known builtin commands

Django management commands can be very helpful while developing your application or website, we are very used to runserver, makemigrations, migrate, shell and others. Third party packages often provide extra commands and you can easily add new commands to your own apps. Today lets take a look at some less known and yet very useful […]

Categories
Python

Django Friday Tips: Admin Docs

While the admin is a well known and very useful app for your projects, Django also includes another admin package that isn’t as popular (at least I never seen it being heavily used) but that can also be quite handy. I’m talking about the admindocs app. What it does is to provide documentation for the […]

Categories
Python Software Development

Django Friday Tips: Deal with login brute-force attacks

In the final tips post of the year, lets address a solution to a problem that most websites face once they have been online for a while. If you have a back-office or the concept of user accounts, soon you will face the security problem of attackers trying to hack into these private zones of […]

Categories
Python

Django Friday Tips: Custom Admin Pages

One of the great builtin features of Django is the admin app. It lets you, among other things, execute the usual CRUD operations on your data, search, filter and execute bulk actions on many records. However the interface is a bit rigid, by default you have the “dashboard” with the list of models, the page […]

Categories
Python Software Development

Django Friday Tips: Password validation

This time I’m gonna address Django’s builtin authentication system, more specifically the ways we can build custom improvements over the already very solid foundations it provides. The idea for this post came from reading an article summing up some considerations we should have when dealing with passwords. Most of those considerations are about what controls […]

Categories
Python

Django Friday Tips: Subresource Integrity

As you might have guessed from the title, today’s tip is about how to add “Subresource integrity” (SRI) checks to your website’s static assets. First lets see what SRI is. According to the Mozilla’s Developers Network: Subresource Integrity (SRI) is a security feature that enables browsers to verify that resources they fetch (for example, from […]