Create a super user for the database.
    This function defaults to use the ``--noinput`` flag which prevents the
    creation of a password for the superuser.

    CLI Example:

    .. code-block:: bash

        salt '*' django.createsuperuser <settings_module> user user@example.com

def createsuperuser(settings_module,
                    username,
                    email,
                    bin_env=None,
                    database=None,
                    pythonpath=None,
                    env=None,
                    runas=None):
    '''
    Create a super user for the database.
    This function defaults to use the ``--noinput`` flag which prevents the
    creation of a password for the superuser.

    CLI Example:

    .. code-block:: bash

        salt '*' django.createsuperuser <settings_module> user user@example.com
    '''
    args = ['noinput']
    kwargs = dict(
        email=email,
        username=username,
    )
    if database:
        kwargs['database'] = database
    return command(settings_module,
                   'createsuperuser',
                   bin_env,
                   pythonpath,
                   env,
                   runas,
                   *args, **kwargs)