Live data from Hacker News

Ask HN: Where is the Django community?

news.ycombinator.com

81–90 of 167 posts

Re: Ask HN: Where is the Django community?

#81
I'm not sure I believe the RoR community is larger than the Django community. I do believe it is more vociferous, though, which seems to be indicative of the general difference in communities between Ruby and Python.

It really doesn't matter which you choose. You will hit points with either where you are tearing your hair out trying to figure out how to do something. You'll find good peopke to help you in both communities. Eventually, that phase will pass and you will achieve Zen, until the next shiney framework shows up. :)

Personally, I really like Python as a language, so that's my path to Zen. Yours may be different.

Re: Ask HN: Where is the Django community?

#82
post #6

Let me tell you the truth, though this will not be popular: Django is not a good framework. It's clumsy, inflexible and restrictive. The community is pretty much dead. If you want to work in ruby, go for ror. If you want to work in python, go for a micro framework like Bottle. I made the mistake of investing a lot of my time in Django. It was not worth it in the end. All my Django projects ended up being a big mess,…

I complain about Django all the time, it seems like things could be done better. But I think I'm better with it than without it. It takes care of the vast majority of security issues out of the box. Does bottle do similar?

Re: Ask HN: Where is the Django community?

#83
post #38

tl;dr; (Not meant as a smart-ass comment but...) they're busy building stuff. I think one of the interesting with Django is just how easy it is to get started with it without prior programming knowledge. I believe this has to do with Python itself and the great docs on Djangoproject.com Just start doing the tutorial and voila. This has introduced a large amount of new programmers to Django and Python, making it gain…

I think one of the interesting with Django is just how easy it is to get started with it without prior programming knowledge. Wait, you're kidding right? Django is positively horrible for beginning programmers because it's a gigantic framework with an insane learning curve, and if you haven't done much/any webdev before it's almost impossible to learn. Sure, you and i can pick it up in a weekend, but i don't think it…

I love working with Django, consider it a beautiful tool, and feel significantly more productive with it than any other framework I have worked with.

However, I did not get into Django to learn how to program (or to learn how to program with Python). Rather, I got into Django after I already had experience programming in Python and several other languages. Consequently, I didn't have to learn how to think like a programmer (or how to translate my thoughts into Python), rather I had to learn how to use Django to make building web apps easier.

Forgive me if this is unpopular, but I actually agree with this comment. I don't think Django is great for beginning programmers. However, I think that any sort of abstraction is bad for beginning programmers. In fact, I would go so far as to argue that beginning programmers should arm themselves with a very basic text editor, a list of assignments, and some source code written by extremely good programmers.

Re: Ask HN: Where is the Django community?

#84
post #45
post #13

Earlier quoted context omitted.

web micro frameworks are evil although they don't look like that in the beginning, I advice to avoid them by all means. IMO, even though pylons 1.0 is now frozen, it is still one of the most flexible frameworks out there.

I like pylons a lot and I am using it for few projects, but I hate dependecy on many libraries, things get complicated this way very soon. For smaller sites I recommend web2py - it is one package and it is very straightforward and easy although Pylons seems to be more flexible.

dependencies are taken care of by pylons once it gets installed. I like that Ben made it this way because many of these dependencies can be reused in other projects.

Re: Ask HN: Where is the Django community?

#85

tl;dr; (Not meant as a smart-ass comment but...) they're busy building stuff. I think one of the interesting with Django is just how easy it is to get started with it without prior programming knowledge. I believe this has to do with Python itself and the great docs on Djangoproject.com Just start doing the tutorial and voila. This has introduced a large amount of new programmers to Django and Python, making it gain…

Yep. The docs are top-notch. Definitely the best documented open-source project that I work with/on.

It's python and everybody knows python > ruby (also vim > emacs).

The only real wart for me is django.contrib.auth.models.User -- we should be able to easily replace the main auth model and not extend it. It feels like a real anti-pattern sometimes.

Re: Ask HN: Where is the Django community?

#86
post #13

Earlier quoted context omitted.

web micro frameworks are evil although they don't look like that in the beginning, I advice to avoid them by all means. IMO, even though pylons 1.0 is now frozen, it is still one of the most flexible frameworks out there.

Care to qualify this highly general and rather hyperbolic statement? Which specific aspects of "micro" frameworks do you find to be "evil"?

micro frameworks provide incomplete feature set. You tend to reinvent the wheel many times. I see no advantage in using them when I can have something more complete and feature rich.

