Closed j4mie closed 3 years ago
This introduces a new bit of syntax into a spec, providing a shortcut to alias the output of a projector. This brings things a little closer to the syntax used by SSM plugins, where the output key name is clearly visible in the spec.
This allows you to do things like this:
def project_full_name(instance): return {"full_name": f"{instance.first_name} {instance.last_name}"} full_name = (qs.include_fields("first_name", "last_name"), project_full_name) spec = [ "name", {"whole_entire_name": full_name}, {"age_in_years": "years_since_birth"}, ]
Superseded by #43
This introduces a new bit of syntax into a spec, providing a shortcut to alias the output of a projector. This brings things a little closer to the syntax used by SSM plugins, where the output key name is clearly visible in the spec.
This allows you to do things like this: