News for hackers. Stuff that matters.
Re:Django 2.2 by amerine on Monday April 01, 2019 @10:28AM (#19543557)
Nice. Anyone building fun stuff using Django these days?
Re:Django 2.2 by Alex3917 on Monday April 01, 2019 @10:38AM (#19543682)
Django 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.

Re:Django 2.2 by sparkling on Monday April 01, 2019 @11:08AM (#19544054)
I 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.

Re:Django 2.2 by agiamas on Monday April 01, 2019 @06:12PM (#19548855)
Being 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...
Re:Django 2.2 by jamestimmins on Monday April 01, 2019 @11:22PM (#19550785)
Have you found a decent Rails counterpart to Django Rest Framework?

As an aside, I love seeing how different frameworks implement the same features.

Re:Django 2.2 by Godel_unicode on Monday April 01, 2019 @12:48PM (#19545285)
> better static file handling

Don't you just let nginx/CDN handle these?

Re:Django 2.2 by Nextgrid on Monday April 01, 2019 @02:58PM (#19546828)
I 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.

Re:Django 2.2 by ethagnawl on Monday April 01, 2019 @11:49PM (#19550927)
I think they meant the Sprockets/Asset Pipeline or whatever the new Webpack-based solution is.
Re:Django 2.2 by true_religion on Monday April 01, 2019 @08:24PM (#19549799)
Asset Pipelining is a dingo plug-in, but a built in for Rails.
Re:Django 2.2 by nicoburns on Monday April 01, 2019 @11:41AM (#19544486)
IMO 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.

Re:Django 2.2 by BuckRogers on Monday April 01, 2019 @03:02PM (#19546878)
I 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.

Re:Django 2.2 by somecallitblues on Monday April 01, 2019 @03:40PM (#19547326)
But then you’re in Microsoft echo system. No bueno.
Re:Django 2.2 by mosen on Monday April 01, 2019 @06:27PM (#19548985)
Would you mind expanding on this?
Re:Django 2.2 by BuckRogers on Thursday April 04, 2019 @09:36PM (#19578867)
People with that mentality aren't rational. If MS offers the best product, which they do for an awful lot of tech, especially once you start valuing integration & support, you should use it. It's actually pretty tough to beat, even if there's guys like that who don't believe in using "best of breed". Using "what you know" is usually best from a developer standpoint, but Microsoft has many best-of-breed products, much to his dismay.
Re:Django 2.2 by nicoburns on Monday April 01, 2019 @09:15PM (#19550155)
Indeed. And PHP has surprsingly good support for typing these days!

I've been giving C#/Asp.Net Core ago since it's been open sourced. I'm loving C# the langauge, but I wish the ecosystem was as rich as the PHP/JS ecosystems.

Re:Django 2.2 by conradfr on Monday April 01, 2019 @11:58AM (#19544700)
Php-wise Symfony is easily on par with Laravel and a really well managed project.
Re:Django 2.2 by blowski on Monday April 01, 2019 @01:59PM (#19546147)
Symfony 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.
Re:Django 2.2 by mtberatwork on Monday April 01, 2019 @01:53PM (#19546041)
Why would it be on par? Laravel is built with Symfony. [1]

[1] https://symfony.com/projects/laravel

Re:Django 2.2 by Longhanks on Monday April 01, 2019 @11:49AM (#19544600)
For Java there's Spring, which is like an entire universe in itself.
Re:Django 2.2 by innocentoldguy on Monday April 01, 2019 @07:27PM (#19549431)
I’m quite fond of Phoenix and think it compares favorably with Rails and Django (I’ve never used Laravel).
Re:Django 2.2 by auvi on Monday April 01, 2019 @10:47AM (#19543779)
I think you are missing the elephant in the room: Ruby on Rails.
Re:Django 2.2 by Alex3917 on Monday April 01, 2019 @10:53AM (#19543850)
With 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.

Re:Django 2.2 by dcbadacd on Monday April 01, 2019 @12:45PM (#19545265)
> - 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.

I disagree about this, there's not even a basic user signup flow plugin with page templates that would allow SSO and U2F, it was so when I was looking at it three months ago. With Flask I can use Flask-Security, Flask-Dance and I have user signup, pw resets, SSO. With CSRF protection out-of-box and bunch of other security features are easy to turn on compared to Django. What I did like about Django was the idea and maybe I would've liked Django-Admin if I didn't have to reinvent three wheels out of four.

Re:Django 2.2 by Alex3917 on Monday April 01, 2019 @02:06PM (#19546230)
There was a mailing list discussion about building U2F into Django, and I agree that should get done.

I don't know a ton about SSO, although I'm more skeptical about building it into Django only because there are many different ways you might want the business logic to work, so to me that suggests using a library for that might be more appropriate than having it built into the framework.

Re:Django 2.2 by dcbadacd on Monday April 01, 2019 @02:37PM (#19546584)
There's not even a good 3rd party library, I spent like a day testing all of them out and it's so cumbersome compared to what I had to do with Flask-Security and Flask-Dance.
Re:Django 2.2 by Alex3917 on Monday April 01, 2019 @04:04PM (#19547601)
Fair. I had the same issue a few weeks ago implementing OAuth as a provider. There is a library that is reasonably functional, but the documentation is so bad that if you followed it verbatim there would be huge security holes in your app.
Re:Django 2.2 by _visgean on Monday April 01, 2019 @01:57PM (#19546117)
U2F and django was easy last time I have done it. Which was about year ago.
Re:Django 2.2 by driverdan on Monday April 01, 2019 @12:28PM (#19545059)
I'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.

Re:Django 2.2 by ablerman on Monday April 01, 2019 @01:14PM (#19545600)
I 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.
Re:Django 2.2 by driverdan on Monday April 01, 2019 @10:53PM (#19550648)
Could 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.

Re:Django 2.2 by mtberatwork on Monday April 01, 2019 @11:33AM (#19544385)
Django's documentation is also simply top notch.
Re:Django 2.2 by paulddraper on Monday April 01, 2019 @11:42AM (#19544496)
> What exactly would you get in terms of benefits from switching to Ruby?

You'd get Ruby on Rails.

Re:Django 2.2 by robdachshund on Monday April 01, 2019 @11:53AM (#19544644)
Python 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.

Re:Django 2.2 by vonseel on Monday April 01, 2019 @04:17PM (#19547732)
Django 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.

Re:Django 2.2 by iwebdevfromhome on Monday April 01, 2019 @11:36AM (#19544416)
Symfony is a great php framework too
Re:Django 2.2 by paddy_m on Monday April 01, 2019 @11:20AM (#19544222)
I 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.

Re:Django 2.2 by jacobkg on Monday April 01, 2019 @10:41AM (#19543707)
The WorkFlowy (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/#...

Re:Django 2.2 by scriptkiddy on Monday April 01, 2019 @11:47AM (#19544580)
I'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.
Re:Django 2.2 by is0tope on Monday April 01, 2019 @11:43AM (#19544512)
I'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

(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.

Re:Django 2.2 by abledon on Monday April 01, 2019 @12:09PM (#19544828)
cool, 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.

Re:Django 2.2 by is0tope on Monday April 01, 2019 @12:28PM (#19545066)
That 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.

Re:Django 2.2 by reustle on Monday April 01, 2019 @10:43AM (#19543731)
I 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.
Re:Django 2.2 by bredren on Monday April 01, 2019 @11:06AM (#19544023)
I’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.

Re:Django 2.2 by spapas82 on Monday April 01, 2019 @05:03PM (#19548203)
Me 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)

Re:Django 2.2 by airstrike on Monday April 01, 2019 @10:40AM (#19543696)
Re:Django 2.2 by yash1th on Monday April 01, 2019 @02:04PM (#19546212)
The article was almost 3 years old now. I wonder what they've changed since then
Re:Django 2.2 by godzillabrennus on Monday April 01, 2019 @11:28AM (#19544333)
I’m building a tool that will require recruiters pay technical people to speak with them about a job.

http://www.joinjune.com

Re:Django 2.2 by mattrp on Monday April 01, 2019 @11:56AM (#19544674)
We 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.
Re:Django 2.2 by frankwiles on Monday April 01, 2019 @10:49AM (#19543794)
We work with a bunch of interesting clients all using Django. Most recently we helped upgrade 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.
Re:Django 2.2 by wenbin on Monday April 01, 2019 @11:38AM (#19544454)
Re:Django 2.2 by wepower_ico on Monday April 01, 2019 @10:34AM (#19543628)
Definitely.

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.

Re:Django 2.2 by acidburnNSA on Monday April 01, 2019 @03:58PM (#19547528)
I'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.
Re:Django 2.2 by akx on Monday April 01, 2019 @11:44AM (#19544519)
The web bits of our ML platform at https://valohai.com/ are Django through and through.
Re:Django 2.2 by mariocesar on Monday April 01, 2019 @10:45AM (#19543749)
Almost anything, for me is like the only one-to-go that hits all the most important things for a project.
Re:Django 2.2 by theli0nheart on Monday April 01, 2019 @10:31AM (#19543593)
Me! Have been for over 10 years. Still chugging away. :)
Re:Django 2.2 by epberry on Monday April 01, 2019 @10:50AM (#19543816)
Our whole web stack and api, 5 separate domains.
Re:Django 2.2 by champagnepapi on Monday April 01, 2019 @10:42AM (#19543716)
yeah! We use it at https://www.hungryroot.com/ We use Django 2.0
Re:Django 2.2 by diminoten on Monday April 01, 2019 @11:22AM (#19544256)
If you want fun and aren't afraid of some AWS, I highly recommend Zappa: https://github.com/Miserlou/zappa

It's an amazing little piece of software, I am gobsmacked by how complete it is.