Serializers
Serializers for the Proxy app.
- class smarter.apps.proxy.serializers.ProxySerializer(*args, **kwargs)[source]
Bases:
MetaDataWithOwnershipModelSerializerSerializer for the smarter.apps.proxy.models.Proxy model.
Used by the web console’s list view and the
smarter get proxiesCLI command. The API key is rendered as its Secret’s name, never its value.- get_api_key_secret_name(obj)[source]
The name of the Secret whose API key is added to requests: the Proxy’s, else the Provider’s.
- get_fields()[source]
Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.
- get_manifest_url(obj)[source]
The URL of the Proxy’s detail view, which renders its manifest.
- Return type:
- get_provider_name(obj)[source]
The name of the Provider whose API the Proxy forwards to.
- Return type: