{ "info": { "author": "Zagaran, Inc.", "author_email": "info@zagaran.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development", "Topic :: Software Development :: User Interfaces" ], "description": "# Django React Components\n\nDjango React Components is a collection of tools that automate the loading and rendering of React components when used in\nconjunction with `django-react-loader`. This tool is currently in beta. \n\n## Installation\n\nInstall Django React Components using pip:\n```bash\n$ pip install django-react-components\n```\nAdd `django_react_components` to your `INSTALLED_APPS` in `settings.py`:\n```python\nINSTALLED_APPS = (\n ...,\n 'django_react_components',\n)\n```\n\nYou will also need to install three other dependencies:\n- [`django-react-loader`](https://github.com/zagaran/django-react-loader): the JS counterpart to this\npackage, used to serve the React components for `django-react-components` to load into Django templates.\n- [`django-webpack-loader`](https://github.com/owais/django-webpack-loader/): the Django dependency used to render the\nruntime bundles required for React to run.\n- [`webpack-bundle-tracker`](https://github.com/owais/webpack-bundle-tracker): the dependency used by Webpack to\ngenerate stats to be consumed by `django-webpack-loader`.\n\n## Usage\n\n#### Rendering React Components\n\nIn your templates, you can render React components by using the `{% react_component %}` template tag. To do so:\n\n1. Load the template tag and the `render_bundle` tag from `django_webpack_loader`:\n```python\n{% load react_component from django_react_components %}\n{% load render_bundle from webpack_loader %}\n\n```\n\n2. Use `render_bundle` to pull in the appropriate javascript\n```\n
\n {% render_bundle 'runtime' %}\n {% render_bundle 'App' %} \n\n```\n\n3a. Use the `react_component` tag to render the component with keyword arguments as props\n```\n\n {% react_component 'App' id='app' prop1=prop1 prop2=prop2 %}\n\n```\n\n3a. Use the `react`/`endreact` tags to render the component with rendered content inside. This will be passed as raw HTML to the component as the `children` prop.\n```\n\n {% react 'App' id='app' %}\n{{ content }}
\n Link\n {% endreact 'App' id='app' %}\n\n```\n\n## Requirements\n\nPython 3.4-3.7, Django 1.11-2.2", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zagaran/django-react-components", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-react-components", "package_url": "https://pypi.org/project/django-react-components/", "platform": "", "project_url": "https://pypi.org/project/django-react-components/", "project_urls": { "Homepage": "https://github.com/zagaran/django-react-components" }, "release_url": "https://pypi.org/project/django-react-components/0.1.3a0/", "requires_dist": null, "requires_python": "", "summary": "A collection of tools that assist with loading and rendering React components", "version": "0.1.3a0" }, "last_serial": 5387797, "releases": { "0.1.0a0": [ { "comment_text": "", "digests": { "md5": "7d5078c06ba9c0012990ddfd3b77fec5", "sha256": "ede3ed4449d111f7f111bab9d2f551aee3b8791b61c8db7f938bc713d0577b96" }, "downloads": -1, "filename": "django_react_components-0.1.0a0-py3-none-any.whl", "has_sig": false, "md5_digest": "7d5078c06ba9c0012990ddfd3b77fec5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4892, "upload_time": "2019-05-06T19:06:48", "url": "https://files.pythonhosted.org/packages/a7/86/c22380c33fa38d71420eb6bb5a068e3757fd812474c9aaf82de4eda5a27d/django_react_components-0.1.0a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c68e4bba44630e1e95d4c88d668bcc75", "sha256": "248a35777dfcc7dbd7d022ccd49f456d25fa7c7ac890e47b0c95011eaa162b8a" }, "downloads": -1, "filename": "django-react-components-0.1.0a0.tar.gz", "has_sig": false, "md5_digest": "c68e4bba44630e1e95d4c88d668bcc75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3667, "upload_time": "2019-05-06T19:06:50", "url": "https://files.pythonhosted.org/packages/d5/2d/ccb26e870aae5d19f897d402145cf8f0e93ab38b86d7a3c66da06efb7deb/django-react-components-0.1.0a0.tar.gz" } ], "0.1.1a0": [ { "comment_text": "", "digests": { "md5": "704aa258a2a6448521dd036b17c7be09", "sha256": "17d98ca7c1a25c78f252eb76188a0a171c2c2653976f704691377610a0bc2c70" }, "downloads": -1, "filename": "django-react-components-0.1.1a0.tar.gz", "has_sig": false, "md5_digest": "704aa258a2a6448521dd036b17c7be09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3642, "upload_time": "2019-05-06T19:57:47", "url": "https://files.pythonhosted.org/packages/d5/48/5657a652f85acf34256a780caa4485126c681e6a9158f94ea3fb4816ad0e/django-react-components-0.1.1a0.tar.gz" } ], "0.1.2a0": [ { "comment_text": "", "digests": { "md5": "474f0f9bc7b2aed4e9fc0bc280d0a34e", "sha256": "df9da608451453919c5ba6f671879ac0f738ba9481f97743393cd7add388286f" }, "downloads": -1, "filename": "django-react-components-0.1.2a0.tar.gz", "has_sig": false, "md5_digest": "474f0f9bc7b2aed4e9fc0bc280d0a34e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3844, "upload_time": "2019-05-06T20:12:12", "url": "https://files.pythonhosted.org/packages/0e/c5/c7783736dbf2dcd1c967cddc5e7f1bd5712f7ec65e9c76515827395b1d5a/django-react-components-0.1.2a0.tar.gz" } ], "0.1.3a0": [ { "comment_text": "", "digests": { "md5": "2bcf944c5db55c9cc9353e49ebf37030", "sha256": "284121280113ec64c8bdf60dc855cad02b6ae1711a1c5d28310fb5dcb8c06dbe" }, "downloads": -1, "filename": "django-react-components-0.1.3a0.tar.gz", "has_sig": false, "md5_digest": "2bcf944c5db55c9cc9353e49ebf37030", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4545, "upload_time": "2019-06-11T18:57:58", "url": "https://files.pythonhosted.org/packages/88/64/79e452335af86efc223d8555ed4966fe75a19dfeb604280c8e51f6ce807f/django-react-components-0.1.3a0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2bcf944c5db55c9cc9353e49ebf37030", "sha256": "284121280113ec64c8bdf60dc855cad02b6ae1711a1c5d28310fb5dcb8c06dbe" }, "downloads": -1, "filename": "django-react-components-0.1.3a0.tar.gz", "has_sig": false, "md5_digest": "2bcf944c5db55c9cc9353e49ebf37030", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4545, "upload_time": "2019-06-11T18:57:58", "url": "https://files.pythonhosted.org/packages/88/64/79e452335af86efc223d8555ed4966fe75a19dfeb604280c8e51f6ce807f/django-react-components-0.1.3a0.tar.gz" } ] }