Django - command createsuperuser creates superuser in the default database when passing the --database parameter

I have three Postgre databases in my project:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'default',
        'USER': 'user',
        'PASSWORD': 'password',
    },
    'clients_db': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'clients_db',
        'USER': 'user',
        'PASSWORD': 'password',
    },
    'other': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'other',
        'USER': 'user',
        'PASSWORD': 'password',
    },
}

And three apps: clients, users and myapp.

The app clients have a router for the clients_db database:

class ClientsRouter:

    route_app_labels = {'clients'}

    def db_for_read(self, model, **hints):
        if model._meta.app_label in self.route_app_labels:
            return 'clients_db'
        return None

    def db_for_write(self, model, **hints):
        if model._meta.app_label in self.route_app_labels:
            return 'clients_db'
        return None

    def allow_relation(self, obj1, obj2, **hints):
        if (
            obj1._meta.app_label in self.route_app_labels or
            obj2._meta.app_label in self.route_app_labels
        ):
            return True
        return None

    def allow_migrate(self, db, app_label, model_name=None, **hints):
        if app_label in self.route_app_labels:
            return db == 'clients_db'
        return None

The other two apps uses the same database. I can run migrations and migrate just fine using the commands:

python manage.py makemigrations

Then, to apply migrations to the default database:

python manage.py migrate

And to apply migrations to the other database:

python manage.py migrate --database other

But when I try to run the command to create a superuser in the other database, it creates a superuser in the default database instead. The command:

python manage.py createsuperuser --database other

The installed apps:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'clients',
    'users',
    'myapp',
    'django_filters',
    'widget_tweaks',
]

From what I understand based on the docs (https://docs.djangoproject.com/en/4.1/ref/django-admin/#createsuperuser) the command should work and create the superuser in the specified database. Any ideas what I'm missing?

Back to Top