Dkova Dkova - 2 months ago 16x
Python Question

Django rest framework api

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:

def about(request):
return Response({"message": "Hello, world!"})

i put it in
what more i should do the make it work?
when i run the server and write this lines

i want it to saw me "
{"message": "Hello, world!"}


Update your '':

urlpatterns = patterns('',
    url(r'^about/$', views.about),