Re: Django Rest Framework inside of a Django Project
You might get more responses on the django users mailing list. This one is for discussing new feature of the framework, not its usage. 2016-08-26 17:30 GMT+02:00 Sylvain Dégué: > Hi, > > I am building a mobile application and I need a Rest API and a web version > of my app. So I was wondering if I could make a website with Django Rest > Framework or if I have create a Django project for my website and a Django > Rest Framwork for my API > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/a99e46c7-7def-4fab-9427-e4203fbb091b%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Cordialement, Coues Ludovic +336 148 743 42 -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAEuG%2BTZztRT960S%3DYDwNQ5H1-GmE8XtGZBpvfxL4KcfjMnA_wg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: django + rest
Ed Summers wrote: > In my > case I'm implementing an AtomPub interface for a data repository at > the Library of Congress instead of wanting to stream XML, but the > mechanics are the same. Yes. It's expected to look something like this: if request.META['Content-type'] == 'application/atom+xml': xml = ET.parse(request) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: django + rest
On Dec 30, 8:15 am, Ivan Sagalaevwrote: > BTW, Malcolm's series have inspired me to implement (along with some > refactoring) a file-like interface for HttpRequest[1]. With this you can > actually pass request as a source to, say, a SAX parser and not have to > load it entirely in memory. Nice! This is exactly the sort of functionality I'm looking for. In my case I'm implementing an AtomPub interface for a data repository at the Library of Congress instead of wanting to stream XML, but the mechanics are the same. I'll check it out. //Ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: django + rest
Thanks Waylan. I posted to django-users as well (still waiting, but it is the holidays). Those blog posts of Malcolm's were very useful-- although covered ground I was already familiar with. I actually did consider posting on django-users instead of on here, but in the end posted here because I think the heart of my question concerns django's internals (not its API), namely: - whether or not it's a good idea to read directly from wsgi.input - if anyone has patched django to handle (or slotted in 3rd party software) for streaming access to HTTP payloads (other than multipart/ form-data) My apologies if I'm adding insult to injury :-) //Ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: django + rest
Waylan Limberg wrote: > For a start, you may want to take a look as Malcolm's recent > multi-part series on the subject. Note the third one with regard to > content-types. > > http://www.pointy-stick.com/blog/2008/12/09/implementing-http-services-django/ > http://www.pointy-stick.com/blog/2008/12/13/etags-and-modification-times-django/ > http://www.pointy-stick.com/blog/2008/12/15/content-types-http-and-you/ BTW, Malcolm's series have inspired me to implement (along with some refactoring) a file-like interface for HttpRequest[1]. With this you can actually pass request as a source to, say, a SAX parser and not have to load it entirely in memory. Feedback is welcome! [1]: http://code.djangoproject.com/ticket/9886 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: django + rest
Hi Ed. This seems more like a question for the django-users list. django-dev is for the development *of* Django, not development *with* Django. Ask there, and I'm sure you'll get pointers to a lot of helpful resources. For a start, you may want to take a look as Malcolm's recent multi-part series on the subject. Note the third one with regard to content-types. http://www.pointy-stick.com/blog/2008/12/09/implementing-http-services-django/ http://www.pointy-stick.com/blog/2008/12/13/etags-and-modification-times-django/ http://www.pointy-stick.com/blog/2008/12/15/content-types-http-and-you/ On Mon, Dec 29, 2008 at 8:28 PM, Ed Summerswrote: > > I was wondering if anyone else on the list has layered a RESTful > service into their django applications. I'm adding an atompub > interface to an existing django project, and I'd like to offer the > ability to POST and PUT to URIs. Part of my problem is that this > service needs to handle large (many megabyte) file uploads, so the > POST and PUT message body needs to be streamed to disk, rather than > held in memory. > > I took a look at the FileUpload functionality in > django.http.HttpRequest and > django.http.multipartparser.MultiPartParser, and it looked like I > could slot in custom handlers as long as the content was POSTed with a > mimetype of "multipart/form-data". Unfortunately I am wanting to allow > clients to POST and PUT arbitrary content (application/zip, > application/atom+xml, etc). > > At the moment I'm rolling my own code to read from request.environ > ['wsgi.input'] but I'm worried that I'm not handling everything > correctly, and am wondering if there exists middleware for handling > this sort of scenario in a cleaner way. Or perhaps there's a more > django-y way of doing it? > > Any info/pointers/tips would be appreciated. > > //Ed > > > > -- Waylan Limberg way...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: django-rest-api use [was Re: Changes to request_response have broken django-rest-interface]
2007/10/7, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > The Resource class is quite as independent from everything as we would > have liked. I say "we" here because towards the end of the SoC period, > Andreas and I spent quite a long time trying to loosen a few of the > couplings between output classes and the representation classes -- > Collection and Responder, in particular -- and we both felt it wasn't as > neat as it could be, but we couldn't see how to improve it. That's > probably still work in progress. Yes, I have two issues here: * The first one is about having an optional generic form because it's a common use (at least for me) to have the create/update form in the same page of the resource. I had to create my own BaseCollection and BaseTemplateResponder to handle that case. * The second is for adding a new function to the responder, I need to curry this function in the __init__ of the Collection. Not really elegant. Unfortunately, I haven't a neat solution here... > > My own mental measuring stick during the whole project was to imagine a > case where I was implementing Atom Publishing and using many models to > represent what became a single article resource in the public interface > (I have images, text, metadata, possibly a model with links in it for > validation in the future, etc). You can fit this into Resource > subclasses, but the amount of work you end up doing never really > convinced me that the framework was helping me here. It felt like the > same amount of work as if I did it from scratch, so where was the clear > win in using the framework for this case and did it even feel wrong not > to use it? Again, this isn't a mark against Andreas work, but was more a > case of me trying to test the boundaries. > I agree, the other major headache is for resources which don't fit a model. Maybe we can think about some basic examples for this part because it's hard to speak about that without some concrete things. > I should talk to Andreas about posting some of the discussions we had > and where we left of on the wiki and creating a project mailing list so > that other people can get in on the fun here. Great idea, I'll be glad to help you (if I can). Regards, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---