Re: Ask HN: Where is the Django community?

#87
I think one of the reasons that RoR might seem bigger is because RoR is a much bigger part of the "Ruby experience" than Django is for Python. Rails had a huge hand in making Ruby what it is today and I think you'd have a hard time finding a Ruby dev that wasn't introduced through Rails.

This isn't true of Python, though. Most people are Python coders first, web framework users second. Their level of experience with Python has a part in dictating what they're looking for in a web framework and many experienced Python devs are more attracted to small or micro-frameworks like Bottle, Flask, web.py, etc. Django has never been the "one true web framework" for Python the way Rails is for Ruby. Personally I have never touched Django, just Flask and web.py.

Also, if you are going to base your framework usage on its popularity in comparison to Rails you're going to have a tough time ever being satisfied. When has any framework (web or otherwise) generated the same level of cult following as Rails? The Rails community is an absolute outlier in the open source software world (and I mean that in a positive way).

Re: Ask HN: Where is the Django community?

#88
post #6

Let me tell you the truth, though this will not be popular: Django is not a good framework. It's clumsy, inflexible and restrictive. The community is pretty much dead. If you want to work in ruby, go for ror. If you want to work in python, go for a micro framework like Bottle. I made the mistake of investing a lot of my time in Django. It was not worth it in the end. All my Django projects ended up being a big mess,…

As someone who's been using Django since the magic removal branch, its documentation is top notch, not to mention the lack of magic makes it very usable, supportable, and build-able on. I can say definitely what's going on from the top layer to the bottom layer without any black box behaviour. Rails is full of sloppy coding, lots of magic, coders who think that return is an keyword, and bad practices. I have no probl…

Return is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb....

Re: Ask HN: Where is the Django community?

#90
post #28
post #6

Let me tell you the truth, though this will not be popular: Django is not a good framework. It's clumsy, inflexible and restrictive. The community is pretty much dead. If you want to work in ruby, go for ror. If you want to work in python, go for a micro framework like Bottle. I made the mistake of investing a lot of my time in Django. It was not worth it in the end. All my Django projects ended up being a big mess,…

In what ways is Django clumsy, inflexible or restrictive?

I don't want to be defending the OP's position, but. . .

settings.py is a mess. Even Simon's written a post bashing it (http://simonwillison.net/2009/may/19/djng/). I cringe a little starting up a project and having to dive into the settings.py file.

In some ways, Django tries to be flexible, but it's clumsy. For example, you can have your templates in your app directories. So, you have /path/to/project/posts/templates and /path/to/project/people/templates. However, you can't just put your templates in there because Django doesn't namespace them. Like, if I do {% extends "people/base.html" %} it will look in both those template directories for a people folder. It won't be like, "oh, I should look in /path/to/project/people/templates/base.html". I have to put the template in /path/to/project/people/templates/people/base.html. That's clumsy.

urls.py is another flexible/clumsy thing (IMO). Django wants me to write a regexp for the simple cases. It's kludgy to do r'^people/(?P\d+)/?$' just to have a URL with an ID in it. And other frameworks have been able to offer the power of regexps for the case where you want them while making the common cases a lot easier.

Django caches certain things and if you try to change it at runtime, well, it doesn't change.

Django's reusable apps aren't that reusable. They were a lot more reusable than Rails' apps, but the Rails team has worked on that a lot - especially with 3.1 and how each app can have its own assets (images/css/js) all namespaced and neat and tidy. There isn't as much utility there as advertised. Like, if I want to use a Django "reusable" app, I often have to manage images/css/js manually, figure out where to put them, etc. This is one of those interesting ones. Like, I have my /var/projects/cool_project directory, but if I put the reusable app under that directory, then I need to have both /var/projects/ and /var/projects/cool_project in my pythonpath which feels wrong. It also feels wrong to put it directly in the projects dir since it isn't a project on its own.

Django doesn't really have init hooks. Like, you can stick random code into the models.py files for installed apps and they'll be loaded when the app is initialized and so you could set things then and, well, it's python so the __init__.py files should get loaded. However, no one seems to talk about it. Granted, almost no one in the Rails community talks about init files, but it seems a tad more common. I mean, it's Python and so clearly one can write Python, but while Django is extensively documented for what I'll call "blessed features", I wish there was a little more talk about making alterations at startup.

I never really warmed to Django's forms. They're fine, but they don't feel good. I hesitate to say this one because my argument is "they feel clumsy" and I'm sure many agree with that and many disagree with that.

