Having read some great things about the Django framework I'm becoming quite interested in it. But before making my decision to use it for a small project I would like to hear some more down to earth opinions: Please write of your experience with the framework beyond the usual "toy" website and how well it compares generally with other major web frameworks (ASP.NET, RoR, etc.)
warning: shameless self promotion follows
I use django, and I've written up a bit about my experience with it.
It's not bad, it gives you a great starting point, but at some time in the future, you'll find yourself fighting it, or doing things without its help, because it's easier that way.
For instance, the automatic admin interface is fine for simple things, but eventually you'll want to create a very costumized interface for managing your website, and the auto admin site just won't cut it.
I built a newspaper CMS to bring my student paper online in college. Django was the perfect fit (I found RoR unintuitive and frustrating). I was able to develop rapidly in a language I loved, supported by an excellent community and with a wealth of documentation. It abstracted-out just enough to speed development and gave me enough power to design a system that did exactly what I needed. I didn't feel locked in, but I understand that some do. This is a compromise you implicitly make, it's part of the buy-in with any framework. The only "framework" that fits everyone's needs for the life of their project is no framework at all.
The important question is not whether or not you are trapped in a box, but whether or not you are able to step outside the box when the time comes. To this end I'll argue that no framework is very good at this at the moment, but I believe Django deserves some credit here because the Django guys & gals definitely know this. To quote Jacob Kaplan-Moss, one of Django's co-creators:
It’s important to realize that the most important kind of inter-operability is with the user’s code, and frankly web frameworks often suck here. A basic truth of software is that as it grows and matures it becomes more and more domain-specific, and less and less generic. I’ll talk more about this below; the important part for now is to realize that general frameworks should be able to cede control to domain-specific replacements as the stack grows. For the most part, frameworks don’t.
- Snakes On The Web (an excellent article)
We can only hope that we'll see Django reach a place where you can "outgrow it" comfortably, and in fact I'm confident it will. Any framework will speed development, but if you opt for Django you'll be in very good hands.
The company that currently rents my brain is using Django as a replacement for a big stack of java based technologies. We are not doing anything external facing yet - mostly internal applications with small load.
What got us hooked was, frankly, two-fold:
- Python (much more expressive, yet more concise, than Java)
- The Django community
Communities for other alternatives had an almost belligerent attitude towards newbies - that has not been my experience with Django - and in general tended to elevate the framework to the status of "the one to rule them all". As you can tell by the answers here - Django people tend to see the good and the bad; very refreshing.
Matt Baker's mention of "Snakes On The Web" is right on. The job of a framework is to make the boring, repetitive stuff easy; and the hard, interesting work doable. IMO Django delivers here because of its philosophy.
Somethings are still evolving... Schema migration, for instance, is an area that doesn't come defined with the main Django framework (you can always use South, but it currently is an add-on). Multiple database support is non-existent (but, allegedly coming in 1.2). If you want - like we do - use SQL Server as a back-end; there are hoops to jump.
But the latest release is 1.1.1!!! This is a young framework.
Now, I have no idea what kind of project you are about to undertake. If it is something really, really large, I can't - based on my experience - allay any concerns about scalability. Maybe this talk by Carl Henderson might give you some visibility there... But the talk is probably a bit dated by now...
Finally, seriously, with a beautiful mascot in a great color scheme, what is not to love?
Edit: For someone coming from Java, with its .war files and tomcat; deploying Django sites is a pain in the proverbial arse. I know Python is awesome, but maybe we could depart from Python here and just mimic the ease of deployment that Tomcat provides?
Given a choice between Java and Python/Django, I chose Python & Django.
Our requirements were approximately 3 versions of one PowerPoint slide. Which was wrong.
I expected dramatic, unplanned, unforeseeable, devastating changes to the application with alarming frequency. Duck typing is essential to responding to devastating change.
I could not imagine how we would manage this kind of dynamic development environment in Java/Tomcat, etc. I could imagine handling it in Python using Django. Django's DRY approach makes life quite simple.
We had to build fairly complex and secure web services without any concrete requirements. Each draft was going to be a new experiment. Django supported this nicely because it is essentially a RESTful engine with support for JSON.
Only Python and Django can support this kind of "immediate response to change" ad-hoc software development.
I'm not sure that you can reasonably compare Django and ASP.NET. With Django there's no alternative to a deep knowledge of HTML and, if you want browser based functionality, Javascript. ASP.NET will let you avoid a good deal of that knowledge if you like using web forms design.
On the flip side, with Django's ORM you don't need to know too much about SQL databases since you're not going to be interacting with database directly.
I did one project in Django and was impressed with the documentation, quality, and scope of the product. Unfortunately, I was using .96, and a number of breaking changes were introduced in version 1.0.
Last year I worked for a large Seattle company that does streaming media on the Internet. One of the things I wrote for them was a REST web service, and I used Django.
I had a completely positive experience with Django, start to finish. The documentation is excellent (The Django Book was great!) and it was easy to get started. I also really liked the Django ORM; you don't even need to know how to write the create statements to build an SQL table, the ORM can do even that.
The application just worked. It was rock solid stable. I had a prototype running for months on an underpowered old computer, and it never fell over due to memory leaks or for any other reason.
The final service had multiple servers in a cluster. As recommended in The Django Book, I used memcached to speed up the most common queries. The servers were lightly loaded by the service, and the service could have run on older/slower servers if it had been necessary.
I'm not much of a fan of SQL. It was great to be able to write a for loop or even a list comprehension in Python to pull records from the database, to tally up some statistics, or even clean out some records for development or debugging purposes. And the admin interface is a real plus as well.
That was the first production Python application at that company, but I wouldn't be surprised if Python/Django got used for something else there in the future, because the project was a success.
I recommend Django without hesitation, especially if you are already a Python fan.
As for me, django is a perfect fit for startup because
- So little to start with
- Comprehensive documentation
- Many built in component a.k.a reusable application
- Takes less hardware resources
- Built with python
- Supportive and vibrant community
For me (as a solo hobbyist/part-time developer) building a relatively complex scheduling app for my organization the critical benefits offered by Django are:
- Awesome community (#django, mailing lists)
- Incredibly well documented with ancillary materials (DjangoBook)
- Python, python, python