In this post I will guide you in a very interesting and funny development task: automate your Telegram channel with a Django Telegram Bot. Telegram is a popular instant messaging application. It's not as widespread as Whatsapp, but its user…
In this blog post I will guide you to implement Django asynchronous tasks without Celery. First of all I will define what I mean with the term "asynchronous task". What are Django asynchronous tasks? Suppose that you want to perform…
Django – NGINX is a popular and well tested combination used to deploy web applications in production. In this post I will explain the steps needed to have your Django project deployed on a production server using Ubuntu 18.04.
Since Wordpress version 5.2 - in the case of fatal errors in your code - the scary WSOD (white screen of death) was substituted with a more elegant page with an error message "The site is experiencing technical difficulties". This…
Recently I had a problem of memory usage in Django: when I accessed an apparently innocent view I saw the memory usage of my server grow without rest. The problem turned out to be very trivial to solve, but I think the process I used to find the leak is worth a blog post. 😉
Assume that you have a Django project where each user belongs to just one group, say Registered or Admin, but not both.
You want to show a form in your front-end to let Admin users edit the user profiles, where each user profile is made with First name, Last name, Email and the user group.
This task can be accomplished very easily! What you need is a customized ModelForm to add the possibility to edit the user group together with the other fields, and a customized UpdateView to let you set the form initial data for the group field, and to save the changes correctly.
Sometimes it could be useful and elegant to have a Django view responding to more that GET and POST requests, implementing a simple REST interface. In this post I’ll show how you can support PUT and DELETE HTTP requests in Django.
If you administer at least one Joomla instance you’ll be subject to brute force attacks before or after. Fail2ban is a very nice service written in Python which periodically scans your log files looking for signs of brute force attacks and perform some actions when an attack is discovered. The most common actions is to ban the attacker IP at firewall level and send an email to the server administrator.
Fail2ban comes bundled with filters for many common services (ssh, apache authentication, etc.), but it lacks a built-in Joomla integration. Anyway it’s easy to add a Joomla filter to Fail2ban, here I explain how to do it.