Commit c5819b8f authored by Élodie Thiéblin's avatar Élodie Thiéblin
Browse files

[doc] Fix example about Community view customization

parent 7a76f1fcc4a3
......@@ -391,7 +391,7 @@ method, etc... To do so, write this code in :file:`myblog/entities.py`:
return self.name
def display_cw_logo(self):
return 'CubicWeb' in self.description
return 'CubicWeb' in self.name
In this example:
......@@ -403,10 +403,10 @@ In this example:
to display the entity (though in this case the default implementation would
have had the same result)
* we implemented here a method :meth:`display_cw_logo` which tests if the blog
entry title contains 'CubicWeb'. It can then be used when you're writing code
involving 'Community' entities in your views, hooks, etc. For instance, you can
modify your previous views as follows:
* we implemented here a method :meth:`display_cw_logo` which tests if the
community title contains 'CubicWeb'. It can then be used when you're writing
code involving 'Community' entities in your views, hooks, etc. For instance,
you can modify your previous views as follows:
.. sourcecode:: python
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment