{"action":"created","issue":{"url":"https://api.github.com/repos/markfinger/python-react/issues/70","repository_url":"https://api.github.com/repos/markfinger/python-react","labels_url":"https://api.github.com/repos/markfinger/python-react/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/markfinger/python-react/issues/70/comments","events_url":"https://api.github.com/repos/markfinger/python-react/issues/70/events","html_url":"https://github.com/markfinger/python-react/issues/70","id":182979504,"number":70,"title":"Web2Py support: ImportError('No module named react.render',)","user":{"login":"Anima-t3d","id":830386,"avatar_url":"https://avatars.githubusercontent.com/u/830386?v=3","gravatar_id":"","url":"https://api.github.com/users/Anima-t3d","html_url":"https://github.com/Anima-t3d","followers_url":"https://api.github.com/users/Anima-t3d/followers","following_url":"https://api.github.com/users/Anima-t3d/following{/other_user}","gists_url":"https://api.github.com/users/Anima-t3d/gists{/gist_id}","starred_url":"https://api.github.com/users/Anima-t3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anima-t3d/subscriptions","organizations_url":"https://api.github.com/users/Anima-t3d/orgs","repos_url":"https://api.github.com/users/Anima-t3d/repos","events_url":"https://api.github.com/users/Anima-t3d/events{/privacy}","received_events_url":"https://api.github.com/users/Anima-t3d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-14T07:15:21Z","updated_at":"2016-10-16T04:37:34Z","closed_at":null,"body":"Does this work with Web2Py? I am relatively new to python and Web2Py. I want to implement react server side rendering in an existing Web2Py application.\r\n\r\nI tried the following on a local instance:\r\n`pip install react` and created `modules/react_test.py`:\r\n\r\n```python\r\nfrom react.render import render_component\r\n\r\ndef test_render(url):\r\n\treturn render_component('../react/Url.jsx', {'arg': url})\r\n\r\n```\r\nIt will give an error `﻿﻿﻿ImportError('No module named react.render',)`. \r\nDid I do something wrong or is it because I am trying to use `python-react` with Web2Py?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/markfinger/python-react/issues/comments/254027097","html_url":"https://github.com/markfinger/python-react/issues/70#issuecomment-254027097","issue_url":"https://api.github.com/repos/markfinger/python-react/issues/70","id":254027097,"user":{"login":"Anima-t3d","id":830386,"avatar_url":"https://avatars.githubusercontent.com/u/830386?v=3","gravatar_id":"","url":"https://api.github.com/users/Anima-t3d","html_url":"https://github.com/Anima-t3d","followers_url":"https://api.github.com/users/Anima-t3d/followers","following_url":"https://api.github.com/users/Anima-t3d/following{/other_user}","gists_url":"https://api.github.com/users/Anima-t3d/gists{/gist_id}","starred_url":"https://api.github.com/users/Anima-t3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anima-t3d/subscriptions","organizations_url":"https://api.github.com/users/Anima-t3d/orgs","repos_url":"https://api.github.com/users/Anima-t3d/repos","events_url":"https://api.github.com/users/Anima-t3d/events{/privacy}","received_events_url":"https://api.github.com/users/Anima-t3d/received_events","type":"User","site_admin":false},"created_at":"2016-10-16T04:37:34Z","updated_at":"2016-10-16T04:37:34Z","body":"Thanks for the reply, based on your input I found the [Third party modules chapter in the documentation](http://web2py.com/book/default/chapter/04#Third-party-modules):\r\n\r\n> web2py is written in Python, so it can import and use any Python module, including third party modules. It just needs to be able to find them. As with any Python application, modules can be installed in the official Python \"site-packages\" directory, and they can then be imported from anywhere inside your code.\r\n> \r\n> Modules in the \"site-packages\" directory are, as the name suggests, site-level packages. Applications requiring site-packages are not portable unless these modules are installed separately. The advantage of having modules in \"site-packages\" is that multiple applications can share them.\r\n\r\nI will give that a try tomorrow and update here."}}
{"actor":{"display_login":"Anima-t3d"}}