Django tips and tricks

code of how to retrieve the latest row from the Django Database with Django Models

When to use gettext() and gettext_lazy() Functions for TranslationAll of these snippets, Django tips and tricks have been tested on real-world Django applications by me. I’m using each of them in my SaaS projects. I wrote this article in a specific manner,

Matplotlib and Bokeh Cheat Sheet, Python Programming language

Matplotlib and Bokeh Cheat Sheet, Python Programming language

The matplotlib cheat sheet was created to help visualize data. Datacamp provides a cheat sheet describing the basics of seaborn. Seaborn is also a widely used library for data visualization with python. It allows getting a very clean chart with less code. Matplotlib is

Create a GitHub bot for automatic contributions

Create a GitHub bot for automatic contributions

Have you ever wondered how non-tech guys have such impressive contribution stats on their Github profiles? Yes, they have set up a GitHub bot that uploads the same file over and over again to the GitHub repo. This piece of content is

Properly run FastAPI uvicorn+gunicorn with HTTPS

fullchain under nginx configuration file

To run the FastAPI on HTTPS: edit systemctl service file of your app service. On Ubuntu, those files located at (/etc/systemd/system/) If you don’t remember where you put the service file of your app – just run the systemctl status command: systemctl

Properly Run Python Django under a local network

Properly Run Python Django under a local network

First, you need to find your local IP address with this command in cmd: ipconfig/all Open settings.py and add your IP address to the ALLOWED_HOSTS list: ALLOWED_HOSTS = [‘192.168.xxx.xxx’] Finally run command in the terminal: python manage.py runserver 192.168.xxx.xxx:8000 Voila, now you