Most active commenters
  • n3storm(3)

←back to thread

Happy 20th Birthday, Django

(www.djangoproject.com)
578 points davepeck | 19 comments | | HN request time: 0.226s | source | bottom
1. mrcwinn ◴[] No.44559774[source]
Not to conflate a framework and a language, but there’s something about Django that makes me feel like I’m writing PHP. What is this effect?
replies(3): >>44559911 #>>44560628 #>>44561163 #
2. n3storm ◴[] No.44559911[source]
Laravel keeps copying Django (I mean it in a good way)
replies(5): >>44560320 #>>44560405 #>>44560616 #>>44562196 #>>44562341 #
3. mgkimsal ◴[] No.44560320[source]
What's been copied? I see some overlap/homage to rails and some .net, but not django.
4. dsego ◴[] No.44560405[source]
It should copy the query builder, in many ways Laravel is nicer, but Django's query builder is way more powerful with fewer lines of code.
5. codegeek ◴[] No.44560616[source]
I think Laravel copied/inspired heavily from Ruby on Rails initially.
6. ethan_smith ◴[] No.44560628[source]
It's likely the template-centric architecture with its own template language and the monolithic approach to web development - both Django and traditional PHP frameworks like Laravel share this pattern of tightly coupling views with server-side rendering.
7. simonw ◴[] No.44561163[source]
When Adrian and I first designed Django we were PHP developers switching to Python, so quite a few Django pieces were inspired by PHP.

Django's request.GET and request.POST were directly influenced by $_GET and $_POST.

Django's template language included ideas from the Smarty PHP template language.

replies(1): >>44561771 #
8. nojs ◴[] No.44561771[source]
This is surprising because the template language in particular feels so anti-PHP, it’s highly opinionated about not mixing code in with the template. I often wish it supported arbitrary Python.

Anyway, thank you Simon :)

replies(2): >>44561838 #>>44567764 #
9. simonw ◴[] No.44561838{3}[source]
Yeah, the template language was strongly influenced by NOT wanting to allow arbitrary logic like PHP does. I was already a fan of Smarty - https://www.smarty.net/ - which did a great job of separating out presentation logic in PHP.

I've been using Jinja for my own projects for a few years because I wanted more expressive Python code in my templates! I think we didn't quite get the balance right for that in Django.

replies(1): >>44570988 #
10. j4mie ◴[] No.44562196[source]
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 in 2009 and immediately fell in love. Idiorm and Paris, although not direct attempts to duplicate Django’s ORM, came from frustration that such an elegant ORM and query builder didn’t exist in the PHP world.

So in a roundabout way, Laravel’s ORM was absolutely inspired by Django.

As a side note, I’m still doing Django 16 years later and love it more than ever.

replies(1): >>44605596 #
11. TiredOfLife ◴[] No.44562341[source]
Laravel borrowed much from Rails, Django and others. But unlike them actually moved forward.
replies(1): >>44569268 #
12. ashwinsundar ◴[] No.44567764{3}[source]
Custom tags and filters have been my escape hatches when the DTL is not taking me where I need to go.

https://docs.djangoproject.com/en/5.2/howto/custom-template-...

13. octo888 ◴[] No.44569268{3}[source]
> 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.

replies(1): >>44605634 #
14. robertlagrant ◴[] No.44570988{4}[source]
I think a great combo would've been Django's features, packaging and most importantly documentation, but with SQLAlchemy and Jinja2 technologies underneath.
replies(2): >>44572447 #>>44573724 #
15. frankwiles ◴[] No.44572447{5}[source]
That would have been hard since both of those projects came out after Django, but just an FYI Jinja2 templates are supported and nothing stops you from using SQLAlchemy. Granted you lose a lot of the tight intergration that makes Django great to use.
replies(1): >>44572753 #
16. robertlagrant ◴[] No.44572753{6}[source]
> That would have been hard since both of those projects came out after Django

Well, yes I didn't mean Django from the start! I mean now.

17. jefurii ◴[] No.44573724{5}[source]
The nice thing about Django is that there's nothing stopping you from doing that. You'll have to give up the Django Admin if you use SQLAlchemy for models but you can still do it. I have several projects that use Elasticsearch as a backend and one that's based on JSON documents in Git repositories. You can totally do it!
18. n3storm ◴[] No.44605596{3}[source]
I do love Django too! and my developtment with more users (not most deployed) is running on Django :)
19. n3storm ◴[] No.44605634{4}[source]
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?