{ "info": { "author": "Eddy Ernesto del Valle Pino", "author_email": "eddy@edelvalle.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP" ], "description": "# Reactor, a LiveView library for Django\n\nReactor enables you to do something similar to Phoenix framework LiveView using Django Channels.\n\n## Installation and setup\n\nReactor requires Python >=3.6. \n\n[Setup up your django-channels](https://channels.readthedocs.io/en/latest/installation.html) project beforehand.\nYou will need to set up [Channel Layers](https://channels.readthedocs.io/en/latest/topics/channel_layers.html) as part of your configuration - Reactor won't work without Channel Layers enabled.\n\nInstall reactor:\n\n```bash\npip install django-reactor\n```\n\nAdd `reactor` to your `INSTALLED_APPS`. Register the URL patterns of reactor in your your file where is the ASGI application, usually `/routing.py`, something like this:\n\n```python\nfrom channels.auth import AuthMiddlewareStack\nfrom channels.routing import ProtocolTypeRouter, URLRouter\nfrom reactor.urls import websocket_urlpatterns # <- for Django Reactor\n\napplication = ProtocolTypeRouter({\n 'websocket': AuthMiddlewareStack(URLRouter(\n websocket_urlpatterns, # <- For Django Reactor\n ...\n ))\n})\n```\n\nIn the templates where you want to use reactive components you have to load the reactor static files. So do something like:\n\n```html\n{% load reactor %}\n\n\n \n ....\n {% reactor_header %}\n \n ...\n\n```\n\nPut them as early as possible, they use `