On Tue, Dec 7, 2010 at 1:50 PM, sami nathan <[email protected]> wrote: > THANKS FOR NOTIFICATION > > I am trying to do webservice with RESTfull web service but i dint create > models > > my view file looks like this > from django.http import * > import urllib > > def current_datetime(request): > word = request.GET['word'] > > message=urllib.urlopen('http://m.broov.com/wap/di/sub?word='+word+'&type=00submit=Submit',) > return HttpResponse(message) > > My url looks like this (r'^wap/di/sub/',current_datetime ), > i want to restify my view but all examples are showing oly models .py > now i need help to do that > THANKS >
I can't understand what you are trying to do. You have a view called current_datetime, which then queries a WML service that seems to look up words in a dictionary (ie nothing to do with dates or times), and you then say you want to 'restify my view'.. What precisely is it that you want to 'restify' about this view? Do you want POST requests to the service URL to create new entries in this dictionary, DELETE requests to remove words? Typically REST examples only show interaction with models, because REST is usually used to provide state-less web services for accessing collections of objects. You aren't doing any of that.. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

