Cosmetic / docstring fixes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 28 Feb 2017 17:02:02 +0100
changeset 186 38a9301ee877
parent 185 2256c2d83372
child 187 480948c69272
Cosmetic / docstring fixes
cubicweb_sherpa/views/__init__.py
cubicweb_sherpa/views/management.py
--- a/cubicweb_sherpa/views/__init__.py	Tue Feb 28 14:41:28 2017 +0100
+++ b/cubicweb_sherpa/views/__init__.py	Tue Feb 28 17:02:02 2017 +0100
@@ -20,6 +20,7 @@
 from cubicweb.view import View
 from cubicweb.web.views import urlrewrite, startup
 
+
 _REWRITE_RULES = []
 _JINJA_ENV = Environment(loader=PackageLoader('cubicweb_sherpa.views'),
                          autoescape=select_autoescape(enabled_extensions=('html',)))
@@ -46,9 +47,10 @@
 
 
 def jinja_static_view(template_name, title=None, regid=None, path=None):
-    """Generate a sub-class of JinjaStaticView parametrized with its `template_name` and `title`.
+    """Generate a sub-class of :class:`JinjaStaticView` parametrized with its `template_name` and
+    `title`.
 
-    `__regid__` is built by prepending 'sherpa.' to template_name or may be explicitly specified
+    `__regid__` is built by prepending 'sherpa.' to `template_name` or may be explicitly specified
     using `regid`.
 
     A path to access to view is automatically generated and will match `template_name` unless
@@ -67,10 +69,10 @@
                                                  'title': title})
 
 
+IndexView = jinja_static_view('index', 'view_index', regid='index', path='/')
 ProjectView = jinja_static_view('project', u'Sherpa un générateur de profils')
 UtilisationView = jinja_static_view('utilisation', u'Pour commencer')
 SedaView = jinja_static_view('seda', u'Le SEDA')
-IndexView = jinja_static_view('index', regid='index', path='/')
 AProposView = jinja_static_view('apropos', u'À propos')
 ContactView = jinja_static_view('contact', 'Contact')
 
--- a/cubicweb_sherpa/views/management.py	Tue Feb 28 14:41:28 2017 +0100
+++ b/cubicweb_sherpa/views/management.py	Tue Feb 28 17:02:02 2017 +0100
@@ -13,6 +13,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""Views related to edition management (dashboard, custom edition forms / display, etc).
+"""
 
 from logilab.mtconverter import xml_escape
 
@@ -26,7 +28,8 @@
 
 class SherpaSecurityManagementView(management.SecurityManagementView):
     """Security view overriden to hide permissions definitions and using a
-    RelationFacetWidget to edit owner"""
+    RelationFacetWidget to edit owner.
+    """
     __select__ = (management.SecurityManagementView.__select__ &
                   relation_possible('owned_by', action='add', strict=True))