5 ms·
Django makes it easier to build better web apps more quickly and with less code
- perryizgr8 4y ago> Ridiculously fast. > Django was designed to help developers take applications from concept to completion as quickly as possible. Note how they have mis-appropriated the usual meaning of the word "fast" as it relates to software. "Fast" in a software context means fast for the user, at runtime. Here they are referring to the development speed.
- anakaine 4y agoIt's right there, heading and sentence immediately below. I'd hardly call that obscured on a page clearly targeting dev teams with its message.
- EdwardDiego 4y agoDjango is lovely, but it uses so much Python magic, so much metaclass chicanery, that if you try to use it moderately differently you'll hit roadblocks.
- nszceta 4y agoIf you think Django has magic wait until you see the alternatives people come up with in FastAPI
- brianwawok 4y agoOr Ruby on Rails monkey patching library code
- wg0 4y agoPython needs a better and newer full stack framework. Been using Django for long but I consider its ergonomics to be quiet ugly from class based mixin views to models and forms being two separate things among others.
- thdespou 4y agoYeah it looks dated. It has its uses though.
- ehutch79 4y agoI'm actually super glad forms is separate from models. I've never liked the forms setup. Especially now that I mostly just use DRF.
- brianwawok 4y agoUse function based views. I do and way less magic.
- ttt3ts 4y agoCompared to the constant bitrot in "newer" frameworks I have grown to like Django more over the years. My old projects in Django still work. The meteor projects, flash apps, Android apps, less so. Modern software undervalues stability.
- mrweasel 4y ago> that if you try to use it moderately differently you'll hit roadblocks. That is certainly true, both for Django it self and the Django Rest Framework. If you try to fight Django on how you use it, you're going to have a bad time. One trick I use when working of Django projects is to look at my code and think: Am I writing too much code? If you have a method that more than 15 - 20 lines, you're most likely doing something wrong.
- alexfromapex 4y agoI find it funny how it is often compared to frameworks like Flask when it’s more like Wordpress for Python.
- ergvgdvgrd 4y agoIf you use django rest framework, it's a subset that covers flask.
- dieselgate 4y agoHave been through the Django docs tutorial and really like how it has the built in admin panel- a feature I wish rails had. But i work with rails every day and am a lot more familiar with it. Does anyone have a reason to start using Django/python over rails or a node js stack? I’ve really wanted to pivot towards python mostly because it’s so transferable to software applications outside web (scientific computing being the main “niche” here) but don’t really see it happening. Anyone willing to try and convince otherwise? Also curious on the tradeoffs between django and flask from someone who has some experience with both
- FlyingSnake 4y agoDjango vs Flask (or FastAPI) is an eternal programmers debate. I've been on this route several time and earlier I chose FastAPI, but now my current project is Django. Django comes with batteries included which is perfect for a large set of problems like Appointment booking SaaS or similar client-server problems. It is opinionated in certain areas like ORM or MVT but gives enough leeway in others like addons like DRF and templating. It does strict MVT which makes it unfashionable in µservices and DDD contexts. But once you make peace with the ecosystem and choices, the absolute speed you get in terms or releasing features is phenomenal. Apart from inbuilt support for security, templating, documentation, Django also plays really well with 3rd party tools like heavyweight frontend frameworks (React) or lightweight libs (HTMX+AlpineJS). It's ecosystem is also great and you can easily setup Social auth or custom crispy forms in a day or so. And the cherry on top if Django admin which is highly customizable and unbeatable.
- canadianfella 4y ago[dead]
- JodieBenitez 4y ago> Also curious on the tradeoffs between django and flask from someone who has some experience with both That's me. TLDR: Context is E-commerce apps. Best experience is Django. By large. For anything that looks like a content management system, use Django. That's literally what it's for, and it's unmatched in this space. If you want to make a backend for your react/vue/svelte frontend, maybe look at Fastapi. Or better yet, use Go. But Flask... it's a no-go for me in all use cases. Too much fiddling.
- andrewstuart 4y agoI’ve done a lot of Django development but these days to build an ordinary web app I either use Starlette with asyncpg and plain SQL or nodejs with plain SQL.
- rlawson 4y agoThere are definitely a few things I don't like in Django. Extreme OO with generic class based views, I hate mixins of any sort as well. But the organization, functionality and robust 3rd party app ecosystem are where Django shines. Also it's easy to use Django in a function centric way (see Adam Hill's django-fbv). I have objectively measured myself in how fast I can build a crud app. Even though I am a Java expert and maybe only a mid-level Python person - I can build sites faster with Django than Spring Boot. Now having said that there is a certain size project that I feel is Django's sweet spot - 5 devs or less (maybe 10 if you are strong on type hinting and other tooling). Anything bigger and it's Java all the way.
- nickv 4y agoNot to be curmudgeonly, I'm really confused about this post and why it's being upvoted? Django is like 20 years old. It's like linking to the Ruby on Rails site and saying "Compress the complexity of modern web apps" or linking to Google.com and saying "A search engine to help you find things!" Huh?
- ttt3ts 4y agoI think you made your own point. It has been around and maintained for 20 years. The number of web stacks that can claim that are very few. Worth mentioning once in a while.
- nickv 4y agoKind of... but does that mean we're going to see "Check out Wordpress, it powers 30% of the Internet" or "Hey, Postgres is great!" posts too?
- thefurdrake 4y agoThere was literally a post in the first three pages of HN today about sea anchors. Yes.