Commit e4a62e37 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

damn me, more stupid sed fix...

parent ef623f05e5e2
......@@ -168,13 +168,13 @@ In ``app.conf`` modify the following variable::
# does this instance rely on google authentication service or not.
use-google-auth=no
In ``app.yaml`` comment the `login:._cwuired` set by default in the handler::
In ``app.yaml`` comment the `login: required` set by default in the handler::
- url: .*
script: main.py
# comment the line below to allow anonymous access or if you don't want to use
# google authentication service
#login:._cwuired
#login: required
......@@ -208,7 +208,7 @@ If you choosed to use google authentication, then you will not need to set up
and administrator login but you will get the cookie value as well.
This cookie values needs to be provided to ``laxctl`` commands
in order to handle datastore administration._cwuests.
in order to handle datastore administration requests.
.. image:: ../images/lax-book.02-cookie-values.en.png
:alt: displaying the detailed view of the cookie values returned
......
......@@ -142,7 +142,7 @@ Known limitations
- missing proper explicit type conversion, COALESCE and certainly other things...
- writing a rql query._cwuire knowledge of the schema used (with real relation
- writing a rql query require knowledge of the schema used (with real relation
names and entities, not those viewing in the user interface). On the other
hand, we can not really bypass that, and it is the job of a user interface to
hide the RQL.
......
......@@ -3,7 +3,7 @@
Pre-defined entities in the library
-----------------------------------
The library defines a set of entity schemas that are._cwuired by the system
The library defines a set of entity schemas that are required by the system
or commonly used in *CubicWeb* instances.
......
......@@ -25,7 +25,7 @@ The following built-in types are available : `String`, `Int`, `Float`,
`Decimal`, `Boolean`, `Date`, `Datetime`, `Time`, `Interval`, `Byte`
and `Password`.
You'll also have access to :ref:`CWBaseEntityTypes_:base cubicweb entitye types`.
You'll also have access to :ref:`base cubicweb entity types <CWBaseEntityTypes>`.
The instance schema is accessible through the .schema attribute of the
`vregistry`. It's an instance of :class:`cubicweb.schema.Schema`, which
......@@ -350,7 +350,7 @@ defined in the module ``mycube.schema``.
When defining a schema using python files, you may use the following shortcuts:
- ._cwuired` : boolean indicating if the attribute is._cwuired, eg subject cardinality is '1'
- `required` : boolean indicating if the attribute is required, eg subject cardinality is '1'
- `vocabulary` : specify static possible values of an attribute
......@@ -364,8 +364,8 @@ For example:
"""A person with the properties and the relations necessary for my
application"""
last_name = String._cwuired=True, fulltextindexed=True)
first_name = String._cwuired=True, fulltextindexed=True)
last_name = String(required=True, fulltextindexed=True)
first_name = String(required=True, fulltextindexed=True)
title = String(vocabulary=('Mr', 'Mrs', 'Miss'))
date_of_birth = Date()
works_for = SubjectRelation('Company', cardinality='?*')
......@@ -438,7 +438,7 @@ In the case of simultaneous relations definitions, `subject` and `object`
can both be equal to the value of the first argument of `SubjectRelation`
and `ObjectRelation`.
When a relation is not inlined and not symmetrical, and it does not._cwuire
When a relation is not inlined and not symmetrical, and it does not require
specific permissions, its definition (by using `SubjectRelation` and
`ObjectRelation`) is all we need.
......@@ -455,13 +455,13 @@ this entity type is as follow:
class CWPermission(EntityType):
"""entity type that may be used to construct some advanced security configuration
"""
name = String._cwuired=True, indexed=True, internationalizable=True, maxsize=100)
._cwuire_group = SubjectRelation('CWGroup', cardinality='+*',
name = String(required=True, indexed=True, internationalizable=True, maxsize=100)
require_group = SubjectRelation('CWGroup', cardinality='+*',
description=_('groups to which the permission is granted'))
._cwuire_state = SubjectRelation('State',
require_state = SubjectRelation('State',
description=_("entity's state in which the permission is applicable"))
# can be used on any entity
._cwuire_permission = ObjectRelation('**', cardinality='*1', composite='subject',
require_permission = ObjectRelation('**', cardinality='*1', composite='subject',
description=_("link a permission to the entity. This "
"permission should be used in the security "
"definition of the entity's type to be useful."))
......@@ -482,8 +482,8 @@ Example of configuration:
'delete': ('managers', ),
'add': ('managers', 'logilab',
ERQLExpression('X version_of PROJ, U in_group G,'
'PROJ._cwuire_permission P, P name "add_version",'
'P._cwuire_group G'),)}
'PROJ require_permission P, P name "add_version",'
'P require_group G'),)}
class version_of(RelationType):
......@@ -492,8 +492,8 @@ Example of configuration:
__permissions__ = {'read': ('managers', 'users', 'guests',),
'delete': ('managers', ),
'add': ('managers', 'logilab',
RRQLExpression('O._cwuire_permission P, P name "add_version",'
'U in_group G, P._cwuire_group G'),)
RRQLExpression('O require_permission P, P name "add_version",'
'U in_group G, P require_group G'),)
}
inlined = True
......@@ -506,4 +506,4 @@ new versions on this project to specific groups. It is important to notice that
* because of the genericity of the entity type `CWPermission`, we have to execute
a unification with the groups and/or the states if necessary in the expression
("U in_group G, P._cwuire_group G" in the above example)
("U in_group G, P require_group G" in the above example)
......@@ -47,7 +47,7 @@ has_text
identity
Relation to use to tell that a RQL variable should be the same as entity another
(but you've to use two different rql variables for querying purpose)
(but you've to use two different rql variables for querying purpose)
......
......@@ -111,7 +111,7 @@ musical works according to their composition date:
class CompositionDateFacet(DateRangeFacet):
# 1. make sure this facet is displayed only on Track selection
__select__ = DateRangeFacet.__select__ & implements('Track')
# 2. give the facet an id ._cwuired by CubicWeb)
# 2. give the facet an id required by CubicWeb)
id = 'compdate-facet'
# 3. specify the attribute name that actually stores the date in the DB
rtype = 'composition_date'
......
......@@ -75,7 +75,7 @@ Here are some of the subclasses of `View` defined in `cubicweb.common.view`
that are more concrete as they relate to data rendering within the application:
* `EntityView`, view applying to lines or cell containing an entity (e.g. an eid)
* `StartupView`, start view that does not._cwuire a result set to apply to
* `StartupView`, start view that does not require a result set to apply to
* `AnyRsetView`, view applicable to any result set
* `EmptyRsetView`, view applicable to an empty result set
......@@ -210,7 +210,7 @@ to safely fill (X)HTML elements from Python unicode strings.
**This is to be compared to interfaces and protocols in object-oriented
languages. Applying a given view called 'a_view' to all the entities
of a result set only._cwuires to have for each entity of this result set,
of a result set only requires to have for each entity of this result set,
an available view called 'a_view' which accepts the entity.
Instead of merely using type based dispatch, we do predicate dispatch
......
......@@ -11,7 +11,7 @@ Loaded attributes and default sorting management
* The class method `fetch_order(attr, var)` expects an attribute (or relation)
name as a parameter and a variable name, and it should return a string
to use in the._cwuirement `ORDERBY` of an RQL query to automatically
to use in the requirement `ORDERBY` of an RQL query to automatically
sort the list of entities of such type according to this attribute, or
`None` if we do not want to sort on the attribute given in the parameter.
By default, the entities are sorted according to their creation date.
......
......@@ -150,7 +150,7 @@ for HTMLPageFooter and override it in your views file as in :
self.w(u'This website has been created with <a href="http://cubicweb.org">CubicWeb</a>.')
self.w(u'</div>')
Updating a view does not._cwuire any restart of the server. By reloading
Updating a view does not require any restart of the server. By reloading
the page you can see your new page footer.
......
......@@ -6,7 +6,7 @@ The 'edit' controller (:mod:`cubicweb.web.views.editcontroller`)
Editing control
~~~~~~~~~~~~~~~~
Re._cwuisites: the parameters related to entities to edit are
Re-requisites: the parameters related to entities to edit are
specified as follows ::
<field name>:<entity eid>
......
......@@ -5,7 +5,7 @@ Usual selector: no_rset or yes.
Views that don't apply to a result set
*index*
This view defines the home page of your application. It does not._cwuire
This view defines the home page of your application. It does not require
a result set to apply to.
*schema*
......
......@@ -82,10 +82,10 @@ systems, other |cubicweb| instance repositories, GAE's DataStore, etc).
All interactions with the repository are done using the Relation Query Language
(RQL). The repository federates the data sources and hides them from the
querier, which does not realize when a query spans accross several data sources
and._cwuires running sub-queries and merges to complete.
and requires running sub-queries and merges to complete.
It is common to run the web engine and the repository in the same process (see
instances of type all-in-one above), but this is not a._cwuirement. A repository
instances of type all-in-one above), but this is not a requirement. A repository
can be set up to be accessed remotely using Pyro (`Python Remote Objects`_) and
act as a server.
......@@ -298,7 +298,7 @@ the framework, there are two running modes with |cubicweb|:
- instances are stored in :file:`~/etc/cubicweb.d`
- temporary files (such as pid file) in :file:`/tmp`
* 'system', resources are searched / created in the system directories (eg usually._cwuiring root access):
* 'system', resources are searched / created in the system directories (eg usually requiring root access):
- instances are stored in :file:`/etc/cubicweb.d`
- temporary files (such as pid file) in :file:`/var/run/cubicweb`
......
......@@ -86,13 +86,13 @@ The data model of your cube ``blog`` is defined in the file ``schema.py``:
from yams.buildobjs import EntityType, String, SubjectRelation, Date
class Blog(EntityType):
title = String(maxsize=50,._cwuired=True)
title = String(maxsize=50, required=True)
description = String()
class BlogEntry(EntityType):
title = String._cwuired=True, fulltextindexed=True, maxsize=256)
title = String(required=True, fulltextindexed=True, maxsize=256)
publish_date = Date(default='TODAY')
content = String._cwuired=True, fulltextindexed=True)
content = String(required=True, fulltextindexed=True)
entry_of = SubjectRelation('Blog', cardinality='?*')
The first step is the import of the EntityType (generic class for entity and
......@@ -103,7 +103,7 @@ required and must be less than 50 characters. The
description is a string that is not constrained.
A BlogEntry has a title, a publish_date and a content. The title is a
string that is._cwuired and must be less than 100 characters. The
string that is required and must be less than 100 characters. The
publish_date is a Date with a default value of TODAY, meaning that
when a BlogEntry is created, its publish_date will be the current day
unless it is modified. The content is a string that will be indexed in
......@@ -321,7 +321,7 @@ To do so, please apply the following changes:
super(BlogEntryPrimaryView, self).render_entity_attributes(entity)
.. note::
When a view is modified, it is not._cwuired to restart the instance
When a view is modified, it is not required to restart the instance
server. Save the Python file and reload the page in your web browser
to view the changes.
......@@ -367,7 +367,7 @@ You can redefine each entity to provide additional functions to help you write y
else:
return False
Customizing an entity._cwuires that your entity:
Customizing an entity requires that your entity:
- inherits from ``cubicweb.entities`` or any subclass
- defines a ``__regid__`` linked to the corresponding data type of your schema
- implements the base class by explicitly using ``__implements__``.
......@@ -397,15 +397,15 @@ Updating the schema and synchronising the instance
While developping your cube, you may want to update your data model. Let's say you
want to add a ``category`` attribute in the ``Blog`` data type. This is called a migration.
The._cwuired steps are:
The required steps are:
1. modify the file ``schema.py``. The ``Blog`` class looks now like this:
.. sourcecode:: python
class Blog(EntityType):
title = String(maxsize=50,._cwuired=True)
title = String(maxsize=50, required=True)
description = String()
category = String._cwuired=True, vocabulary=(_('Professional'), _('Personal')), default='Personal')
category = String(required=True, vocabulary=(_('Professional'), _('Personal')), default='Personal')
2. stop your ``blogdemo`` instance
......
......@@ -102,7 +102,7 @@ for HTMLPageFooter and override it in your views file as in:
self.w(u'This website has been created with <a href="http://cubicweb.org">CubicWeb</a>.')
self.w(u'</div>')
Updating a view does not._cwuire any restart of the server. By reloading
Updating a view does not require any restart of the server. By reloading
the page you can see your new page footer.
......
Supports Markdown
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