From 78e51d51591dbd07dc8ebdc5569c52199496bbdd Mon Sep 17 00:00:00 2001 From: 0xflotus <0xflotus@gmail.com> Date: Thu, 14 May 2020 18:49:48 +0200 Subject: [PATCH 1/2] (docs): enabled syntax highlighting for http patch --- docs/custom_virtualenvs.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/custom_virtualenvs.md b/docs/custom_virtualenvs.md index 792cb25bcb..9b47c5d5ca 100644 --- a/docs/custom_virtualenvs.md +++ b/docs/custom_virtualenvs.md @@ -140,14 +140,16 @@ Assigning Custom Virtualenvs Once you've created a custom virtualenv, you can assign it at the Organization, Project, or Job Template level: - PATCH https://awx-host.example.org/api/v2/organizations/N/ - PATCH https://awx-host.example.org/api/v2/projects/N/ - PATCH https://awx-host.example.org/api/v2/job_templates/N/ +```http +PATCH https://awx-host.example.org/api/v2/organizations/N/ +PATCH https://awx-host.example.org/api/v2/projects/N/ +PATCH https://awx-host.example.org/api/v2/job_templates/N/ - Content-Type: application/json - { - 'custom_virtualenv': '/opt/my-envs/custom-venv/' - } +Content-Type: application/json +{ + "custom_virtualenv": "/opt/my-envs/custom-venv/" +} +``` An HTTP `GET` request to `/api/v2/config/` will provide a list of detected installed virtualenvs: From 5d82d89dc29cda35d971eab17b2787e9b4e98f30 Mon Sep 17 00:00:00 2001 From: 0xflotus <0xflotus@gmail.com> Date: Thu, 14 May 2020 18:54:06 +0200 Subject: [PATCH 2/2] enabled syntax highlighting --- docs/cors.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/cors.md b/docs/cors.md index 19879ce445..187d950e7a 100644 --- a/docs/cors.md +++ b/docs/cors.md @@ -5,9 +5,11 @@ AWX supports custom CORS headers via the Django CORS Middleware To define CORS-specific settings, add them to ``/etc/tower/conf.d/cors.py``: - CORS_ORIGIN_WHITELIST = ( - 'hostname.example.com', - '127.0.0.1:9000' - ) +```python +CORS_ORIGIN_WHITELIST = ( + 'hostname.example.com', + '127.0.0.1:9000' +) +``` ...and restart all AWX services for changes to take effect.