On 24 Apr 2009, at 16:24 , Carmine wrote: > On Fri, Apr 24, 2009 at 2:41 PM, Masklinn <[email protected]> > wrote: >> >> On 24 Apr 2009, at 10:55 , earcar wrote: >>> 1. does Django support REST queries? >> I fear that question doesn't make any sense, REST is an architectural >> style, not a language or anything, there are no "REST queries". >> >> Other than that, yes you can make django understand remote procedure >> calls via URLs, there might even be third-party apps for that. I >> don't >> think Django has any "native" support for that though. > Yeah, your're right, I meant "does Django provide a way to do RESTful > applications easily (so: xml serialization and response validation and > deserialization)?" > Django doesn't ship anything for XML serialization or deserialization, but Python does. On the other hand Django provides facilities for request validation (forms), and the request/response flow is flexible (e.g. you could hook a validation middleware to ensure all your response validate, or you could just have your views return XML data and wrap them in a decorator validating the response and making it into a django response... although I fail to see why you'd return invalid XML in the first place)
>>> 4. is possible to render views using xslt? >> I think you mean templates here, in Django's lingo. Yes you can >> although it might not be the smartest idea ever, and you won't be >> able >> to use Django's template system > > Why is it not a good idea? Because, to speak crudely and give my opinion, XSLT sucks. >>> or better render in xml, >> Use Genshi as a template engine instead of django's template system. >> >>> leaving the xslt work to the browser? >> That's a bad idea. If only because not all browsers can do that. > > Are there other reasons why it's a bad idea? See above, as far as I'm concerned the concept that underlies XSLT is interesting, but the execution is an abortion, if you want to generate XML you're better off using an XML template language (Genshi, TAL, whatever...) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

