Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Django Compatibility? #354

Answered by rmorshea
Archmonger asked this question in Question
Discussion options

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?

You must be logged in to vote

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

Comment options

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.

You must be logged in to vote
3 replies
Comment options

Archmonger Apr 26, 2021
Maintainer Author

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.

Comment options

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!

Comment options

Archmonger Apr 26, 2021
Maintainer Author

Going to start a new thread related to general questions I have while attempting to integrate with Conreq. I appreciate the support!

Answer selected by rmorshea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /