equal
deleted
inserted
replaced
425 return templatefilters.indent(firstline + text, indent) |
425 return templatefilters.indent(firstline + text, indent) |
426 |
426 |
427 def get(context, mapping, args): |
427 def get(context, mapping, args): |
428 """:get(dict, key): Get an attribute/key from an object. Some keywords |
428 """:get(dict, key): Get an attribute/key from an object. Some keywords |
429 are complex types. This function allows you to obtain the value of an |
429 are complex types. This function allows you to obtain the value of an |
430 attribute on these type.""" |
430 attribute on these types.""" |
431 if len(args) != 2: |
431 if len(args) != 2: |
432 # i18n: "get" is a keyword |
432 # i18n: "get" is a keyword |
433 raise error.ParseError(_("get() expects two arguments")) |
433 raise error.ParseError(_("get() expects two arguments")) |
434 |
434 |
435 dictarg = args[0][0](context, mapping, args[0][1]) |
435 dictarg = args[0][0](context, mapping, args[0][1]) |