Remove filter for license
We have the context function which can be used with: {{ license('Apache-2.0') }} and this function is already used in all templates. So remove the "old-style" license handling. Change-Id: Ia7f1cc0ec004696949f36b86f982f76ad358871e
This commit is contained in:
parent
b560536a81
commit
5fb4825268
@ -148,12 +148,12 @@ With an existing yaml (and `oslo.config` epoch set to 2), this would be rendered
|
||||
Epoch: 2
|
||||
|
||||
|
||||
context filter `license`
|
||||
context function `license`
|
||||
************************
|
||||
The templates use `SPDX`_ license names and theses names are translated for different distros.
|
||||
For example, a project uses the `Apache-2.0` license::
|
||||
|
||||
License: {{ 'Apache-2.0' | license }}
|
||||
License: {{ license('Apache-2.0') }}
|
||||
|
||||
With the `fedora` spec-style, this would be rendered to::
|
||||
|
||||
|
@ -102,11 +102,6 @@ def _context_license_spdx(context, value):
|
||||
###############
|
||||
# jinja2 filter
|
||||
###############
|
||||
@contextfilter
|
||||
def _filter_license_spdx(context, value):
|
||||
return _context_license_spdx(context, value)
|
||||
|
||||
|
||||
@contextfilter
|
||||
def _filter_epoch(context, value):
|
||||
return _context_epoch(context, value)
|
||||
@ -137,7 +132,6 @@ def _globals_py2name(context, value):
|
||||
|
||||
def _env_register_filters_and_globals(env):
|
||||
"""register all the jinja2 filters we want in the environment"""
|
||||
env.filters['license'] = _filter_license_spdx
|
||||
env.filters['epoch'] = _filter_epoch
|
||||
env.globals['py2pkg'] = _globals_py2pkg
|
||||
env.globals['py2name'] = _globals_py2name
|
||||
|
Loading…
x
Reference in New Issue
Block a user