equal
deleted
inserted
replaced
24 `mycube/hooks/... package` containing hooks in various modules. |
24 `mycube/hooks/... package` containing hooks in various modules. |
25 |
25 |
26 .. sourcecode:: python |
26 .. sourcecode:: python |
27 |
27 |
28 from cubicweb import ValidationError |
28 from cubicweb import ValidationError |
29 from cubicweb.selectors import is_instance |
29 from cubicweb.predicates import is_instance |
30 from cubicweb.server.hook import Hook |
30 from cubicweb.server.hook import Hook |
31 |
31 |
32 class PersonAgeRange(Hook): |
32 class PersonAgeRange(Hook): |
33 __regid__ = 'person_age_range' |
33 __regid__ = 'person_age_range' |
34 __select__ = Hook.__select__ & is_instance('Person') |
34 __select__ = Hook.__select__ & is_instance('Person') |