Business process model and notation is a wildly popular visual language for business automation low-code software. On the other hand there are many successful business application implemented on a text-based programming language like ECMAScript. Python, Java or C#. This article attempts to describe what a traditional software developer can learn from visual coding tools, and how a typical software architecture could be improved by adopting BPMN concepts in the code.

BPMN is a graphical notation for describing business processes created decades ago. …

The story about how I worked on a library of 1000 lines of code for 10 years.

In this article, I’m going to share my development experience with the Django-FSM project. I will describe the process of building pythonic API, discovered pitfalls, and implemented a generic Finite State Machine library.

I have never been connected to any other project for so long. When I started developing Django-FSM, I couldn’t even expect that such a small piece of code could be developed and rewritten from scratch several times over the years. …

This article introduces a new concept in the upcoming Viewflow 2.0 library, Class-based URL configuration — Viewset. Viewsets allow developers to create reusable Django packages, simplifies configuration and redefinition behavior of a bunch of views with common functionality for an end user. In this article. we will go through Viewset functionality, usage patterns and compare them with other class-based implementations, like django.contrib.adminand django-rest-framework.


Django is a web-framework famous for its “batteries included” philosophy. There is a lot of built-in functionality in the library and the broad set of third-party packages solves any imaginable problem you could have. …

2020 is almost over, and it’s a good time to analyze what the most demanded Django packages in 2020 were.

There are pretty detailed PyPI package repository download statistics available at google cloud. Let’s explore the result of a simple query that collects the total number of downloads for any package with a name containingdjango.

SELECT file.project, COUNT(*) as total_downloads
FROM `the-psf.pypi.file_downloads`
WHERE DATE(timestamp)
AND file.project like '%django%'
GROUP BY file.project
ORDER BY total_downloads DESC

Download count outperforms some packages that have been in use in the most active projects and…

I have discovered a truly remarkable solution for composite foreign keys support in Django ORM that works well when you can’t modify an existing database.

A composite foreign key is a foreign key that consists of two or more columns. Request to support for multiple-column primary keys has been open for over 15 years in the Django Tracker. There have been several attempts to implement this functionality. Nevertheless, the best thing you can do is modify an existing database table. You have to drop the old composite primary key and replace it with a new auto-increment primary key.

Database modification…

Full-automatic, copy-paste Nginx/Gunicorn/Let’s Encrypt HTTPS set up in minutes

Fresh Django project deployment always looks a bit cumbersome. Bunch of script files, configurations, and container infrastructure setup time could take more time than an actual MVP project. This article describes a way to deploy to a generic Ubuntu host, just with a single tool — Ansible, and the one-file deployment script.

The deployment could be really handy to get into production just after startproject/startapp commands, and before hiring a first member of your DevOps team.

If you already use Pipenv and Django-Environ just grab deploy.yml put it into your project and go down to “Let’s deploy” section

Here is…

In the previous two parts, we created a simple backend and frontend with user authentication.

In this final part, we would perform our first authenticated call to the API and implement JWT Refresh Token workflow.

Calling an API

Let’s create a simple helper, that would add Authentication header with token from our state.


export function withAuth(headers={}) {
return (state) => ({
'Authorization': `Bearer ${accessToken(state)}`

Now we can create our first API action, in a new file actions/echo.js

import { RSAA } from 'redux-api-middleware';
import { withAuth } from '../reducers'
export const ECHO_REQUEST = '@@echo/ECHO_REQUEST';
export const ECHO_SUCCESS = '@@echo/ECHO_SUCCESS';

In the previous part, we created a simple django back-end with JSON Web token authentication. Now we going to make a frontend with React and Redux

To work over first part of the tutorial, you need to have nodejs, npm, and create-react-app installed.

Redux is a library helps to organize predictable, one-way data flow in a front-end application. Everything starts from a single source of truth — a store. A store could be modified only by firing actions. Actions go through Redux middleware down to the reducer functions. Reducer functions produce a new state. …

This article shows how to quick-start with SPA applications development using Django and React/Redux.

It’s hard to imagine a Django application without user authentication and authorization. So we start with a simple application that can authenticate a user and perform an authorized request to an API.

In addition, you will see how to setup redux-router, local state persistence with redux-persist and write a simple UI with reactstrap (bootstrap 4 binding for the React)

In the first part of the tutorial we will create a simple Django backend with JWT token authentication.

Django Viewflow

Reusable workflow library #django #python

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store