-
-
Notifications
You must be signed in to change notification settings - Fork 328
Django Compatibility? #354
-
Just wondering if anyone here has experimented with using idom with Django.
On a slight tangent, based on my understanding idom was designed to allow for SPAs, is that correct?
Beta Was this translation helpful? Give feedback.
All reactions
Yup, IDOM allows you to make SPAs.
And I haven't tried making this work with Django yet. Does Django have any async support? If so that would make it pretty easy to integrate. Otherwise it'll be a bit trickier, though I was able to get Flask working so it shouldn't be impossible.
If you have any interest in making a contribution to this effect I'd be happy to to help guide you through it. The other server implementations can be found in src/idom/server/*.py. If Django has async WebSockets you can probably copy most of the boilerplate from the fastapi, sanic, or tornado implementations.
I've set up some weekly office hours if you'd like to chat about this in more detail.
NOTE: you can actu...
Replies: 1 comment 3 replies
-
Yup, IDOM allows you to make SPAs.
And I haven't tried making this work with Django yet. Does Django have any async support? If so that would make it pretty easy to integrate. Otherwise it'll be a bit trickier, though I was able to get Flask working so it shouldn't be impossible.
If you have any interest in making a contribution to this effect I'd be happy to to help guide you through it. The other server implementations can be found in src/idom/server/*.py. If Django has async WebSockets you can probably copy most of the boilerplate from the fastapi, sanic, or tornado implementations.
I've set up some weekly office hours if you'd like to chat about this in more detail.
NOTE: you can actually embed IDOM into any existing app if you want to - IDOM's own documentation, which was built with Sphinx and some custom extensions, is a great example of this.
Beta Was this translation helpful? Give feedback.
All reactions
-
Django websockets are most commonly fully async.
HTTP async support is currently very half baked right now, since it was added relatively recently. Basically unusable without major refactoring of django code.
I'll take a shot at django integrations, and might PR some django specific boilerplate code. If this goes well, it's likely going to be an integral part of Conreq's upcoming plugin framework.
If I have any questions I'll hit you up during the weekly.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thankfully then, the only part that needs to be async is the WebSockets. A point of note on the work though, there's a fairly substantial upcoming refactor that impacts "dispatchers", which are what you'll need in order to integrate with Django. This refactor should be released sometime later this week though.
Conreq looks compelling, I'll have to check it out!
Beta Was this translation helpful? Give feedback.
All reactions
-
Going to start a new thread related to general questions I have while attempting to integrate with Conreq. I appreciate the support!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1