Live data from Hacker News

Django 2.2

djangoproject.com

121–130 of 257 posts

Re: Django 2.2

#121
I 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/). 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.

Re: Django 2.2

#122
post #22

Django/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")…

pandas.read_sql('select first_name, last_name, email from users', conn) this approach avoids the full data copy calling '.all()' materializes.

.all() doesn't actually do anything, and could be omitted. The beauty of this setup is if you need to rewrite the implementation of .to_dataframe() to optimize it, you can (e.g. to remove the .values() you're worries about and use your above code)

Re: Django 2.2

#123

I 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/ ). 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 ind…

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

Re: Django 2.2

#124

Earlier quoted context omitted.

Living in society today involves having others' political views forced on me every day, in the form of "you should accept the status quo and not speak up about it". Many people just don't understand this because the status quo is fine for them.

> Living in society today involves having others' political views forced on me every day Yes to some extent. Most secular and democratic societies has agreed to a standard that I defend. Call it status quo if you want. I think decisions like Djangos goes against that standard and is probably why I feel so strongly about this. They want to police speech and force everyone to use specific words. I don't think we should…

It feels to me, that people don't realize that there are probably a lot more people out there who speak English not as their first language, hence they don't have the same connotations of many words as the native speakers.

When I hear Django for example, first thing I think of is the slave from the "Django Unchained" Tarantino movie (or Django Reinhardt, the gypsy musician)...

Maybe this web framework shouldn't name itself after such a famous slave!...

Or from another point of view:

What a dick move was it from Tarantino to name his slave protagonist after such a popular web framework, which tries to be respectful, by avoiding references to slaves.

Also, I'm very much interested in the comment which sparked this thread.

I find it quite freaky, in a 1984-ish way, that it is completely inaccessible now.

What's next, flagging-people? Burning books is just a few steps away... You are a bit too trigger happy, maybe...

Re: Django 2.2

#125
post #111
post #85

Whenever 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 r…

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

accusing 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

Re: Django 2.2

#126
post #74

I'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…

A 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/

[2] https://github.com/johnfraney/django-front-end-validators

[3] https://docs.djangoproject.com/en/2.2/ref/validators/

Re: Django 2.2

#127
post #107

Earlier quoted context omitted.

i 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 th…

HN isn't a person, it's a distribution of millions of people. If you think of it as a statistical cloud, it won't seem so paradoxical (e.g. "bipolar"). I don't follow your reference to Nietzsche but if it's relevant here, the same point would surely apply to any group. I try not to lose too much sleep over problems with HN that stem from humans in general. It's hard enough to change the few things we can.

>HN isn't a person, it's a distribution of millions of people.

is obvious. what is insidious is the ideology that is preached on almost every controversial thread that papers over that fact.

Re: Django 2.2

#128
post #18

Earlier quoted context omitted.

Why do you feel the need to attack him? It's not as if he has attacked you personally.

i 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 th…

If you want to point out that something is irrational for a better discussion framework, you better prove it first. Otherwise it's just noise. Saying someone is silly and overly sensitive without giving him further information is like saying you are wrong without proof, with the insult on top.

Re: Django 2.2

#129
post #125
post #111

Earlier quoted context omitted.

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

accusing 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

Feel 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

Re: Django 2.2

#130

The 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…

I 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?

As a Django enthusiast and python programmer, I often want less magic from Django, not more. This makes pyramid or flask seem tempting to me. If I wanted Rails that badly, I would simply port my code to Ruby.
Post reply on HN