https://github.com/lutoma/django-wsync
⚡ Easy real-time updates using WebSockets for Django/JavaScript projects
https://github.com/lutoma/django-wsync
django django-channels django-rest-framework websockets
Last synced: about 2 months ago
JSON representation
⚡ Easy real-time updates using WebSockets for Django/JavaScript projects
- Host: GitHub
- URL: https://github.com/lutoma/django-wsync
- Owner: lutoma
- License: mit
- Created: 2018-06-11T18:07:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-14T21:43:09.000Z (almost 7 years ago)
- Last Synced: 2025-02-26T17:40:46.739Z (2 months ago)
- Topics: django, django-channels, django-rest-framework, websockets
- Language: Python
- Homepage: https://django-wsync.lutoma.org
- Size: 22.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
django-wsync
============django-wsync streams changes in your Django models to your frontend using WebSockets. It is based on `Django Channels `_ and uses `Django REST framework `_'s serializers. It can also be integrated with JavaScript state management libraries such as `Vuex `_.
`📖 Documentation, installation and getting started instructions_ `_
Please note that this project is released with a `Contributor Code of Conduct `_. By participating in this project you agree to abide by its terms.
Example
-------Note that this is missing imports. For a full example check `Getting Started `_
.. code-block:: python
class Webspace(models.Model):
host = models.CharField(max_length=50)@stream
class WebspaceSerializer(ModelSerializer):
class Meta:
model = Webspace
fields = ('host',).. code-block:: js
>> wsync.connect()
>> wsync.store.Webspace[0].host
"beep boop"Now, whenever an instance of your ``Webspace`` model is modified, the changes will be reflected in ``wsync.store``.