diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2015-06-30 06:47:00 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2015-06-30 06:47:00 -0700 |
commit | ae49022a2c90b23d055f9ce14d615cedf89ec228 (patch) | |
tree | 0cd92a490da105cd4d9187c8d28df62b17f0f353 /web_infrastructure | |
parent | 4ef5a45347558349f0fa23e138bf18559dd9a672 (diff) | |
parent | d9360a7613318a593d4ed5688269979dc60c7d72 (diff) | |
download | ansible-modules-core-ae49022a2c90b23d055f9ce14d615cedf89ec228.tar.gz |
Merge pull request #574 from cchurch/django_manage_other_command
Add example of using django_manage to run other commands.
Diffstat (limited to 'web_infrastructure')
-rw-r--r-- | web_infrastructure/django_manage.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/web_infrastructure/django_manage.py b/web_infrastructure/django_manage.py index c5ca5a00..17b0534d 100644 --- a/web_infrastructure/django_manage.py +++ b/web_infrastructure/django_manage.py @@ -30,7 +30,8 @@ options: command: choices: [ 'cleanup', 'collectstatic', 'flush', 'loaddata', 'migrate', 'runfcgi', 'syncdb', 'test', 'validate', ] description: - - The name of the Django management command to run. Built in commands are cleanup, collectstatic, flush, loaddata, migrate, runfcgi, syncdb, test, and validate. Other commands can be entered, but will fail if they're unknown to Django. + - The name of the Django management command to run. Built in commands are cleanup, collectstatic, flush, loaddata, migrate, runfcgi, syncdb, test, and validate. + - Other commands can be entered, but will fail if they're unknown to Django. Other commands that may prompt for user input should be run with the I(--noinput) flag. required: true app_path: description: @@ -102,7 +103,7 @@ EXAMPLES = """ # Load the initial_data fixture into the application - django_manage: command=loaddata app_path={{ django_dir }} fixtures={{ initial_data }} -#Run syncdb on the application +# Run syncdb on the application - django_manage: > command=syncdb app_path={{ django_dir }} @@ -110,8 +111,11 @@ EXAMPLES = """ pythonpath={{ settings_dir }} virtualenv={{ virtualenv_dir }} -#Run the SmokeTest test case from the main app. Useful for testing deploys. -- django_manage: command=test app_path=django_dir apps=main.SmokeTest +# Run the SmokeTest test case from the main app. Useful for testing deploys. +- django_manage: command=test app_path={{ django_dir }} apps=main.SmokeTest + +# Create an initial superuser. +- django_manage: command="createsuperuser --noinput --username=admin --email=admin@example.com" app_path={{ django_dir }} """ |