Live data from Hacker News

Django 2.1 released

docs.djangoproject.com

111–120 of 129 posts

Re: Django 2.1 released

#111

Open question re: django: https://docs.djangoproject.com/en/2.1/ref/models/fields/#nul... I've got a colleague who has been using django for a couple of years (and has 15+ years experience with python outside of web, as well as java, php, arduino hacking, 3d printing, etc). He pointed me to the link above re: nulls - I can't figure out why the default would be to convert a null to an empty string. All major databases…

> An empty string is "no user supplied data" and a null is "no value has been given at all"

I assume you meant "an empty string is user supplied an empty string as data".

That aside, you wouldn't normally switch that option on for a field (notice the default is false).

However, Oracle DB stores empty strings as indistinguishable from NULLs[0], so an ORM supporting Oracle DB may want to have some support for converting "empty or null" to an empty string at read time (notice the Oracle specific caveat in the docs in your link).

Once you have that, I'd guess the thinking is that you may as well let devs opt into that behavior (bear in mind that sometimes you're in the position of developing a new app against an existing db, that may or may not have another legacy app reading/writing from it at the same time).

0: https://stackoverflow.com/questions/203493/why-does-oracle-9...

Re: Django 2.1 released

#112

Earlier quoted context omitted.

Not OP, but I've also been using Django for (more than) my whole career and I use React on the frontend. If you're curious about the frontend path I took, it was roughly: * jQuery with no framework * Backbone (for a couple years) * Backbone + Marionette (for a couple more years) * Angular (for about a week) * React (for the past few years)

I’m curious what makes react your top pick?

