Django has been, rightly or wrongly, derided in some circles for not keeping up with modern web development. It even came up in some of the comment...
For further actions, you may consider blocking this person and/or reporting abuse
Thank God! Finally there is a Django tool that I can use to cool my head now. You don't how how many round I've been knocked down by React (and friends) and ASGI Django. I almost leave my status as a Django fans like 2 months ago. But now you bring me back to my lovely Django! Thanks man!
Hi Adam, I'm the author of django-reactor I love your project. Is super simple and your JavaScript is better than mine, I actually improved some things in reactor based on your project. Thanks!
Oh, nice! I really wanted to keep adding PRs to
django-reactor
, but after seeing Livewire I got the itch to create something very similar without dealing with websockets at all. I do shout outdjango-reactor
on the first page of my documentation, though! :) django-unicorn.com/documentationI will add support for AJAX as a second option if the websocket drops or configurable, in case you don' want websockets at all.
Excellent! I am someone who faced the exact same dilemma after learning and trying out Django in a side project. I am now learning Flutter and contemplating of using Flutter(mobile/web)->gRPC/gRPC-web->Go/Python as the stack for my projecs. But, then, I won't probably need python+Django in that case except for the ORM and admin page advantages it provides. As you say Flutter/Angular/React will also be a heavy lift for some simple projects which don't need the advantages of those frameworks. Thanks for this post and the django-unicorn framework. I will try it out sometime.
FastAPI with Vue for me 😊
Nice article and Django is great!
Having tried out Livewire for a project, I don't think I will be using anything else for any of my projects that involve PHP. The developer experience is pretty neat, especially cutting down the javascript fatigue. Great to see something similar in the Django community. +1
Hi Adam.
This is a wonderful project, thank you for creating it! I think it can help on my project. It has a sidebar, and I wanted it to have a component that is a progressbar tracking the user's disk usage on the server.
So far I have created the component successfully using django-unicorn and inserted it into the sidebar. It calculates the disk space percentage and resizes the progressbar accordingly.
Forgive my ignorance, but I can't find a way to change the component's properties outside it's class file, or from my own views.py file. Is it possible to do so? My goal is to update the component whenever there's some user action that impacts his disk usage.
Thanks!
Hi Ashirvad, wow that's awesome to hear that django-unicorn might be useful for your project. I haven't thought too much about this use case, but it might be doable in the future. When the user does an action would it be via some Javascript? I'm wondering if there was a hook to call from Javascript to update the component if that could work.
When you mention the views.py portion, I'm wondering if the page is going to be re-rendered altogether? In which case, I think the component just needs to get the correct data in real-time via API or database call or whatever.
In any event, if you could create a Github issue at github.com/adamghill/django-unicor..., that would be helpful for me and we can talk about your issue more in-depth.
Thanks!
Hi Adam.
I have just created a Github issue.
Thanks!
Ashirvad
Here is the Github issue and my response in case it’s useful for anyone else: github.com/adamghill/django-unicor....
Yep, FastAPI looks awesome. It's hard to give up all of the niceties that Django gives me, though!
This seems really promising, I was going in the same way, removed the API and was going to try Stimulus and turbolinks.
For sure I will try this.
I haven't used Stimulus or Turbolinks in a "real" project, but have played around with them a little bit in toy apps. Definitely some nice ideas in both libraries!
Very nice!!!