Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
ba3cf6aaa695
Commit
091fe981
authored
Jan 31, 2020
by
Philippe Pepiot
Browse files
Backed out changeset
b1ef9690f357
This is not compatible with python3.5
parent
dd557dca2e86
Changes
2
Hide whitespace changes
Inline
Side-by-side
cubicweb/appobject.py
View file @
ba3cf6aa
...
...
@@ -29,12 +29,11 @@ common to all the application objects.
"""
from
typing
import
Union
from
logging
import
getLogger
from
logilab.common.logging_ext
import
set_log_methods
from
logilab.common.registry
import
RegistrableObject
,
yes
,
Predicate
from
logilab.common.registry
import
RegistrableObject
,
yes
# the base class for all appobjects ############################################
...
...
@@ -75,7 +74,7 @@ class AppObject(RegistrableObject):
such as `AnyEntity`, `EntityView`, `AnyRsetView`, `Action`...
"""
__select__
:
Union
[
None
,
str
,
Predicate
]
=
yes
()
__select__
=
yes
()
@
classmethod
def
__registered__
(
cls
,
registry
):
...
...
cubicweb/view.py
View file @
ba3cf6aa
...
...
@@ -22,12 +22,11 @@ from cubicweb import _
import
re
from
io
import
BytesIO
from
typing
import
Union
from
warnings
import
warn
from
functools
import
partial
from
inspect
import
getframeinfo
,
stack
from
logilab.common.registry
import
yes
,
Predicate
from
logilab.common.registry
import
yes
from
logilab.mtconverter
import
xml_escape
from
rql
import
nodes
...
...
@@ -359,7 +358,7 @@ class View(AppObject):
class
EntityView
(
View
):
"""base class for views applying on an entity (i.e. uniform result set)"""
__select__
:
Union
[
None
,
str
,
Predicate
]
=
non_final_entity
()
__select__
=
non_final_entity
()
category
=
_
(
'entityview'
)
def
call
(
self
,
**
kwargs
):
...
...
@@ -391,7 +390,7 @@ class StartupView(View):
"""base class for views which doesn't need a particular result set to be
displayed (so they can always be displayed!)
"""
__select__
:
Union
[
None
,
str
,
Predicate
]
=
none_rset
()
__select__
=
none_rset
()
category
=
_
(
'startupview'
)
...
...
@@ -408,7 +407,7 @@ class EntityStartupView(EntityView):
"""base class for entity views which may also be applied to None
result set (usually a default rql is provided by the view class)
"""
__select__
:
Union
[
None
,
str
,
Predicate
]
=
none_rset
()
|
non_final_entity
()
__select__
=
none_rset
()
|
non_final_entity
()
default_rql
=
None
...
...
@@ -442,7 +441,7 @@ class EntityStartupView(EntityView):
class
AnyRsetView
(
View
):
"""base class for views applying on any non empty result sets"""
__select__
:
Union
[
None
,
str
,
Predicate
]
=
nonempty_rset
()
__select__
=
nonempty_rset
()
category
=
_
(
'anyrsetview'
)
...
...
@@ -542,7 +541,7 @@ class ReloadableMixIn(object):
class
Component
(
ReloadableMixIn
,
View
):
"""base class for components"""
__registry__
=
'components'
__select__
:
Union
[
None
,
str
,
Predicate
]
=
yes
()
__select__
=
yes
()
# XXX huummm, much probably useless (should be...)
htmlclass
=
'mainRelated'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment