20 ms·
Django 2.2
- amerine 8y agoNice. Anyone building fun stuff using Django these days?
- theli0nheart 8y agoMe! Have been for over 10 years. Still chugging away. :)
- wepower_ico 8y agoDefinitely. Most of my projects starts with Django. Quick to build quick to test the idea. And because they never grow to 10k concurrent users no need for more scalable solution.
- Alex3917 8y agoDjango is still by far the best web framework as far as I can tell. Every couple years I check what's out there for GoLang, Rust, Nodejs, and Swift, and it seems like it will be a decade or more before anything else comes even close. Even though a lot of people don't like Django's ORM, at least it does almost everything you would want to do with Postgres. (And if you want more you can always use SqlAlchemy.) Most of the other ecosystems don't even have anything near the baseline functionality built into Django.
- auvi 8y agoI think you are missing the elephant in the room: Ruby on Rails.
- Alex3917 8y agoWith Python you get: - The best-governed language in all of software, and the best-governed web framework - A huge ecosystem of libraries for everything from data science to email processing, that are (mostly) easy to read and modify and free from systemic security issues. And pretty much every major company with an API has an official Python library for that API. - The standard language taught at most of the top CS programs around the world - A web framework that's had almost no major security issues over the 10+ years its been around What exactly would you get in terms of benefits from switching to Ruby? I'm not saying Ruby or Rails are bad tools, I just don't get why someone who already knew Python and Django would switch. I get that if you run a dev shop it might be a better choice for just cranking out web apps as fast as possible for clients, but if you run an actual startup I don't see that the benefits of saving a couple lines of code would offset the costs of being locked into the ruby ecosystem.
- mtberatwork 8y agoDjango's documentation is also simply top notch.
- howiroll 8y agoI disagree. There are too much undocumented potholes.
- paulddraper 8y ago> What exactly would you get in terms of benefits from switching to Ruby? You'd get Ruby on Rails.
- deleted 8y ago[deleted]
- driverdan 8y agoI've spent years using Rails and about a year with Django. In general find Rails to be more logical and less cumbersome. Django feels more cobbled together than Rails, with less cohesiveness. Sorry that these are fairly abstract statements without examples. I need to start tracking them.
- ablerman 8y agoI find this comment interesting because my experience is the exact opposite. (I won't bore you or tempt the trolls with details) I don't mean to downplay your experience at all. My working theory is that you just think the way the rails devs do and I think the way the Django devs do.
- driverdan 8y agoCould be. Could be that I have more experience with Rails and used it first. Maybe if I used Django first it'd be the other way around. For the record I didn't want to do Rails work when I started, and begrudgingly accepted being called a Rails developer only after two years of experience.
- robdachshund 8y agoPython is much easier to learn and most devs already know it. It fosters quick and simple code that is super easy to maintain, and python/django is a huge and accessible ecosystem. I don't need to learn a new language I won't use for anything else, I don't need to learn a framework that is not as simple as its proponents describe. I also don't need to learn a new package manager or go digging for gems that do what I need. If you aren't already invested in ruby, there is very little to gain as a web app developer. It would be a huge waste of time to drop django or flask and learn not only a new framework but also a language that is often described as cumbersome to use. Ruby on rails might make sense if you already know it, but it makes little sense for anyone else to learn it these days.
- sparkling 8y agoI have used both Ruby on Rails and Django in large production web applications over 2+ years. Speaking strictly about the web framework, RoR is the slightly better framework IMHO. This includes but is not limited to: - cleaner internal APIs, models, methods - a lot more stuff that "just works" out of the box where you would need a third-party package in Django (e.g. RoR gives you different settings for development/staging/production out of the box) - better static file handling - third-party packages tend to be a bit more mature and stable in the RoR world However, using Django gives you easy access to the rest of the Python ecosystem, including all the data science and ML tooling. And that trade is worth it. So if you are starting from scratch today, i'd go with Django.
- Godel_unicode 8y ago> better static file handling Don't you just let nginx/CDN handle these?
- Nextgrid 8y agoI think he’s referring to the app being aware of static files so it can resolve their URLs, etc (without having to hardcode paths). You develop by just assuming all your static files would be served by Django itself (and they will - using the dev server) and then change the project’s configuration to use a CDN or S3 (using a library - which will automatically collect & upload your files too) with no change to the underlying code.
- true_religion 8y agoAsset Pipelining is a dingo plug-in, but a built in for Rails.
- ethagnawl 8y agoI think they meant the Sprockets/Asset Pipeline or whatever the new Webpack-based solution is.
- agiamas 8y agoBeing in a similar position, I wanted to post but your post is spot on. ML and DS have basically lifted Python and by association Django quite a lot...
- h1d 8y ago> a decade or more before anything else comes even close. Stopped reading at the fanboism.
- iwebdevfromhome 8y agoSymfony is a great php framework too
- nicoburns 8y agoIMO PHP's Laravel is competitive with Django. I think Django, Laravel, and Rails are really the only 3 frameworks with the levels of ecosystem and built in functionality that these 3 have (unless there's something in Java-land that I'm not aware of). ASP.NET Core is close, but the ecosystem around it is weaker.
- conradfr 8y agoPhp-wise Symfony is easily on par with Laravel and a really well managed project.
- mtberatwork 8y agoWhy would it be on par? Laravel is built with Symfony. [1] [1] https://symfony.com/projects/laravel https://symfony.com/projects/laravel
- blowski 8y agoSymfony is more like Java Spring, whereas Laravel feels like a port of Django and Rails. Compared to Laravel, it’s easier to use Symfony to build large applications, but it can feel like overkill for smaller CRUD-only applications. It has a steeper learning curve, so Symfony’s developer pool is more skewed to the senior end.
- Longhanks 8y agoFor Java there's Spring, which is like an entire universe in itself.
- BuckRogers 8y agoI reviewed these sort of web frameworks some time ago and went with ASP.NET Core because of the language attached being more to my liking and industrial-strength than Python, PHP or Ruby. I go in assuming every project will be 500KLOC someday, because it can happen. I've seen codebases this large in Python, and it was no bueno. Static typing, forward migration / backwards compatibility take top priority for me. Laravel was my 2nd choice, the recent adoption of a JIT into the core really adds some desirability to the space. Not to mention HHVM and how much Wordpress is out there.
- vonseel 8y agoDjango is my number one, but I think certain languages and the communities behind them - including Go and Rust, for sure, fit much different use-cases than Python/Django and thus there's good reason why you don't find massively popular full-featured web frameworks [for those langs]. Node.JS, on one-hand seems to take the approach of Go-lang - standard libraries that do basic web-handling well, but on the other hand, I think it is tarnished by Javascript's reputation for having too many third-party packages, too many options, new framework every week, etc. C# / .NET core seems to be a strong up-and-comer alternative for teams looking for a full-featured and well-supported application framework with more type safety and performance than Python/Django or RoR. Elixir / Phoenix, as well, but that caters to an entirely different crowd. I expect most Go users are not using much in the way of frameworks.
- airstrike 8y agoInstagram, to name one. https://instagram-engineering.com/web-service-efficiency-at-instagram-with-python-4976d078e366 https://instagram-engineering.com/web-service-efficiency-at-...
- yash1th 8y agoThe article was almost 3 years old now. I wonder what they've changed since then
- jacobkg 8y agoThe WorkFlowy (https://www.workflowy.com https://www.workflowy.com) backend runs on Django. We are on Django 2.1 and planning to upgrade to 2.2 now that it has been released. One new feature I’m excited about is bulk_update: https://docs.djangoproject.com/en/2.2/ref/models/querysets/#django.db.models.query.QuerySet.bulk_update https://docs.djangoproject.com/en/2.2/ref/models/querysets/#...
- scriptkiddy 8y agoI'm excited about that feature as well. It was possible to do bulk updates before, but it was cumbersome. With this new method, it will be super simple.
- champagnepapi 8y agoyeah! We use it at https://www.hungryroot.com/ https://www.hungryroot.com/ We use Django 2.0
- reustle 8y agoI recently got back into it after many years on flask. Free admin, user accounts, and rest API (django-rest-framework) makes building things so quick and enjoyable.
- mariocesar 8y agoAlmost anything, for me is like the only one-to-go that hits all the most important things for a project.
- frankwiles 8y agoWe work with a bunch of interesting clients all using Django. Most recently we helped upgrade Politifact.com (https://www.politifact.com/ https://www.politifact.com/) to a recent Django version, cleaned up a bunch of legacy cruft, and added decent test coverage. We also drastically reduced their infrastructure costs by better utilizing CDNs and caching.
- epberry 8y agoOur whole web stack and api, 5 separate domains.
- bredren 8y agoI’m building my first product that has actually made money and shows signs of real potential in Django. I’m about 3 years into it. It is growing just among beta customers. Hope to do a release in next month or so. Will post a Show HN. I also have a client I develop for on a private web app in Django that does a lot of cool stuff w on the fly cloud compute instantiation. I really like Django and have been hanging out in the #django on freenode.
- paddy_m 8y agoI have been leaning on Django a lot in the past couple of years. A couple of highpoints Everyone talks about the admin. Yes it is nice, but the real core for me is a sensible way to map URLS to queries. I have taken the filtering and sorting of the admin, and extended it to output dataframes. From there I can take the same admin url, change one part and instead get a csv to download, or a matplotlib plot. The Django ORM is cumbersome to use for complex queries, especially aggregations. I get around this by writing views that I want to express the aggregations that I want, then putting a model on top of the view. From there I can get easy access to the aggregations through a simple foreign key. When using Django, I often think "there's a lot of convention around doing this simple thing" or "why did they engineer something this odd way". Then I use Flask and I have to poorly reinvent something that Django has already thought of.
- diminoten 8y agoIf you want fun and aren't afraid of some AWS, I highly recommend Zappa: https://github.com/Miserlou/zappa https://github.com/Miserlou/zappa It's an amazing little piece of software, I am gobsmacked by how complete it is.
- godzillabrennus 8y agoI’m building a tool that will require recruiters pay technical people to speak with them about a job. http://www.joinjune.com http://www.joinjune.com
- wenbin 8y agoI use Django to build https://www.listennotes.com/ https://www.listennotes.com/ and https://www.listennotes.com/api/ https://www.listennotes.com/api/
- is0tope 8y agoI've built a bunch of stuff using Django, but my most recent project allows people who play the game ClashRoyale to see if they have played against a streamer on Twitch. If they have, they can view the video directly at the moment their game is shown. http://playedwith.io http://playedwith.io (click "latest games" to see how it works) Im a big fan of django, and have used it for several projects. Using rest-framework allows you also to make powerful apis, and SPA front ends like Vue or React. It's ORM is also a very user friendly (though aggregations are definitely a pain). I consistently come back due to the great docs, and the ease of use. Being python based means you can integrate a lot of libraries, especially if you are doing any kind of data science related stuff. Websockets and real time stuff can be cumbersome from my experience, and for that I would stick to node. It's possible to use django-channels but I had a very mixed experience trying this.
- abledon 8y agocool, do you grab a screenshot off the twitch stream then use character recognition on the UserName/Id to identify them? I see the esports gaming area exploding over the next 10 years as most people are gaming now instead of other activities.
- is0tope 8y agoThat was the original plan but it was waaaay to unreliable. The current system is pretty simple as you can synchronize the timestamps of streamers games (I know their Id's!) and their twitch streams. I use django-background-tasks to run an ETL job every 20 mins that does the matching.
- akx 8y agoThe web bits of our ML platform at https://valohai.com/ https://valohai.com/ are Django through and through.
- mattrp 8y agoWe built rationalpilot.com using Django, postgres and pandas. I love staying python native and really like Postgres support for the json model field in Django.
- deleted 8y ago[deleted]
- acidburnNSA 8y agoI'm building an open nuclear reactor lessons learned database where old retirees and current researchers can collect the design/operation/decommissioning lessons learned through the years and share references and knowledge.
- spapas82 8y agoMe for like 7-8 years. Just building boring intranet apps (some are CRUD, some have a little workflow but nothing too complex) for a public sector organization with only a light touch of JS (some Jquery if needed) and everything else Django request + response. It may seem boring but it is the most productive setup I've ever experienced; I don't think that there's anything more powerful for such things (except maybe some IDEs like PowerBuilder however I think that these are way too niche on their capabilities; they may be fast and easy to create the thing that they know how to create but god help you if you need to create something more complicated; Django on the other hand is a general purpose framework; whatever you throw at it it will happily eat)
- ecmascript 8y agoDjango is a great framework and it's probably very silly of me but I still cannot let go of the master/slave fiasco a couple of years ago. https://github.com/django/django/pull/2692 https://github.com/django/django/pull/2692 A framework that have deciding collaborators that is that sensitive / politically correct is not something I'm willing to invest my time on any more.
- chickenfries 8y agoYou’re right, it is very silly of you. I might even say you’re the one being over sensitive.
- sarcasmOrTears 8y agoNot as sensitive as people downvoting the poor guy's opinion to oblivion
- acomjean 8y agoIt’s probably not helping that the username is “ecmascript” on a python post. When I first started getting into database I found the terminology a little jarring. I know it’s common and the intention is ok, still not a big fan. But the python community should be ok with renaming things: frankly Lists are just arrays and dictionary’s are hash tables
- rat9988 8y agoWhy do you feel the need to attack him? It's not as if he has attacked you personally.
- mlevental 8y agoi don't understand the bipolar nature of hn. "don't be afraid to be intellectually honest and say what needs to be said - we're not afraid of hurting people's feelings for the greater good and we're proud of it" and at the same time "be careful you don't say anything that could in the slightest be misinterpreted as impugning someone's character" i feel like i'm taking crazy pills? this is exactly the kind of thing that Nietzsche talked about in geneaology of morals: people in this "community" claim to be above petty politics and egalitarian but as soon as anyone points out anything that even remotely contradicts that image they get silenced or shouted down (e.g. bringing up race or gender politics and their role in the entrepreneur mythology). it's completely within the scope of productive discourse to point out to someone that they're being irrational because no discourse can proceed until a rational framework is established. case in point: a rational discussion of the merits of django cannot begin from "i'm prejudiced against them because they made questionable PR choices". honestly there are so few useful discussions on hn. the tech posts are either PR for yc companies or another js vdom framework and the culture posts are all mostly rehashings of the same neoliberal arguments for capital and culture etc. the few people that try to inject any heterogeneity of thought get vilified.
- fredley 8y agoDjango/Jupyter/pandas is an ecosystem that's hard to beat. If you're not already using it, check out `django-extensions`. You can use `./manage.py shell_plus --notebook` to launch a Django-friendly Jupyter notebook. From there you can prototype with extreme ease and confidence. I have also built a trivial custom model Manager so I can do stuff like: User.objects.all().to_dataframe("first_name", "last_name", "email") Honestly I can't see myself being even slightly tempted to move to something else unless I can replicate this workflow.
- DangitBobby 8y agoLearning that I could just run pandas.DataFrame(User.objects.all().values()) in a jupyter notebook vastly improved my QoL in some projects.
- rlander 8y agoYou just discovered repl driven development that lisp users have been advocating for years. Check it out in Clojure: https://vvvvalvalval.github.io/posts/what-makes-a-good-repl.html https://vvvvalvalval.github.io/posts/what-makes-a-good-repl....
- amatheus 8y agoWell, python has had repl driven development for years too, notebooks only change the tooling around that if I’m not wrong.
- rattray 8y agoAgreed, the GUI repl may be more friendly to data scientists and analysts who know some coding but not emacs. Furthermore, the marriage of application framework / application model wrappers with industry-leading data science tools sounds particularly special, and orthogonal to the presence of a repl.
- rlander 8y agoYes, Python does have a repl, but I've never seen anyone doing real "repl driven development" in Python in my 15+ years of using it (btw, just testing some code in the repl isn't anywhere near repl driven development). See the blog post linked above to understand what I'm talking about. In Python, the repl is an accessory that helps testing small portions of code. In Clojure, the repl augments the editor, becoming an integral part of the development process. My understanding of the parent argument was that the combo Django/Jupyter/pandas is "an ecosystem that's hard to beat" because of the tight feedback loop between writing the code and seeing what it does.
- bluedino 8y agoThe projects/app relationship never 'clicked' with me. I also have a dislike for the awkward 'polls' example in the django tutorial. That said, I like Django. Of course, I liked Rails better, but maybe that's because it was my 'first' and I never used any of the big php frameworks for a long period of time. I quit wasting my time with Flask for projects a while ago. It's a really great project and suited for smaller things, but you just end up re-implenting django. I'd rather someone made those decision for me.
- deleted 8y ago[deleted]
- digitaltrees 8y agoI feel the same way. Does any one have a good overview on how the community actually separates functionality into “apps”? I have been looking at a rails like framework in python called Masonite. Does anyone in the python/Django community think this will gain traction?
- travisjungroth 8y agoThe separate apps thing is overblown (although that sentiment seems to be shared in these comments). If you're making a monolith web app, you can be safe just chucking it into one django app. If you're concerned about code organization, you can do that in one app with either sub apps or just turning files into packages later. I think this is a more productive strategy for django beginners. If you've identified some clean, generic problem where you want to reuse the code or open source it, make it a separate app. If you have a web site with areas that barely interact with each other, make it into separate apps (a chef's website where the recipes are separate from the cooking classes calendar). If you know what you're doing and feel like separate apps will help with organization, then split them up as well. Otherwise, one is fine.
- ergo14 8y agoI think pyramid or flask has more traction nowdays.
- 8y ago
- rattray 8y agoI've been away from Django for a few years, and hope to come back one day. One thing I'm curious about, coming from well-typed JS codebases using Flow, is the quality of typings in major projects like Django, Pandas, etc. Are their APIs well-typed? Can I get quality types for my models?
- akx 8y agoThe PyCharm IDE has extra support for Django to enable some additional type inference, and it works like an absolute (pun intended) charm. Beyond that, the Django core isn't type-annotated yet likely because of Python version support, but I'm sure you can get typeshed pyis or something.
- yhoiseth 8y agoThere's a discussion on the mailing list about this, last updated a few months ago: https://groups.google.com/forum/#!topic/django-developers/trTEbURFhEY/discussion https://groups.google.com/forum/#!topic/django-developers/tr...
- goatlover 8y agoWith Pandas, typically the important data types are the series data type for columns in a DataFrame or what not. Which Python will infer when you read in the data, or manually construct. These are data types provided by the Numpy library. And you can manually convert columns as needed with Pandas functions. If you mean the object itself, then Python is strongly typed and will throw an error if you try to run the wrong method or access the wrong property on an object (although it will let you assign new ones, and it will let you add new columns to DataFrames of any data type, because that's very useful). If you mean in the method or function calls, then often a parameter will allow different types because you might want to pass in the column name, a list of columns, a function or something else that makes sense for that particular parameter depending on what the method/function does. Pandas has a lot of overloaded parameters because it's a big library that covers a lot of use cases for tabular data.
- 8y ago
- techie128 8y agoDjango is awesome. It is a model Open Source project that everyone should emulate. I have used it in the past and it can make you hyper-productive especially if you're prototyping stuff.
- newaccoutnas 8y agoWe're a Django shop and it's a pleasure to work with (most of the time). Happy to see a 2.2 LTS release, that should light the fire under some teams to upgrade
- scardine 8y agoWhat I find most curious about Django/Python is that about 30% of the new installs are for legacy Python/Django (2.7/1.11): $ pypinfo --start-date 2019-01-01 --end-date 2019-03-31 -- percent --markdown django pyversion Served from cache: False Data processed: 160.22 GiB Data billed: 160.22 GiB Estimated cost: $0.79 | python_version | percent | download_count | | -------------- | ------: | -------------: | | 3.6 | 39.61% | 3,277,927 | | 2.7 | 29.59% | 2,448,652 | | 3.7 | 17.53% | 1,450,949 | | 3.5 | 10.37% | 858,325 | | 3.4 | 2.76% | 228,150 | | 3.8 | 0.07% | 5,428 | | 2.6 | 0.04% | 3,686 | | 3.3 | 0.03% | 2,103 | | 3.2 | 0.00% | 220 | | None | 0.00% | 56 | | Total | | 8,275,496 | I would expect everybody moving over 3.x by now - we are so close to 2.7 EoL in December...
- ataylor32 8y ago2.2 is the first LTS since 1.11. I expect a lot of people will upgrade now that it's out. Edit: Oh, but that doesn't account for the older Python version. Yeah, that is interesting.
- jordigh 8y agoTrying to move, but it's tough. Old codebase, lots of deps, and no real benefit to upgrading to 3.6, nothing our end users will care about or notice (or pay for). Upgrading to Python 3 is a chore. We have to do it, but it's not fun and it's barely useful.
- neves 8y agoI'm a fan of Django, but I'm in doubt if I must still use it for my new project. I'll develop now an hybrid app that will start life as an mobile web site. I'll use one javascript framework and I'm really in doubt about using Django. If I use a javascript server framework, I believe that it will prevent me to duplicate forms validation code (in server in frontend) and also easier for SSR (Server Side Rendering). But Django is a robust framework, in my beloved Python language, why should I still use it?
- pmontra 8y agoYou're probably going to define those validations in different ways. The frontend gets data from the UI one field at the time, the back end gets them from a JSON all together. Then they react in different ways.
- rochacon 8y agoIMHO, code sharing between the frontend and backend is very hard to do properly and you have more changes of making stuff too generic and unmaintanable faster. KISS As any new project, go with you're most comfortable with, so you can prototype and changes things faster. After you reach a good size and understanding of the problem you may refactor stuff for a different language/framework with better reasons for it. That being said, if you want to use Python but not a "batteries included" framework like Django, so you have better control of the stack, check out Pyramid, it is really good and scales (I'm talking on code maintainability, but also performance-wise) very well from pet-project phase to complex applications.
- franey 8y agoA person can use Transcrypt[1] to transpile quite a bit of Python to JavaScript. As a proof-of-concept, I put together a Django plugin[2] that uses Django's validators[3] along with Transcrypt to share validation logic between the server and a `ModelForm`. I thought it was a neat way to centralize validation logic. [1] http://www.transcrypt.org/ http://www.transcrypt.org/ [2] https://github.com/johnfraney/django-front-end-validators https://github.com/johnfraney/django-front-end-validators [3] https://docs.djangoproject.com/en/2.2/ref/validators/ https://docs.djangoproject.com/en/2.2/ref/validators/
- trpc 8y agoWhenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre routing (no nesting, all routes have to be declared in one place) 2. mediocre middleware (middleware is global) 3. mediocre ORM (easy only for very easy stuff, more pain in the ass than writing raw SQL itself when it comes to complex aggregations and joins) not to mention some of the famous ORM bugs that have been open for like a decade 4. custom user model? good luck fighting with Django errors to make that happen 5. custom authentication? external authentication? good luck 6. Django is built for 2000s websites not REST/gRPC era 7. want to use graph databases? noSQL? good luck 8. external migration for SQL? oh god, prepare yourself for the mental hell 9. Django as far as I can tell still ONLY supports decoding "x-www-form-urlencoded" bodies, yeah no JSON, it's that pathetic Django is very intrusive and is pain in the ass in a fast moving environment where you want to use microservices, external authentication/authorization, APIs, gRPC, etc... that's excluding all problems of Python itself. I totally recommend Typescript/Express or Golang for doing any kind of non trivial backend with fast moving environment/requirements currently
- acdha 8y agoNo need to troll if you don't like it — move along and don't waste everyone else's time waving your ignorance around so proudly.
- trpc 8y agoaccusing me of ignorance while not providing a single argument is the ignorance itself EDIT: keep downvoting me, maybe downvoting the truth on a website will hide your technical mediocrity some day
- acdha 8y agoFeel free to substantiate your claims. Even after your edit it's just a bunch of big claims with no supporting evidence for the things which aren't simply wrong (e.g. “no nesting, all routes have to be declared in one place” sounds like you haven't ever used a Django app, including the built-in ones. Perhaps there's something else you have in mind but since you didn't explain, who else can tell?). Lobbing insults won't hide the fact that you aren't even trying to make a technical argument or otherwise contribute in any way to the discussion: > Eschew flamebait. Don't introduce flamewar topics unless you have something genuinely new to say. Avoid unrelated controversies and generic tangents. > Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- subhajeet2107 8y agoAwesome ! we at Careers360 (India top 100 Alexa) use Django for everything, the best thing about an Opinionated stack like django is freshers are production ready at day 1, learning time reduces and maintainability is solid , although i prefer golang where frameworks are particularly not favored ,Django ORM surely lacks a lot of features but does a decent job, async story sucks unless you are willing to give in to Channels i hope Django embraces async officially in the core
- purrpit 8y agoI believe I had interviewed once at careers360 a couple of years back, don't think it was mentioned to me then that you guys work majorly on Django otherwise I think I would have had a better chance at clearing it lol... But yeah Django is awesome, It has paid my bills for years. Hopefully async will come in relatively soon with Andrew Godwin's focus on it.
- mkolodny 8y agoI love Django. I've used it for the last 8 years. I'm happy to see the project is still thriving. At this point, for me Django is pretty much synonymous with Django REST framework (https://www.django-rest-framework.org/ https://www.django-rest-framework.org/). I can't imagine a better API than Django w/ REST framework. For static sites I use Django's templates. Otherwise, I just use Django w/ REST framework for my API, and to serve up index.html. My index.html will include a link to my JS bundle(s) - I use a separate build system (Webpack/Babel/etc) to handle JS.
- konschubert 8y agoTry serving your static content from a specialized host, for example firebase hosting. Then, you don’t need to serve any static content from your API server and can do away with nginx. Use the whitenoise package for serving the Django admin pages if you still need them for administrative tasks.
- 1337shadow 8y agoOr serve statics from uWSGI (which also provides a spooler, cron and shared cachemem that works with python and Django but that's another story), here in optimized version for best results according to lighthouse: uwsgi --plugin=python3,http,router_static,router_cache --mime-file /etc/mime.types --offload-threads '%k' --file-serve-mode x-accel-redirect --route '^/static/.* addheader:Cache-Control: public, max-age=7776000' --static-map $STATIC_ROOT=$STATIC_URL --static-gzip-all --cache2 'name=statcalls,items=100' --static-cache-paths 86400 --static-cache-paths-name statcalls"
- jadiofan 8y agoSane defaults FTW
- systemspeed 8y agoI do wish Django REST Framework shipped with faster serializer code.
- trpc 8y agoWhy Django is not good, here are some of my reasons as far as I can remember: 1. mediocre routing (no nesting, all routes have to be declared in one place) 2. mediocre middleware (middleware is global) 3. mediocre ORM (easy only for very easy stuff, more pain in the ass than writing raw SQL itself when it comes to complex aggregations and joins) not to mention some of the famous ORM bugs that have been open for like a decade 4. custom user model? good luck fighting with Django errors to make that happen 5. custom authentication? external authentication? want a custom token format? want your authentication token in a custom http header? good luck 6. Django is built for 2000s websites not REST/gRPC era 7. want to use graph databases? noSQL? good luck 8. external migration for SQL? oh god, prepare yourself for the mental hell 9. Django as far as I can tell still ONLY supports decoding "x-www-form-urlencoded" bodies, yeah no JSON, it's that pathetic
- pleasecalllater 8y ago> 1. mediocre routing (no nesting, all routes have to be declared in one place) In reality these can be multiple places, however not really nested. There is the main routing file, which can move resolving a url to another file. > 2. mediocre middleware (middleware is global) Isn't it how it should work? The middleware is something your want always run for the request. > 3. mediocre ORM (easy only for very easy stuff, more pain in the ass than writing raw SQL itself when it comes to complex aggregations and joins) not to mention some of the famous ORM bugs that have been open for like a decade Not really. On the other hand I always prefer SQL... but using SQL in the Django ORM and pushing the results into Django model classes is simple. > 4. custom user model? good luck fighting with Django errors to make that happen Done that a couple of times... https://docs.djangoproject.com/en/2.1/topics/auth/customizing/ https://docs.djangoproject.com/en/2.1/topics/auth/customizin... > 5. custom authentication? external authentication? good luck No luck needed: https://docs.djangoproject.com/en/2.1/topics/auth/customizing/ https://docs.djangoproject.com/en/2.1/topics/auth/customizin... > 6. Django is built for 2000s websites not REST/gRPC era True, that's why we have e.g. this https://www.django-rest-framework.org/ https://www.django-rest-framework.org/ > 7. want to use graph databases? noSQL? good luck Yup. I'm using SQL and I'm with it. Graph databases are cool for some specific problems, you can also use the core Django models and store some more stuff in the graph database. As for all the noSQL mess, well, it's usually a mess with thousands if programs running just to clean the data, and almost nobody cares about the correctness of the data model, thank you, I'd rather stay with the good old SQL. > 8. external migration for SQL? oh god, prepare yourself for the mental hell I'm not sure I can see a problem here... but I'm half-dba, half-programmer, half-dragon... so maybe that's why. > 9. Django as far as I can tell still ONLY supports decoding "x-www-form-urlencoded" bodies, yeah no JSON, it's that pathetic I'm sure I was using json with django without any problems in both directions. But you know, I'm different. Yep, Python has lots of problems, and I'm not sure I like it (especially after moving to Kotlin for 97.49% of the code). However, if you stay with Python, I'd recommend Django :)
- mattrp 8y agoI would just add that if you’re new to Django read https://simpleisbetterthancomplex.com https://simpleisbetterthancomplex.com - there are ton of detailed explanations that go deep in how Django can be extended. It’s definitely not the run of the mill tutorial blog that is only surface level.
- aldoushuxley001 8y agoYeah I can't recommend simpleisbetterthancomplex enough for anyone into Django. Great tutorials and articles about many issues you typically run into or just best practices for certain things. The guy who runs it even started a nice community forum that's been very helpful too.
- siquick 8y agoBrilliant blog Also a fan of these: https://wsvincent.com/ https://wsvincent.com/ (and his books are excellent) https://realpython.com/tutorials/django/ https://realpython.com/tutorials/django/
- orf 8y agoThis release includes the Watchman based reloader I worked on for about a year. It turns out auto reloading in Python is not an easy task, and I’m really nervous about edge cases I haven’t considered! I’ve actually had a nightmare where everyone’s auto reloader was broken. While it never runs in production (right?!) it’s actually a pretty critical bit of Django that had not been touched in about 10 years!
- simonw 8y agoCongratulations! What a great contribution, thanks very much for your work.
- jtchang 8y agoWell nothing like shipping code and letting all your users test it! Congrats.
- jacobian 8y agoThank you! The new auto reloader is better by quite a bit. Many people have talked about doing this over the years, but nobody's been willing to do the grunt work and figure out all the corner cases, until you. Nice job!
- rougeth 8y agoThank you!!
- andrewstuart 8y agoDjango is a magnificent piece of software. I'm an experienced ReactJS developer and I discovered Django after ReactJS and I am finding myself developing new projects not with React but just with plain Django/JavaScript/HTML. That's because of the nature of my projects of course which are simple crud applications, but the point is that for simple applications, Django makes things incredibly easy and fast and importantly, easy to understand. More sophisticated user interfaces I would definitely build in React of course.
- spapas82 8y agoThat's the real power of Django for me: Good ol' HTML based apps (with a little salt of jquery when needed) using the tools that Django (and friendly projects) generously offer to create Angels in a fraction of the time you'd need with anything else!
- coderunner 8y agoI'm coming from a systems and desktop background and looking into a web side project. My only experience with backend frameworks is a few months with Django for a small project at work. Is Django still a thriving development community? And is it able to handle a large amount of concurrent users? Basically is it a good choice for a backend for a new project? The web tech world moves really fast, and I like that Django has been around for years but wondering if it's still a good option.
- bshipp 8y agoI have an assortment of Django and flask-based websites and Django still works fine for new projects from my perspective, with the normal caveat that it really depends on what you want to do with it. If i had to redo some of my projects I'd probably use the Django rest framework more heavily as I ended up duplicating a lot of that functionality writing Ajax endpoints way back in the day, but I've not encountered issues where Django is the bottleneck in the system. Usually the bottleneck is a poorly optimised database index or something, which Django handles fine to a point. however, since I've ended up utilizing SQLalchemy and Pandas in a lot of my projects I have since tended to use Flask+SQLalchemy a lot more so my old fuzzy brain doesn't have to try and remember the variations between two different ORM syntaxes.
- coderunner 8y agoThanks, I appreciate the info.
- namelosw 8y agoI really hope Django can provide some front-end integration like Rails Webpacker or Phoenix does. Setting up a smooth SPA and proxy is such a grunt work which always something holds me back when I trying to set up a small project with Django.