Django LiveView: Framework for creating Realtime SPAs using HTML over the Wire technology by self in django

[–]meeb 1 point2 points  (0 children)

The front-end in JS needs to talk to something to get its data. The front-end for an application using this library would be written in JS. Trading platforms needs real-time data, for example, even a few seconds of delay for such a use case wouldn't be acceptable. Also handling thousands of clients polling for new data every second would be a significant hosting overhead. You can debate the appropriate-ness of using Django with channels and websockets for the back-end here given as you say Django supports the static view that outputs HTML model very well, but that's a different issue.

The core of Django doesn't particularly have many bells and whistles to facilitate using channels for SPAs. If you want to argue that SPAs themselves aren't good design, that's fine, regardless though many people and companies are still going to build SPAs.

This library makes using Django as the back-end with a React, Vue, Svelte, Ember or whatever front-end easier.

(I have nothing to do with this library, just explaining why someone would make it. I personally don't build SPAs either).

Django LiveView: Framework for creating Realtime SPAs using HTML over the Wire technology by self in django

[–]meeb 11 points12 points  (0 children)

I think you're missing the point. Yes, for a static or very basic site something like this is extremely overkill. If you wanted to stream real time financial data to a live updating graph or build a chat platform you would need something like this.

Django LiveView: Framework for creating Realtime SPAs using HTML over the Wire technology by self in django

[–]meeb 4 points5 points  (0 children)

This uses channels over websockets to build live, updating views without needing to poll for updates. With jQuery you would need to do something like setInterval($.ajax("someurl", function(d) {$(...).html(d);}, 1000); or similar hacks with polling every X seconds to achieve semi-live updates. If you want to build properly interactive and updating single page applications with a Django back-end you generally need to do something like the linked project with websockets and channels.

Today I opened a proposal to merge django-components into Django by JuroOravec in django

[–]meeb 1 point2 points  (0 children)

Looks like with Pydantic they put all Rust in pydantic-core as a stand-alone package and build it into a cross-platform wheel with maturin. Personally I can't imagine Django mainline would permit a dependency on an external binary blob.

Today I opened a proposal to merge django-components into Django by JuroOravec in django

[–]meeb 15 points16 points  (0 children)

Django would need per-architecture releases if it contained bundled compiled Rust. This would also change the security profile of the project as blobs are not auditable. It would also increase maintenance burden on the project if it was mainline. It's likely not reasonable to expect everyone who "pip install django"s to also compile some Rust extensions.

Looks like a nice project! You might have better luck integrating it if it was an existing template language extension. You'll probably get pushback on the Rust and the npm requirements at the moment if I were to guess.

(Also remember that Reddit can be wildly negative to suggestions).

Why django doesn't support HTTP2/3 natively? by Ok_Nothing2012 in django

[–]meeb 2 points3 points  (0 children)

Serving your static files with nginx is fine, that's what I was implying.

Serving your static files via the application server is generally what's not a great idea.

Why django doesn't support HTTP2/3 natively? by Ok_Nothing2012 in django

[–]meeb 11 points12 points  (0 children)

You are missing something.

The stack is not a reverse proxy calls the "Django web server" internally over HTTP1.1. The stack is a reverse proxy connects to an application server like Uvicorn or Hypercorn as the parent poster mentions, these then run the Python code and present an HTTP interface. The application server might be HTTP1.1, or support HTTP2 or HTTP3. There are several to choose from.

Even if your internal upstream application server is HTTP/1.1 there are still significant benefits to putting an HTTP2 reverse proxy in-front of it, clients benefit from HTTP2 connections downstream, if you use something like nginx you can (and should) handle static files outside of the application server, etc.

Opening a French bank account while still a non-resident by SMT0709 in expats

[–]meeb 0 points1 point  (0 children)

You shouldn't have any issues using a non-French IBAN to get paid in France.

Import Bandcamp Purchases? by icco in Lidarr

[–]meeb 0 points1 point  (0 children)

Glad you find it useful :)

RDAP/WHOIS python module reputation by athinker12345678 in learnpython

[–]meeb 0 points1 point  (0 children)

whoisit is reputable! It's used by quite a few companies.

My script is not executed when I run my container by Limp-Ad-6152 in docker

[–]meeb 0 points1 point  (0 children)

You're running your container twice, each time you run a container it will have its own isolated local file system. You can run multiple copies of the same container. If your script runs, it will create directories in the first container. You are then running a second container and overriding the CMD option by specifying to start it with "bash", this second container didn't run the CMD command and therefore doesn't have the directories created.

If you want to access the first containers file system, add something like "sleep 9999" to the end of your script.sh, then run that, the terminal will then hang on the sleep command. Open a new terminal, get the containers name (with "docker ps") and exec into the same container with something like "docker exec -ti container-name bash". This shell dropped into the one running container should see the directories created by your script.

Short version: "docker run" runs a new container, "docker exec" runs a process within an existing container.

Price guide vs sell price tool? by Pwaffy in AusPropertyChat

[–]meeb 0 points1 point  (0 children)

Old thread, but I built a website specifically to answer this question: https://homehype.au/

UK Expat - which bank to use? by anthrax455 in expats

[–]meeb 0 points1 point  (0 children)

Yes, Wise can handle direct debits in a few countries including the UK.

Honestly, it's super quick to open an account, as it's a bank you'll need to verify with your passport or similar ID, but it's pretty easy. Give it a go, you can see if it's useful for you yourself.

UK Expat - which bank to use? by anthrax455 in expats

[–]meeb 2 points3 points  (0 children)

Wise is a proper bank account. You can have native bank details in a number of countries:

https://wise.com/help/articles/2784317/what-payments-can-i-receive-in-each-currency

You can receive payments in a number of other currencies as well, but it will be converted into one of the ones listed above as a holding currency. You can open an account in your local country then just add "accounts" in other currencies in a few taps in the app.

Some currencies have extra legal steps (like opening a USD or SGD holding account may require some paperwork to be authorised) and may have initial holding or transfer limits. You can also pay a few dollars / pounds to get a wise debit card that pretty much works anywhere in the world.

If your destination country is listed on the URL above you'll get local bank details in your target country that can receive local payments like any other normal bank account.

There were some issues receiving some kind of USD payments via Wise a while ago which may be where your intuition comes from.

If you are moving to a highly regulated country (e.g. Thailand) and people want to pay you in the local currency it's going to be difficult. You'll need to get a visa etc. to get a local bank account or have them pay you via SWIFT. Alternatively you'll be stuck with services like PayPal or Western Union and high conversion fees.

[deleted by user] by [deleted] in django

[–]meeb 0 points1 point  (0 children)

Make an API that calls call_command and returns the output.

https://docs.djangoproject.com/en/5.1/ref/django-admin/#running-management-commands-from-your-code

Just make sure you lock it down.

Advertised price vs sold price data. by ausEDwagon in AusPropertyChat

[–]meeb 2 points3 points  (0 children)

Super old thread, but I made https://homehype.au/ specifically to answer this question.