Django for Designers/Whats next: Difference between revisions

imported>Paulproteus
imported>Paulproteus
Line 375:
</source>
 
==== FilterFiltering, byand userfurther directions ====
 
Our API lets us filter by any of the fields it returns. So, for example, you can filter the results by user by visiting:
 
http://localhost:8000/api/bookmark/?user__username=yourself&format=json
 
Doing this requires no changes to your code. Cool, huh?
 
One further direction would be to summarize the tags as a list of strings, rather than as a list of tag URIs. You could look into the [http://django-tastypie.readthedocs.org/en/latest/cookbook.html#adding-custom-values dehydrate] method that Tastypie lets you override.
 
==== Further directions ====
Anonymous user