doc/book/en/tutorials/advanced/part04_ui-base.rst
changeset 8190 2a3c1b787688
parent 7827 9bbf83f68bcc
child 8496 e4d71fc0b701
equal deleted inserted replaced
8189:2ee0ef069fa7 8190:2a3c1b787688
    21 
    21 
    22 Here is the code, samples from my cube's `views.py` file:
    22 Here is the code, samples from my cube's `views.py` file:
    23 
    23 
    24 .. sourcecode:: python
    24 .. sourcecode:: python
    25 
    25 
    26     from cubicweb.selectors import is_instance
    26     from cubicweb.predicates import is_instance
    27     from cubicweb.web import component
    27     from cubicweb.web import component
    28     from cubicweb.web.views import error
    28     from cubicweb.web.views import error
    29 
    29 
    30     class FourOhFour(error.FourOhFour):
    30     class FourOhFour(error.FourOhFour):
    31 	__select__ = error.FourOhFour.__select__ & anonymous_user()
    31 	__select__ = error.FourOhFour.__select__ & anonymous_user()
   208 the `IPrevNext` interface. Here is the related code sample, extracted from our
   208 the `IPrevNext` interface. Here is the related code sample, extracted from our
   209 cube's `views.py` file:
   209 cube's `views.py` file:
   210 
   210 
   211 .. sourcecode:: python
   211 .. sourcecode:: python
   212 
   212 
   213     from cubicweb.selectors import is_instance
   213     from cubicweb.predicates import is_instance
   214     from cubicweb.web.views import navigation
   214     from cubicweb.web.views import navigation
   215 
   215 
   216 
   216 
   217     class FileIPrevNextAdapter(navigation.IPrevNextAdapter):
   217     class FileIPrevNextAdapter(navigation.IPrevNextAdapter):
   218 	__select__ = is_instance('File')
   218 	__select__ = is_instance('File')