Show More
@@ -161,11 +161,19 b' def compatlist(context, mapping, name, d' | |||||
161 |
|
161 | |||
162 | def showdict(name, data, mapping, plural=None, key='key', value='value', |
|
162 | def showdict(name, data, mapping, plural=None, key='key', value='value', | |
163 | fmt='%s=%s', separator=' '): |
|
163 | fmt='%s=%s', separator=' '): | |
|
164 | ui = mapping.get('ui') | |||
|
165 | if ui: | |||
|
166 | ui.deprecwarn("templatekw.showdict() is deprecated, use compatdict()", | |||
|
167 | '4.6') | |||
164 | c = [{key: k, value: v} for k, v in data.iteritems()] |
|
168 | c = [{key: k, value: v} for k, v in data.iteritems()] | |
165 | f = _showlist(name, c, mapping['templ'], mapping, plural, separator) |
|
169 | f = _showlist(name, c, mapping['templ'], mapping, plural, separator) | |
166 | return hybriddict(data, key=key, value=value, fmt=fmt, gen=f) |
|
170 | return hybriddict(data, key=key, value=value, fmt=fmt, gen=f) | |
167 |
|
171 | |||
168 | def showlist(name, values, mapping, plural=None, element=None, separator=' '): |
|
172 | def showlist(name, values, mapping, plural=None, element=None, separator=' '): | |
|
173 | ui = mapping.get('ui') | |||
|
174 | if ui: | |||
|
175 | ui.deprecwarn("templatekw.showlist() is deprecated, use compatlist()", | |||
|
176 | '4.6') | |||
169 | if not element: |
|
177 | if not element: | |
170 | element = name |
|
178 | element = name | |
171 | f = _showlist(name, values, mapping['templ'], mapping, plural, separator) |
|
179 | f = _showlist(name, values, mapping['templ'], mapping, plural, separator) |
General Comments 0
You need to be logged in to leave comments.
Login now