Skip to content

Instantly share code, notes, and snippets.

@piotr-dobrogost
Created October 5, 2015 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotr-dobrogost/9f5020a869daa6aeda18 to your computer and use it in GitHub Desktop.
Save piotr-dobrogost/9f5020a869daa6aeda18 to your computer and use it in GitHub Desktop.
def create_proxy(node, context):
name = title_to_name(node.name, blacklist=context.keys())
if node.id is None:
DBSession.flush(objects=(node,))
proxy = context[name] = ContentProxy(proxied_id=node.id)
return proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment