Monday, August 31, 2015

Re: Best practice when designing an api (with Django)


Thank you for an informative answer ;-)

 
> To get the author information for the authors of the book with ID=7. In my
> view I have used:
>
>     book = Book.objects.get( pk = 7 )

Where exactly did you use this? Can you post up a copy of the view?

This was currently only a construction in my head; and not literally from an existing view. You have answered the question firmly further down.
 
> [...] ust use the ordinary Model/ORM methods.

^^^ This one. ^^^

Clear answer!


 

You can use repeated calls, but at that point you are trying to eat
your own dog food using a straw. 

Well - that does not sound terribly efficient.
 
Have you gone through the DRF tutorial? 

I'm in the process - very pleasent documentation by the way.


Thank's again - Joakim

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALKD1M9Kjo_fNf9T%2B71_so1Z7QWE%3D7VP-4anEHFN%3DTU1drShxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment