Django for Designers/Whats next: Difference between revisions

Content added Content deleted
imported>Paulproteus
imported>Paulproteus
(→‎configure our API via api.py and add it to urls.py: Link to SessionAuthentication because it is great)
Line 335: Line 335:
Tastypie is based on "Resources"; you can read more about it in its [http://django-tastypie.readthedocs.org/en/latest/tutorial.html own tutorial]. In this example, we do just a handful of things:
Tastypie is based on "Resources"; you can read more about it in its [http://django-tastypie.readthedocs.org/en/latest/tutorial.html own tutorial]. In this example, we do just a handful of things:


* We limit users of the API to only be able to ''get'' from you, rather than use other HTTP verbs like PUT and DELETE to upload or modify data. (You can enable PUT and similar modification features yourself, but you will likely want to learn about authorization within Tastypie first.)
* We limit users of the API to only be able to ''get'' from you, rather than use other HTTP verbs like PUT and DELETE to upload or modify data. (You can enable PUT and similar modification features yourself, but you will likely want to learn about authorization within Tastypie first. The simplest such mode is to enable [http://django-tastypie.readthedocs.org/en/latest/cookbook.html#using-sessionauthentication SessionAuthentication].)


* It will make available the ''queryset'' provided, which is all the bookmarks.
* It will make available the ''queryset'' provided, which is all the bookmarks.