salt.modules.djangomod

Manage Django sites

salt.modules.djangomod.collectstatic(settings_module, bin_env=None, no_post_process=False, ignore=None, dry_run=False, clear=False, link=False, no_default_ignore=False, pythonpath=None)

Collect static files from each of your applications into a single location that can easily be served in production.

CLI Example:

salt '*' django.collectstatic settings.py
salt.modules.djangomod.command(settings_module, command, bin_env=None, pythonpath=None, *args, **kwargs)

Run arbitrary django management command

CLI Example:

salt '*' django.command <settings_module> <command>
salt.modules.djangomod.createsuperuser(settings_module, username, email, bin_env=None, database=None, pythonpath=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:

salt '*' django.createsuperuser settings.py user user@example.com
salt.modules.djangomod.loaddata(settings_module, fixtures, bin_env=None, database=None, pythonpath=None)

Load fixture data

Fixtures:
comma separated list of fixtures to load

CLI Example:

salt '*' django.loaddata settings.py <comma delimited list of fixtures>
salt.modules.djangomod.syncdb(settings_module, bin_env=None, migrate=False, database=None, pythonpath=None, noinput=True)

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

CLI Example:

salt '*' django.syncdb settings.py

Parent topic

Previous topic

salt.modules.disk

Next topic

salt.modules.ebuild