Bases: SingletonPlugin
Provides status bar banner at the top of pages.
Source code in ckanext/status/plugin.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 | class StatusPlugin(SingletonPlugin):
"""
Provides status bar banner at the top of pages.
"""
implements(interfaces.IActions, inherit=True)
implements(interfaces.IAuthFunctions, inherit=True)
implements(interfaces.IBlueprint)
implements(interfaces.IConfigurer, inherit=True)
implements(interfaces.ITemplateHelpers)
# IActions
def get_actions(self):
from ckanext.status.logic import actions
return create_actions(actions)
# IAuthFunctions
def get_auth_functions(self):
from ckanext.status.logic import auth
return create_auth(auth)
# IBlueprint
def get_blueprint(self):
"""
IBlueprint hook.
"""
return routes.blueprints
# IConfigurer
def update_config(self, config):
toolkit.add_template_directory(config, 'theme/templates')
toolkit.add_resource('theme/assets', 'ckanext-status')
# IConfigurer
def update_config_schema(self, schema):
ignore_missing = toolkit.get_validator('ignore_missing')
schema.update(
{
'ckanext.status.message': [ignore_missing, str],
}
)
return schema
# ITemplateHelpers
def get_helpers(self):
return {
'status_get_message': status_get_message,
'status_enable_html': status_enable_html,
}
|
get_blueprint()
IBlueprint hook.
Source code in ckanext/status/plugin.py
| def get_blueprint(self):
"""
IBlueprint hook.
"""
return routes.blueprints
|