可以重写以下代码:
def function(obj):
obj.attrib = 8
return obj
那么属性和返回行的集合仅出现在一行中?像这样:
def function(obj):
return obj.attrib = 8 # of course, this does not work
答案 0 :(得分:1)
答案 1 :(得分:1)
您不需要返回该对象,您在参数中传递给该对象的对象将设置# Was already present before the issue resolved but is also needed
USE_X_FORWARDED_HOST = True
# The actual solution
if eval(os.environ.get('DEPLOY', default=False)):
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
,您可以直接从调用者代码中引用它。
url: "{{ cora_response.json['@odata.mediaReadLink'].stdout | from_json }}"
或者更好的方法可能是:
attrib