Management functions/commands

Swingers base’s management functions/commands.

swingers.management.add_view_permissions()

Adds a view_* permission for all content types. This function is automatically called in a post_syncdb hook.

Commands

swingers.management.quickdeploy()

Run manage.py collectstatic –noinput (if staticfiles_storage is local filesystem, add –link option). Fix ownership and permissions for media/, ., cronjobs and settings.STATIC_ROOT.

swingers.management.syncdbmigrate()

Runs manage.py syncdb –noinput, manage.py update_permissions, manage.py migrate –no-initial-data and manage.py migrate.

swingers.management.drop_create_db()

Deletes all tables in the “default” database and then runs manage.py syncdbmigrate.

swingers.management.deploy()

Runs syncdbmigrate and quickinstall.

swingers.management.metrics()

Runs pep8, cloccount and pyflakes.

swingers.management.create_db()

Creates and starts a local postgis-enabled postgresql db based on the settings.DATABASES[‘default’]”.

Django-swingers is a library of common utilities, templates and other django customizations used throughout Department of Parks and Wildlife.

Table Of Contents

Related Topics