Live data from Hacker News

Django 3.2

djangoproject.com

101–110 of 195 posts

Re: Django 3.2

#101
post #70

Earlier quoted context omitted.

I was forced to fall on this trap once: a guy has a small Flask app up and running, and he asked for help to implement: an ORM with migrations, an Admin and form validation (among other things that had nothing to do with Django such file parsing). I suggested to migrate the app from Flask to Django while it was small and simple, but he refused for Django is "too big and complicated". OK, then. We ended up creating a…

I like to paraphrase Greenspun's Tenth Law in this context: "Any sufficiently complicated Flask app contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Django"

I love the paraphrased quote. It’s a bit ironic in that Python programmers love the batteries included standard library but quickly jettison that idea when it comes to Django vs Flask.

Flask’s marketing of a simple route decorator makes it seem light weight but once you add everything else it becomes Django.

Re: Django 3.2

#102

Earlier quoted context omitted.

A couple of years ago(2014) I made my first Python website and really enjoyed, however when it was time to put it onlin I quickly discovered that setting up hosting and configuring it was as large a task in getting to know pip, env, unicorn, apache2 and a plethora of other software to host it, is this still the case? Becaue this is what keeps me of hosting websites with python.

I recognize this from some years ago, but it's not an issue any longer, as long as you go to a modern host (ie. Heroku). The old "optimized for PHP"-hosts still make things hard of course...

Having set up some php servers myself: it's not a lot harder to host a python app. It is mostly the that hosters have optimized for php but you could do the same for python

Re: Django 3.2

#103
post #17

If anyone is curious I just updated my Docker / Django starter project to use 3.2. It uses Docker Compose + Django + Celery + PostgreSQL + Redis + Webpack + TailwindCSS and it's available at: https://github.com/nickjj/docker-django-example As an aside it's also using TailwindCSS 2.1 with the JIT compiler enabled.

Why celery and redis? Couldn’t you consolidate with just redis? Love the stack though

Django_Q instead of Clerery

Re: Django 3.2

#104
I haven't used Django except as an ORM and it was a terrible experience. Anytime I wanted to update an existing relationship, it was a pain. I've heard a lot of good stuff about it when used as a web framework but I was really baffled by the ORM.

Re: Django 3.2

#105

I'm more if a flask man myself. Worked with django only when I had to. Maybe I'm wrong?

As a rule of thumb, Flask is good when your app will only ever need to be a single file. Otherwise, as other commenters have said, you're basically reimplementing Django badly.

Re: Django 3.2

#106

Django is the gold standard for consistently pushing out reliable, well documented open source software without any marketing fluff or other bs. The amount of value the team is adding to the world can't be overstated.

A couple of years ago(2014) I made my first Python website and really enjoyed, however when it was time to put it onlin I quickly discovered that setting up hosting and configuring it was as large a task in getting to know pip, env, unicorn, apache2 and a plethora of other software to host it, is this still the case? Becaue this is what keeps me of hosting websites with python.

I had similar issues with Django where I felt that running on localhost was fine, but getting it production ready was a headache.

Huge shoutout to dokku[1] which I used on my latest deployment and it makes it super easy. Lets encrypt support was the easiest I've seen and you redeploy with git push.

[1] https://dokku.com/docs/getting-started/installation/

Re: Django 3.2

#107

Congratulations to the Django project and contributors on a big LTS release. And a huge thank you for the consistently excellent framework that so many have built their web dev careers on. I'll post this as a Show HN soon, but I'll mention it now as a soft-launch introduction. After a decade of using Django I started a project I always wanted to exist: backported security and bug fixes to old versions that the Django…

As someone maintaining a bunch of django services in need of TLC, this could be a lifesaver for me. Thank you!

Re: Django 3.2

#108

Earlier quoted context omitted.

A couple of years ago(2014) I made my first Python website and really enjoyed, however when it was time to put it onlin I quickly discovered that setting up hosting and configuring it was as large a task in getting to know pip, env, unicorn, apache2 and a plethora of other software to host it, is this still the case? Becaue this is what keeps me of hosting websites with python.

You can always shortcut things by using Docker

You'll still have to configure gunicorn or another production-ready (w|a)sgi server to serve the app out of the container, but it's much easier to manage dependencies for django in a containerized environment. It's even easier if you use a deterministic package manager like pipenv or poetry instead of old requirements.txt files

Re: Django 3.2

#109

Any one have any pointers to learn the Django stack from the basics? Any specific video course or a book? "Two Scoops of Django" was recommended to me by someone on HN. I think it is currently being worked on for Django 3. It is on my reading list.

Tango with Django was by far the best resource I've used.

Two Scoops is more for people who have a django project already and want to learn best practices of django.

Re: Django 3.2

#110
post #93

For those of you with a big portfolio of apps, how do you handle framework updates? Scheduled housekeeping once a quarter? Ad hoc? Ignore them until a disaster happens then panic?

I generally develop against django master with loud warnings. Whenever a warning comes up, such as `DEFAULT_AUTO_FIELD` not being specified, or a behavior change such as `SECURE_REFERRER_POLICY`, I go through and apply the same change to _all_ my projects at the same time.

So I'm applying minor changes to multiple projects at the same time as I become aware of the new changes. Once the new Django version comes out, they're basically ready to go live with the new version.

Post reply on HN