Here's one that recently got resolved: nearly everyone had written their own wrapper around render_to_response so that they wouldn't have to do render_to_response('tpl_name.html', {}, context_instance=RequestContext(request)). In Django 1.3 they added the awesome render(request, 'tpl_name.html', {}). It's not even a big thing, but it felt so clumsy before to have to set a kwarg with such a long object name.

Rails has really settled on that Gemfile and you can use pip/virtualenv and requirements.txt, but it doesn't seem to be as much of a thing. Like, it isn't always about what can be done as much as what is done sometimes. Plus, the Gemfile makes the app require the libraries. I'd have to also add them to settings.py or somewhere else. And I'd potentially have to add it to INSTALLED_APPS and TEMPLATE_CONTEXT_PROCESSORS and MIDDLEWARE_CLASSES since you can't just install an app and have it work in those places without naming it specifically in settings.py

Here's a counter example. Let's say that no one agreed on what the main content block would be called in base templates - or that base templates would be "base.html". It would make templates from reusable apps useless since they might be {% extends "home.dj" %} or {% extends "layout.tpl" %}. They could have {% block main_content %}. It does matter what people do in practice sometimes.

Really? No migrations? I have to resort to a third-party project? I should have the SQL sent out to my terminal, go into my database, figure out the deltas and apply the SQL? While I'm on database stuff, would it kill Django to specify InnoDB and UTF-8 for MySQL when creating tables? I get it, most of them use PostgreSQL and I like PostgreSQL, but I'm not always using it and it's a sensible default to go with InnoDB and UTF-8 unless told otherwise - and loads of people don't know or forget to set that as the MySQL default.

Now, I could also write one of these about Rails if I wanted to. Anything that has worth will have plenty of warts. It's the nature of creation. I wouldn't write this unless I cared a lot about Django. I enjoy using it. But there will always be things I'm not fond of in it (or in Rails, or anything else - even if I created it).

For myself, the thing I don't like most about Django is the "well, we didn't think of it/need it and there's a third party project so, well, I guess we're not going to go there" situation that I feel sometimes. Now, I wanted to stress that this is a feeling more than something objectively accurate. Migrations are one of those things. User authentication, an admin section, a basic CMS, sitemaps, lorem ipsum, textile, markdown, restructured text, a list of US states, a comments framework, etc. all have made their way into Django. Now, those are some useful things. I don't need all of them on every project, but batteries are nice (even if they're those D batteries and I don't have a device that uses them). However, migrations are a tad fundamental. Likewise, it was many years before the messaging framework worked for non-logged-in users (like Rails' flash). Yes, many people had put out a little package that one could use, but (without something awesome like a Gemfile) it takes more than a little setup. I mean, it isn't arduous, but it isn't free. And the point of frameworks is what they do for you for free. Heck, someone posted on django-developers a couple months back about prepared statements (http://groups.google.com/group/django-developers/browse_thre...). If you've seen Aaron Patterson's presentation on Rails and prepared statements (http://www.youtube.com/watch?v=kWOAHIpmLAI), you can see the benefits of them. Prepared statements are in Rails 3.1. The message on django-developers seemed to get a very luke-warm response because Django has kinda decided that they don't want to deal with connection pooling - after all, there are already third party libraries for that (even if they aren't so integrated and require more user setup and work). So, the fact that Django doesn't want to deal with connection pooling means that the great speedup that could be had from prepared statements won't happen. And yes, I could put the patches on myself and when Django makes new releases re-apply the patches (and figure out if anything broke) and deal with potential edge cases where the patch wasn't right, etc. and set up a connection pooler and get my prepared statements and the speedup that comes with them. But that's kinda kludgy and feels restrictive. And for a framework that likes PostgreSQL, they're missing out on a large speed bump by not using the query planner effectively.

Again, I could make a list about Rails or any sufficiently large project (it's hard to criticize web.py or something since the retort would simply be "it isn't meant to do that"). This doesn't mean that Django is bad or that I dislike Django - it's quite the opposite. Personally, I don't care about things I don't like. People are free to do as they like. However, when there's something that I'm 95% "wow, that's awesome", the 5% that I'm like, "omg, this is crap" bothers me. I'm not sure if you were looking for a response to "what's so clumsy, restrictive, etc. that one shuldn't use it". If that was your question, well, I think people should use Django (and Rails). But just because something is good, doesn't mean that it doesn't have clumsy pieces that will annoy you.

Post reply on HN