From 80016b6bee7d67012f4f6988e5a292ee69b38f5a Mon Sep 17 00:00:00 2001 From: Hannes Date: Fri, 27 Jun 2025 21:56:53 +0200 Subject: [PATCH 1/2] Fix formatting in docs --- docs/content/demo.md | 6 ++++-- docs/content/quick-start.md | 4 +++- docs/content/tests.md | 17 +++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/content/demo.md b/docs/content/demo.md index 36e80988..f6186676 100644 --- a/docs/content/demo.md +++ b/docs/content/demo.md @@ -25,9 +25,11 @@ docker compose exec django python manage.py migrate --no-input docker compose exec django python manage.py populate_users docker compose exec django python manage.py populate_data ``` + After waiting little you'll be able to access all collections at http://0.0.0.0:7180/oapif/collections. Three users are provided out of the box; they can be logged in with through basic authentication; all `123` for password: + - `demo_viewer` - `demo_editor` - `admin` @@ -40,7 +42,7 @@ When up and running you can access the REST API from QGIS like this: - Go to `Layers` > `Add layer` > `Add WFS Layer...` - Create a new connection - - URL: `https://0.0.0.0:7180/oapif/` - - Version: `OGC API - Features` + - URL: `https://0.0.0.0:7180/oapif/` + - Version: `OGC API - Features` - Click OK and ignore choose to ignore the invalid certificate error and store the exception - You should see the two layers in the list, select them and choose `add`. diff --git a/docs/content/quick-start.md b/docs/content/quick-start.md index fcfd75b0..40af5ef5 100644 --- a/docs/content/quick-start.md +++ b/docs/content/quick-start.md @@ -17,7 +17,7 @@ pip install --user https://github.com/opengisch/django-oapif Edit settings.py -``` +```python INSTALLED_APPS = [ ... "django_oapif", @@ -28,11 +28,13 @@ INSTALLED_APPS = [ Add this to your `urls.py` : +```python urlpatterns += [ ..., path("oapif/", include(django_oapif.urls)), ..., ] +``` ## Register your models with the decorator: diff --git a/docs/content/tests.md b/docs/content/tests.md index 4c678351..6f2df568 100644 --- a/docs/content/tests.md +++ b/docs/content/tests.md @@ -5,19 +5,20 @@ hide: ## Run tests - # unit tests - docker compose exec django python manage.py test - - # integration tests - docker compose --profile testing_integration up -d - docker compose run integration_tests +```bash +# unit tests +docker compose exec django python manage.py test +# integration tests +docker compose --profile testing_integration up -d +docker compose run integration_tests +``` ## OGC Conformance You can run the OGC API conformance test suite like this: -``` +```bash docker compose --profile testing_conformance up --build -d docker compose exec django python manage.py migrate --no-input docker compose exec django python manage.py populate_users @@ -25,4 +26,4 @@ docker compose exec django python manage.py populate_data docker compose run conformance_test ``` -Results will be stored to `tests/output/emailable-report.html +Results will be stored to `tests/output/emailable-report.html` From 1db54106403cc2aee2fe5f3838b4ab74778e5634 Mon Sep 17 00:00:00 2001 From: Hannes Date: Fri, 27 Jun 2025 21:57:13 +0200 Subject: [PATCH 2/2] Fix button name --- docs/content/demo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/demo.md b/docs/content/demo.md index f6186676..390c7db1 100644 --- a/docs/content/demo.md +++ b/docs/content/demo.md @@ -45,4 +45,4 @@ When up and running you can access the REST API from QGIS like this: - URL: `https://0.0.0.0:7180/oapif/` - Version: `OGC API - Features` - Click OK and ignore choose to ignore the invalid certificate error and store the exception -- You should see the two layers in the list, select them and choose `add`. +- You should see the two layers in the list, select them and choose `Add`.