Compared with Backbone, I was able to compose and re-compose component structures much more easily. Compared to Angular (which I admittedly don't really know) the API learning curve felt very short and I was able to wrap my head around it very quickly and be productive without constantly looking things up.

Re: Django 2.1 released

#113

Earlier quoted context omitted.

Not OP, but I've also been using Django for (more than) my whole career and I use React on the frontend. If you're curious about the frontend path I took, it was roughly: * jQuery with no framework * Backbone (for a couple years) * Backbone + Marionette (for a couple more years) * Angular (for about a week) * React (for the past few years)

Thanks for the input. Comments like these are insightful. What do you think of Vue.js?

I've heard great things about Vue.js (mostly on HN) but I haven't tried it myself. I'm pretty invested in React (I use it at work and for personal projects), and I find it to be a pleasure to use so I'm not actively seeking out alternatives.

State management with React is another story; I've used Reflux and Redux a lot, and am experimenting with Mobx now.

Re: Django 2.1 released

#114

Earlier quoted context omitted.

Not OP, but I've also been using Django for (more than) my whole career and I use React on the frontend. If you're curious about the frontend path I took, it was roughly: * jQuery with no framework * Backbone (for a couple years) * Backbone + Marionette (for a couple more years) * Angular (for about a week) * React (for the past few years)

When you moved to Angular and later to React did you have any jQuery heavy libraries? I'm using stuff like slickgrid[0], jquery-ui datepicker, json-editor[1] and wonder how I will drive these components from something like Angular or React? doh, quickly googled for the github links below and saw there now a slickgrid-es6[2] fork which I have not tried. But my question still stand: how do you drive jquery libs from ne…

Other users have already commented, but basically you can wrap jQuery libraries in React components and do a bit of extra work in the lifecycle methods (componentDidMount, componentWillUnmount, etc.) to manage the jQuery bits.

Once you've wrapped it in a component, you can more or less drop that component anywhere in your view hierarchy and not have to think about the fact that it's using jQuery under the hood.

This highlights one of my favorite things about React and similar frameworks, which is that it's the closest thing to actual, useful encapsulation of components I've seen in a frontend framework. It's not perfect, but it's much better than everything I used before it.

Re: Django 2.1 released

#115
post #98

Earlier quoted context omitted.

Not true. django-rest-framework is so well adopted and widespread and it lets you very quickly put together a REST service. If you just want to talk json/xml/whatever with your client, it is easy. But the really cool thing about DRF is how it simply generalizes some of the concepts that already existed in in Django. If you started in Django and learned about Form and ModelForm, you can easily pick up DRF Serializers…

>it could not succumb to CADT. I had to look up CADT. Got this via Google: CADT stands for Cascade of Attention-Deficit Teenagers

I love it.

Re: Django 2.1 released

#116

Earlier quoted context omitted.

Why would anyone consider it obsolete to begin with ? If anything, I would consider someone making that statement miss informed

There are not currently many well-known products that use it. (Bitbucket cloud being the exception.) That's not the best of reasons; just because Django is not used by Google doesn't mean it isn't the perfect tool for you.

Last time I checked, last.fm uses Django.

Re: Django 2.1 released

#118

Earlier quoted context omitted.

My roommate in College built a site with 0.96 of Django. It’s still running. I think it’s one of if not the longest running commercial Django websites.

I maintain a Django ecommerce site that's been running constantly since July 12, 2007 (at launch it was running against r4984, basically 0.96). Just upgraded it to 2.1 today.

Any struggle with the upgrade?

Re: Django 2.1 released

#119
post #78
post #61

Earlier quoted context omitted.

A huge reason some people consider frameworks like Django obsolete is because they are focused on an older web paradigm of constructing elaborate html pages on the server side and pushing it out and letting some basic extra js stuff augment it. That's what lead to things like server side HTML form definition and form handling code. After the emergence of things like React, Angular, etc those "html templating" facilit…

> an older web paradigm of constructing elaborate html pages on the server side and pushing it out and letting some basic extra js stuff augment it. Sounds like an awesome idea. > That's what lead to things like server side HTML form definition and form handling code. You make these sound like bad things. > those types of things conflict and overlap with things like React So why presume the thing to abandon isn't Rea…

The world needs more people like you. Thank you.

I have a very varied workload which includes both complex web applications and content driven sites (very basic, accomplishable-by-WordPress marketing sites). I had a client move their very basic portfolio + blog site to a new developer who rewrote it from scratch. The new site has a loading / splash page before the real site displays. It's entirely JS driven and ticks all the boxes for bad implementation (badly implemented fake links, no use of the history API, bad accessibility.etc).

I don't see how this is not a step backwards. Nothing was gained here except for some resume-driven development. Frankly, it strikes me as something that inexperienced developers do because they aren't aware of a world outside of React (or at the very least consider it to be obsolete).

Re: Django 2.1 released

#120
post #44

For anyone thinking about picking up Django and is worried about the framework being obsolete I encourage you to take a look. Django is fantastic. I've worked with it for a number of years now and it can really help in the early stages of prototyping. Things I especially like about Django: * The built in admin letting you edit and view objects easily. * Being able to use it without using the views. Add django rest fr…

Also very notable benefits: * Ease of upgrading between versions. This is especially critical and important if you have long lived projects. * Excellent documentation * Healthy community, contributors and project is run really smoothly by the team * Project is a foundation vs single point of failure ,aka main dev loses interest, comparative to other frameworks

> * Ease of upgrading between versions. This is especially critical and important if you have long lived projects.

This is such a big deal and I can't work out how the JavaScript community has been operating under its 'break everything in a week' model for so long with such high traction.

Django has a sane, predictable release schedule. Django has LTS releases with years of support. I work in an agency environment where applications can sit running for years without being touched, and when new work needs to be done - I can't have my entire dependency tree falling from under my feet (or arguably worse, abandoned) because people have decided that backwards compatibility doesn't mean anything.

It's so so hard to not be cynical about this. The entire development world feels like it's more-so every day geared toward time-rich development teams pumping out software in a startup environment frothing over the next big thing. I have to account for every hour of my time, switching between / training other developers on new-hotness JavaScript frameworks is unjustifiable.

Post reply on HN