Dkova Dkova - 1 year ago 182
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!"}

Answer Source

Update your '':

urlpatterns = patterns('',
    url(r'^about/$', views.about),
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download