From 76e791914de8f59ddc9613b1fcbf3800595ba63d Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Fri, 8 Nov 2024 17:44:48 +0100 Subject: [PATCH] update example to use signposting.Signpost --- example/example/views.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/example/example/views.py b/example/example/views.py index f90b5ec..7f01760 100644 --- a/example/example/views.py +++ b/example/example/views.py @@ -1,12 +1,16 @@ from django.http import HttpResponse from django_signposting.utils import add_signposts +from signposting import Signpost, LinkRel + def my_view(request): response = HttpResponse("Hello, world!") # Add signpostings as string - add_signposts(response, - type="https://schema.org/Dataset", - author="https://orcid.org/0000-0001-9447-460X") + add_signposts( + response, + Signpost(LinkRel.type, "http://schema.org/Dataset"), + Signpost(LinkRel.author, "https://orcid.org/0000-0001-9447-460X") + ) return response \ No newline at end of file