Live data from Hacker News

Happy 20th Birthday, Django

djangoproject.com

181–190 of 191 posts

Re: Happy 20th Birthday, Django

#181
post #60
post #12

Earlier quoted context omitted.

I’ve also switched away from Django (to Litestar), but the ORM is the mean thing I keep missing from Django. SQLAlchemy feels really clunky by comparison

I think the ORM is fine. There's always some friction coming from mapping rows to classes and objects, but you can always drop down a layer and just pull raw tuples. What I'm not a fan of, is the query DSL. Normally, the developer works to figure out how to express their problem with SQL; then the DB engine works to figure out how to map that SQL to the data it has on disk. Now Django adds another layer, which is com…

There's nothing stopping you from using Django with SQLAlchemy or even raw SQL.

Re: Happy 20th Birthday, Django

#182

Earlier quoted context omitted.

Not really, it was a strong inter-connection between the two at the beginning, going both ways, but I'd say that Django's design philosophy was its own thing. Granted, as time goes on things have started to become fuzzier and fuzzier in my head, and not only when it comes to programming languages/web frameworks and the like. Source: me, I was programming in Zope 20 years ago (mostly hated it, although there were lots…

Zope, shudder. It had some amazing ideas and I built a reasonably large app on it, but I’d rather swallow my own tongue than work inside an application server again. Django and its contemporaries, like TurboGears and Pylons, were a breath of fresh air.

I liked Turbogears, but their approach of using "best in breed" libraries kinda burnt them as what that meant kept changing and leaving them behind.

Re: Happy 20th Birthday, Django

#183
post #182

Earlier quoted context omitted.

Zope, shudder. It had some amazing ideas and I built a reasonably large app on it, but I’d rather swallow my own tongue than work inside an application server again. Django and its contemporaries, like TurboGears and Pylons, were a breath of fresh air.

I liked Turbogears, but their approach of using "best in breed" libraries kinda burnt them as what that meant kept changing and leaving them behind.

It did. I think it was a great idea but other things skipped past it. I used Pyramid for a while and still appreciate it, but I can't imagine using it for my own new projects in a world where Flask and FastAPI and others exist.

Re: Happy 20th Birthday, Django

#184
post #158
post #94

Earlier quoted context omitted.

Django has supported database routing for ages. I've abused it for setups like yours (at least as I vaguely understand from the post details) to avoid using a datalake

It was added over a year after we needed it (back in 2008/2009). I'm pretty sure our use case was taken as an input into the design of Django's database routing. We were certainly loud enough about it.

Haha well in that case thanks!

Re: Happy 20th Birthday, Django

#185
My favourite thing about Django is the versioned documentation. Land on a page - any page - and you can trivially read the docs on that subject all the way back to 1.8. That's ten years old. And it works, because Django knows how to patiently deprecate APIs and migrate things. They built one docs site, and it still works. It didn't bitrot. The URLs haven't changed. They didn't restructure everything and force people to rewrite their entire projects or be judged quietly. Every single time I end up working with a framework where docs are littered across a handful of different websites for different versions and types of docs or whatever, I think of Django and I wonder why people have such terrible taste.

Alas, that tends to be the majority of my experience with Django. Using it for one-off personal projects and quietly wishing for the current new shiny JavaScript thing to go away. It still feels like home, but most of my time is somewhere else.

Re: Happy 20th Birthday, Django

#186
post #80
post #18

In a very real sense, I have Django to thank for my entire career. As an undergraduate, my first academic job in a research lab had me building websites to promote the research in a lab. Django was brand new, and I was uninterested in petty concerns like stability and security, so I did everything in Django. Years later (2009), I got to do interesting work in a cutting edge machine learning lab due to the expertise I…

That early Python community was really nice. There were a lot of helpful strangers on the internet. Same with Ruby.

Indeed it was.

Re: Happy 20th Birthday, Django

#187
post #140

Earlier quoted context omitted.

What is missing? The ORM works with asyncio, you can have async views, you can have long running connection-oriented async stuff for websockets etc (via django channels). Maybe there is something important that I'm missing but that seems more complete than most async-only frameworks.

There are numerous things still missing in terms of async support. Most notably for me is DB transaction support which leads to most non-safe endpoints running on the shared sync_to_async thread and me having to separate my code into one async function calling another sync function wrapped in sync_to_async. In fact if you look at the source there is a lot of async methods in the framework itself which just straight u…

> But I think believing your requests wont block just because you're using async is a bit naive at this point in Django

TBH personally I have yet to work on any professional async Python project (Django based or not) which did not have event loop pauses due to accidental blocking IO or CPU exhaustion.

I take your point fully though that a lot of Django's "async" methods are really using a thread pool. (True for much closed source async code as well!)

Re: Happy 20th Birthday, Django

#188
post #64
post #11

Earlier quoted context omitted.

Laravel keeps copying Django (I mean it in a good way)

Laravel’s ORM was originally inspired by my now-long-dead PHP projects Idiorm and Paris: https://laravelpodcast.com/episodes/c7807d42/transcript (Search for “Paris” to find the relevant section) https://github.com/j4mie/idiorm https://github.com/j4mie/paris Idiorm was started in early 2010 while I was still writing PHP professionally. I’d heard about Django from a talk @simonw gave at the FlashBrighton meet-up group…

I do love Django too! and my developtment with more users (not most deployed) is running on Django :)

Re: Happy 20th Birthday, Django

#189

Earlier quoted context omitted.

Laravel borrowed much from Rails, Django and others. But unlike them actually moved forward.

> But unlike them actually moved forward. Right. I love Python and Django but the "batteries included" claim seems like an anachronism. Job queues, WebSockets/SSE, setter/modern form rendering, API framework, components, comprehensive CLI, frontend support etc are what the competition have better integrates and/or first party.

Right now that is my biggest pet peeve with Django, in the marketing area is a bit outdated and boring. What was about the Django Unicorn logo?

Re: Happy 20th Birthday, Django

#190

Out of curiosity, for people who have do projects in both Django and Ruby on Rails, which one would you prefer and why? I learned Python more than 10 years ago, but later chose Rails to be my first web framework to learn, as I also wanted to learn more about Ruby, hence the question.

As someone who has used quite a few MVC frameworks professionally, in my opinion, Ruby on Rails continues to be the gold standard in many ways. Django feels more like a toy framework which, if I may say so, appeals mostly to developers who picked up Python as undergrads and then were not impelled in their particular careers to master other languages.

Instagram doesn’t agree.
Post reply on HN