I want to add to my Django project (using Django rest framework ) new get function. I want it to just send to me in Json "Hello world" without writing or without opening a table in the DB this is my code:
@api_view()
def about(request):
return Response({"message": "Hello, world!"})
i put it in view.py what more i should do the make it work? when i run the server and write this lines
http://127.0.0.1:8000/about
i want it to saw me "{"message": "Hello, world!"}"