{"action":"opened","issue":{"url":"https://api.github.com/repos/Capitains/flask-capitains-nemo/issues/114","repository_url":"https://api.github.com/repos/Capitains/flask-capitains-nemo","labels_url":"https://api.github.com/repos/Capitains/flask-capitains-nemo/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/Capitains/flask-capitains-nemo/issues/114/comments","events_url":"https://api.github.com/repos/Capitains/flask-capitains-nemo/issues/114/events","html_url":"https://github.com/Capitains/flask-capitains-nemo/issues/114","id":299016274,"number":114,"title":"Allow data sourcing from an external provider in a template","user":{"login":"MrGecko","id":65418,"avatar_url":"https://avatars3.githubusercontent.com/u/65418?v=4","gravatar_id":"","url":"https://api.github.com/users/MrGecko","html_url":"https://github.com/MrGecko","followers_url":"https://api.github.com/users/MrGecko/followers","following_url":"https://api.github.com/users/MrGecko/following{/other_user}","gists_url":"https://api.github.com/users/MrGecko/gists{/gist_id}","starred_url":"https://api.github.com/users/MrGecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrGecko/subscriptions","organizations_url":"https://api.github.com/users/MrGecko/orgs","repos_url":"https://api.github.com/users/MrGecko/repos","events_url":"https://api.github.com/users/MrGecko/events{/privacy}","received_events_url":"https://api.github.com/users/MrGecko/received_events","type":"User","site_admin":false},"labels":[{"id":250467045,"url":"https://api.github.com/repos/Capitains/flask-capitains-nemo/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-21T15:33:56Z","updated_at":"2018-02-21T15:33:56Z","closed_at":null,"author_association":"NONE","body":"Related to: https://github.com/Capitains/MyCapytain/issues/159\r\n\r\nIn order to be able to enrich some data on the rendered page (like adding some typographical info to a title), it would be nice to be able to load some versions of it from an external data provider (database, service, flat file...).\r\n\r\nIt may be achieved by using a new jinja filter like :\r\n`{{collection.title|enrich(\"title\", collection.id, collection.lang)}}` \r\n\r\nWhich is then linked to a new enhanced resolver :\r\n```python\r\nclass MetadataEditorialResolver()\r\n    def find(data_name, coll_id, coll_lang):\r\n        if data_name == \"title\":\r\n            get_data_from_sqlite(data_name, coll_id, coll_lang)\r\n```\r\n"}}
{"actor":{"display_login":"MrGecko"}}