Browse files

Improve documentation with a real example

  • Loading branch information...
1 parent fa49e06 commit 10716eec3365492fea363a9882ab9e7e6eba1265 @amol- amol- committed Feb 1, 2016
Showing with 5 additions and 0 deletions.
  1. +5 −0 tgext/crud/
@@ -78,6 +78,11 @@ class CrudRestController(RestController):
default have the value specified by the filter. If filter is callable it will
be called to retrieve the filter value.
+ For example to display a crud that only shows, creates and edits entities
+ owned by logged user through a user_id ForeignKey you can use a filter like::
+ {'user_id': lambda: request.identity['user'].user_id}
Enables searching on some fields, can be ``True``, ``False`` or a list
of fields for which searching should be enabled.

0 comments on commit 10716ee

Please sign in to comment.