from django.core.management.base import BaseCommand

from promptgame.gameui.pgbouncer import write_pgbouncer_config


class Command(BaseCommand):
    help = (
        "Prints a configuration for pgbouncer derived from the current "
        "Django database settings."
    )

    def handle(self, *args, **options):
        self.stdout.write(write_pgbouncer_config())
