Live data from Hacker News

Django 2.0 released

docs.djangoproject.com

91–100 of 177 posts

Re: Django 2.0 released

#92
post #29
post #21

Earlier quoted context omitted.

I would rather use Flask for that.

To me the beauty of a restful API in flask is that you don't need to commit to anything. As far as the user is concerned, as long as /api/v1/user/15 gives back the user details for user number 15 (after checking authorization if necessary). The person who follows in my footsteps should be able to rewrite things one end-point at a time (as long as we clean things up after every transaction) in any other language (go l…

This can be achieved with any framework.

(1) Write your new endpoint. (2) Proxy to it via your old one.

Or for a full re-write you might want to do things the other way.

(1) Wrap the whole old app with a skeleton of the new one - just proxying the endpoints for now. (2) Start replacing the endpoints.

Re: Django 2.0 released

#93
post #72
post #18

Serious question: is the famous bug of correctly annotating multiple counts fixed now?

Huh, I'm a big Django user but not heard of this. Link? :)

Me either

I am guessing it is one of the points where the ORM breaks down.. which the answer is "use rawSQL"

Re: Django 2.0 released

#94
post #35

Earlier quoted context omitted.

> This is probably your best bet if you're just going to build a nice CRUD frontend for a business app, possibly with an API (via DRF). If I had to choose a framework for a web API these days, I would go with something that is async from the ground up.

Why? Async isn’t cost free - it’s more complicated and that complexity comes at a cost. If your company has only basic needs, you have to question whether you’re providing the best value for your company by doing anything more.

> Why?

Because we are getting more and more CPU cores to utilize. I don't think this trend will stop soon. The software stack will have to adjust to this and it already does. The next generation of mainstream (highlevel)languages/frameworks will be those that are designed to easily utilize CPU cores. It may be more expensive for now, but it might pay out later and I think it's much more exciting. ;)

Re: Django 2.0 released

#95
post #27
post #21

Earlier quoted context omitted.

I would rather use Flask for that.

I am learning Python right now and want to build a website using this programming language. Django and Flask seem to be the best frameworks for this purpose. I understand that Django has steeper learning curve and comes with "everything", whereas Flask is more modular and compositional. If I were to use Flask, is there anything that I could not do but that Django could?

If you are learning python, I would stick with Django. It'll get the basics up and running for you and you can focus on python specific code. If you go with flask you'll need to be piecing everything together on your own, and then you're not just learning python, you're learning web application components and flask as well.

Re: Django 2.0 released

#96
post #32

Earlier quoted context omitted.

The advantage of Django is it comes bundled with everything you could need. Flask is simple, but then you need user authentication. Which library do you use? Is it updated and maintained? What about an ORM, forms, templating, localzation. Do they all work together? Suddenly it's not so simple. That being said, if your app really is simple (single file, under 100 lines) flask is excellent.

What I like most about Flask is, it provides the barebones for request/response handling, and gets out of your way. Add SqlAlchemy to the mix, and python handles the rest. I'm using Flask, but building my apps with Python. This simple/complex equation should be reversed IMHO. Want to throw together something quick? Go with Django, where everything you need is built-in. Want to build a big app? Go with Flask, and buil…

I've ever understood this argument. Any library you can pick and mix into your Flask app you could just as easily pick and mix into your Django app. It's all just Python.

Re: Django 2.0 released

#97
I wish they'd skip-jumped their version to "Django 3.0". That would have allowed a simpler message about the Python dependency: "Django 3.x requires Python 3.x".

Re: Django 2.0 released

#98
post #4

This is probably your best bet if you're just going to build a nice CRUD frontend for a business app, possibly with an API (via DRF). I am doing this right now on a project as it's the shortest path to a win. The API however is written in Java 8 / vertx.

We use Django for large single page GIS web apps that still always need some CRUD somewhere (e.g. configuration is done through the Django admin). Parts that Django doesn't do can still be done in Python.

What does GIS mean?

Re: Django 2.0 released

#100

Earlier quoted context omitted.

We use Django for large single page GIS web apps that still always need some CRUD somewhere (e.g. configuration is done through the Django admin). Parts that Django doesn't do can still be done in Python.

What does GIS mean?

Geographic information system. Dealing with maps, etc.

https://docs.djangoproject.com/en/2.0/ref/contrib/gis/tutori...

Post reply on HN