Run syncdb

    Execute the Django-Admin syncdb command, if South is available on the
    minion the ``migrate`` option can be passed as ``True`` calling the
    migrations to run after the syncdb completes

    NOTE: The syncdb command was deprecated in Django 1.7 and removed in Django 1.9.
    For Django versions 1.9 or higher use the `migrate` command instead.

    CLI Example:

    .. code-block:: bash

        salt '*' django.syncdb <settings_module>

def syncdb(settings_module,
           bin_env=None,
           migrate=False,
           database=None,
           pythonpath=None,
           env=None,
           noinput=True,
           runas=None):
    '''
    Run syncdb

    Execute the Django-Admin syncdb command, if South is available on the
    minion the ``migrate`` option can be passed as ``True`` calling the
    migrations to run after the syncdb completes

    NOTE: The syncdb command was deprecated in Django 1.7 and removed in Django 1.9.
    For Django versions 1.9 or higher use the `migrate` command instead.

    CLI Example:

    .. code-block:: bash

        salt '*' django.syncdb <settings_module>
    '''
    args = []
    kwargs = {}
    if migrate:
        args.append('migrate')
    if database:
        kwargs['database'] = database
    if noinput:
        args.append('noinput')

    return command(settings_module,
                  'syncdb',
                   bin_env,
                   pythonpath,
                   env,
                   runas,
                   *args, **kwargs)