Live data from Hacker News

Portable Django

djngo.com

41–50 of 71 posts

Re: Portable Django

#41
post #38

Earlier quoted context omitted.

This is a double-edged sword in my opinion. The Django ORM is among my favourite ORMs, but the abstraction (like any) can cause problems over time. At scale, poorly understood ORM-generated queries can be a real pain, especially if your team's SQL skills have atrophied due to over-reliance on the ORM. As an exercise, I'd possibly recommend reviewing your top 1-3 worst performing queries, tracking them back to the ORM…

> At scale People often overestimate how often the average website needs to worry about scale. And how easy it is to fix the times you come close.

I completely agree, except for the last line. It is in my experience very hard to post-hoc get people to care about query performance. Organizationally and technically. In a complicated monolith at scale, de-tangling the ORM is a multi-years long project.

Edited to say: as for the average website, I do completely agree. For the unique website that will scale as well, I likely would still 95/100 recommend the ORM, but my experience has taught me that there be some pain on the road.

Re: Portable Django

#42
post #26

What a missed opportunity in calling it Django Unchained

References to slavery in America, even references to movies of freed slaves struggling to free others are generally unwelcome. It’s not something most people want to be faced with when they just came for a simple technical discussion.

So call it Django ’66.

Re: Portable Django

#43
post #23

Are people still using Django?

A lot. And it baffles me why hasn't anyone realized that Kenneth Reitz was right about django over a decade ago and all his points are equally valid today. https://speakerdeck.com/kennethreitz/flasky-goodness

I will take a well curated package that handles all the problems for me rather than bolting together pieces just so I can feel more ownership of a project.

- Admin panel? Django has me

- Web forms? Django has me

- Testing? Django, again has an out of the box solution

- Latest in security practices[0]? Again, covered for free

Flask, boy oh boy. I want an ORM? Guess I have to search around, Flask-SQLAlchemy has a lot of hits, I guess? Emails? Well, the Flask Mega-Tutorial uses Flask-Mail[1], guess I will use that. Oh look, it has not been updated since 2014[2]. Hope there is not a security flaw in there[3].

Django follows best practices, and has a huge community ensuring that there is adequate coverage and features required for modern development.

[0]: https://docs.djangoproject.com/en/4.2/releases/4.2/ note on the BREACH attack

[1]: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial...

[2]: https://github.com/mattupstate/flask-mail

[3]: https://github.com/mattupstate/flask-mail/issues/189

Re: Portable Django

#44
post #38

Earlier quoted context omitted.

> At scale People often overestimate how often the average website needs to worry about scale. And how easy it is to fix the times you come close.

I completely agree, except for the last line. It is in my experience very hard to post-hoc get people to care about query performance. Organizationally and technically. In a complicated monolith at scale, de-tangling the ORM is a multi-years long project. Edited to say: as for the average website, I do completely agree. For the unique website that will scale as well, I likely would still 95/100 recommend the ORM, but…

Instagram uses Django, so I think it is possible to make anything work.

Re: Portable Django

#45
post #26

What a missed opportunity in calling it Django Unchained

References to slavery in America, even references to movies of freed slaves struggling to free others are generally unwelcome. It’s not something most people want to be faced with when they just came for a simple technical discussion.

I found it clever and I welcome it. The history surrounding slavery isn't a taboo subject, what a ridiculous idea. The commenter in no way is condoning slavery.

Re: Portable Django

#46

Earlier quoted context omitted.

References to slavery in America, even references to movies of freed slaves struggling to free others are generally unwelcome. It’s not something most people want to be faced with when they just came for a simple technical discussion.

I found it clever and I welcome it. The history surrounding slavery isn't a taboo subject, what a ridiculous idea. The commenter in no way is condoning slavery.

I don't anyone believes that calling it Django Unchained would condone slavery.

They're just saying they don't want to have to think about slavery when choosing software which seems not unreasonable to me.

Re: Portable Django

#47

I'm getting the wrong hash when I download the file (I tried a couple times). I'm running curl -O https://djngo.com/djngo.com shasum -a 256 djngo.com and I get 6133a4f5c76af6ca6a2b2eba115783a78fc1721cd384539076884f640b801a26 djngo.com I'm on a M1 Mac. Am I missing something obvious? I tried running it anyway (smart I know) and it failed with zsh: exec format error: ./djngo.com

Please try again, I just re-ran the deployment and tested on my M1 (OSX): x@m1n1n0 ~> chmod +x djngo.com x@m1n1n0 ~> sha256sum djngo.com 6205984f572575c407ce65502361b554af17584f076076bec7440613459d 1dff djngo.com x@m1n1n0 ~> ./djngo.com extracting blink-darwin-arm64 to /var/folders /fn/4cdpvwcx1wnc53rzl2m0pn_m0000gn/T//.ape-blink-0.9.2 Python 3.6.14+ (Actually Portable Python) [GCC 9.2.0] on cosmo Type "help", "copyr…

Now I'm getting a different hash consistently, but not the correct hash:

    shasum -a 256 djngo.com
071bca4e67bf52dabcd6ec9766189c98ae536c103247549f6801d55dbc0a53ee djngo.com

Does the sha256sum command return a different value? It doesn't seem to be installed on my Mac by default.

Re: Portable Django

#48
post #23

Earlier quoted context omitted.

A lot. And it baffles me why hasn't anyone realized that Kenneth Reitz was right about django over a decade ago and all his points are equally valid today. https://speakerdeck.com/kennethreitz/flasky-goodness

I will take a well curated package that handles all the problems for me rather than bolting together pieces just so I can feel more ownership of a project. - Admin panel? Django has me - Web forms? Django has me - Testing? Django, again has an out of the box solution - Latest in security practices[0]? Again, covered for free Flask, boy oh boy. I want an ORM? Guess I have to search around, Flask-SQLAlchemy has a lot o…

FastAPI is the better choice now as its ecosystem is much more up to date and has more batteries included than flask (eg FastAPI has authentication included).

Re: Portable Django

#49

Earlier quoted context omitted.

Please try again, I just re-ran the deployment and tested on my M1 (OSX): x@m1n1n0 ~> chmod +x djngo.com x@m1n1n0 ~> sha256sum djngo.com 6205984f572575c407ce65502361b554af17584f076076bec7440613459d 1dff djngo.com x@m1n1n0 ~> ./djngo.com extracting blink-darwin-arm64 to /var/folders /fn/4cdpvwcx1wnc53rzl2m0pn_m0000gn/T//.ape-blink-0.9.2 Python 3.6.14+ (Actually Portable Python) [GCC 9.2.0] on cosmo Type "help", "copyr…

Now I'm getting a different hash consistently, but not the correct hash: shasum -a 256 djngo.com 071bca4e67bf52dabcd6ec9766189c98ae536c103247549f6801d55dbc0a53ee djngo.com Does the sha256sum command return a different value? It doesn't seem to be installed on my Mac by default.

That's the latest one. It is the same as on the website.

If you need any help getting started, please join us on the Redbean Discord: https://discord.gg/eHtVmUEB

Post reply on HN