In my last post here at the Blue Flavor blog, I discussed the need for a good content management system (CMS) for most modern websites. Although there are many pre-packaged CMS choices, building one specifically to meet the needs of your site is always an attractive option. Django (pronounced “JANG-go”) is a rapid web application development framework, built on the popular programming language Python, designed precisely to make the building of custom CMSes easier and faster than ever before.
A bit of history
Django was developed at The World Company in Lawrence, KS—a newspaper company widely recognized as one of the most innovative new media outfits in the country. It began in 2003 as part of a project to build the next great newsroom CMS. In the summer of 2005, The World Company split the CMS project into two components: Django, an open-source, generic framework for building web applications (and especially CMSes), and Ellington, a commercial CMS targeted at news companies, which was built using Django.
Two years later, Django is by far the most popular web app framework for Python, and, along with Ruby on Rails, is helping to shape the face of modern web development. It has received much praise from Python creator Guido Van Rossum, and is in use at some of the world’s most recognizable Internet, media and technology companies. A few of Django’s more familiar users include Google, HP, The Onion, and The Washington Post.
Python, the language Django is written in, is also well-represented at the highest levels of Internet stardom, as it’s the language powering YouTube, and it comes bundled with nearly every Unix and Linux operation system, as well as Mac OS X.
Is Django a CMS?
Django itself is not a CMS, or any sort of “turnkey” product. It is, rather, a set of tools which allow one to build turnkey web solutions.
However, Django was born out of the content-heavy world of news media, and therefore does include several key components which makes it well-suited to the building of CMSes. Among these are an automatic admin interface (for allowing trusted users to add, update, and delete content) and a simple library for RSS and Atom feeds of your content. Many web application frameworks do not include these kinds of CMS-oriented pieces.
Because Django is not a turnkey CMS, it does have a learning curve, and does require some development time to be invested before anything of significance is created. However, the time required to build a CMS using Django is drastically less than building the same CMS without Django.
When should I use Django?
Django is suitable for building web apps of nearly any type. It has been used to build CMSes (such as Ellington, in use at over 50 news sites worldwide), social networking sites (such as Pownce), and much more. Django excels at content-heavy sites—especially those in which a set of trusted users (administrators or moderators) will be allowed access to an administrative area to edit content. Django also excels at sites which make heavy use of structured data (see my previous post for more on this concept).
Django should probably be on your short list of solutions for any custom web application. If your needs are met by pre-packaged systems, you may have no use for Django. But, if you find your site limited by the restraints of systems you didn’t build, you may want to consider Django, as well as other rapid application frameworks like Rails (for Ruby) and Cake (for PHP).
Django can also provide a nice “in-between” for those looking for a pre-packaged solution as a starting point, but who want to be able to customize and extend that product without limitation. Besides the commercial Ellington suite, there are tons of available Django apps published as open-source projects on Google Code. Many of these are designed to give you a great headstart in development, but also to be customized and extended to your heart’s content.
Django’s pluggable application philosophy
One of Django’s core design concepts is a separation between projects and applications. A project, in Django parlance, is a container for applications, as well as settings and configuration information for a particular site. Applications, then, are packages that each provide just a few specific functions. For example, the web site for a typical web design firm might contain five different applications: a portfolio tool, a blogging tool, a staff bios tool, and a contact form. Each of these would be separate applications contained in a single project, and they may or may not be dependent on one another (for example, the portfolio tool may rely on the staff profiles tool to get information about the individuals who worked on a given project in the portfolio).
Because of this “pluggage” application philosophy, many companies—especially those who run multiple websites—end up building a library of Django apps they can “pull in” to a new project as needed. You may build 10 apps, and find that one site needs just three of them, another needs seven, and yet another uses all 10. This allows for a great deal of code reuse, and a sense that you’re not “recreating the wheel” on every project.
Prerequisites for building apps with Django
If you’re interested in building your own applications with Django, you’ll want to start by having a solid understanding of Object-Oriented Programming (OOP) concepts. Django is heavily Object-Oriented. You should also familiarize yourself with Python. It’s a relatively simple language to learn, especially if you’re already familiar with OOP in other languages such as PHP, Ruby, or Java.
You can build simplistic Django applications without having a very strong understanding of OOP and Python, but you will find yourself limited and need to learn more if you wish to build more advanced solutions.
A terrific resource for learning Python is Mark Pilgrim’s book Dive Into Python. It’s available for free online, or as a printed book from Apress.
Getting started
The best place to jump in and get started is the official Django project website. There’s an installation guide and a tutorial that will walk you through writing your first app. Beyond that, there’s online documentation that bests that of almost every open-source project out there, and yet another free book that is really, really great.
You may also want to get to know the fine folks in the Django users mailing list and/or the Django IRC channel.
Once you’re ready to put your project online, be sure to check out the official list of Django-friendly web hosting companies.
In conclusion
Django is a very useful framework for developing many types of websites, but especially for building custom-tailored Content Management Systems. Blue Flavor provides Django services and has built successful Django-based CMSes for clients. If you’re in need of a custom CMS solution, it should definitely be on your short list of development environments—it certainly is on ours.

Great overview. I’m going to encourage my new employer to try Django as a CMS-building tool.
One issue with using Django or Rails vs. PHP for a CMS is hosting. I’d like to see more information about deploying projects on different hosting environments and the stumbling blocks that are likely to occur.
I noticed that there is a chapter of the book on it now! http://www.djangobook.com/en/beta/chapter21/
To be completely honest, I have yet to see any Django-powered website, no matter how complex the user or content management requirements, that could not have been just as easily, and more cost effectively, built with ExpressionEngine.
That is, unless you can prove me otherwise…
Jeff’s website, http://jeffcroft.com is Django powered if I recall correctly.
Geof:
I’m not extremely familiar with Expression Engine, having only used it in a very limited capacity, but I do have a good impression of it. However, it certainly does not seem as flexible as an application framework like Django, Rails, or Cake to me.
Could you have built “Pownce”:http://pownce.com with ExpressionEngine? Could you have built “Google’s Mondrian”:http://www.niallkennedy.com/blog/2006/11/google-mondrian.html with EE? Could you have built “The Washington Post’s Congressional Votes Database”:http://projects.washingtonpost.com/congress/ with EE? Could you have built “ChicagoCrime.org”:http://chicagocrime.org with EE?
As I said, I’m not an EE expert, so i don’t know the answer to any of these questions. My impression, though, is that none of these Django-powered sites could have been built with EE — at least without horribly inelegant hacks and plugins galore. Certainly they wouldn’t have been built as easily using EE, right?
Please correct me if I’m wrong — but I don’t understand how EE would be capable of doing these sorts of projects, which require various bits of data to have unique relationships outside of that which EE pre-defines for you.
Geof, how about the flagship sites themselves — Lawrence.com (http://lawrence.com, including fancy features like http://www.lawrence.com/restaurants/opennow/) and the LJ World (http://ljworld.com, most specifically the Marketplace at http://www2.ljworld.com/marketplace/).
While I’m not all that familiar with EE (in that I’ve never managed my own installation), it seems that from a literal content management perspective, sure… you could duplicate parts of these sites. As a whole, though, these are pretty featured-filled sites.
Unless I’m wrong, and EE actually is more of an application/site framework than just a “page and post” content management tool…?
Geof - I’m a big far of Expression Engine as well, my own personal site is EE powered and it’s a pretty good solution for lots of sites. As is Movable Type, Wordpress, etc.
Having said that, what a framework allows you is a bit more flexibility should you need it without all the hacking. I think Jeff could address this better, but I’m pretty amazed at the flexibility and power that’s built into Django, considering the easy with which it can be deployed by someone who knows it well.
But it all boils down to what you need, right? For us (because we’ve got Jeff and Garrett) it could very well be easier and more cost effective to go with a Rails or Django solution for a CMS. Or, we might recommend MT or EE as we’ve done in the past.
What I personally like about Django is the ability to take all the knowledge and lessons learned from a multitude of CMS deployments and build up a “CMS framework” that I can very quickly turn out a truly custom CMS for our clients, and at the same time have my guys learning something that can go beyond a CMS if needed. Sure, you can do that to a certain extent with EE - and that’s great, I’m not knocking EE here, but there things EE can’t do.
Look no further than Pownce to see the power of Django.
Although it’d be great to answer with a resounding Yes! to your Pownce and Mondrian questions, I was only comparing Django vs. EE for pure website development. I readily admit that these types of applications are better off within a framework, such os Django or CodeIgniter. I would not dare to state otherwise.
As for Adrian’s chicagocrime.org, it depends if a data feed is made public (which I don’t think it is). If yes, there are multiple ways to import and display the data, usually with a single, well-supported plug-in. This would be the same for the Congressional Votes Database; since it uses public sources, a simple integration. Just add the data feed, customize the display output and you’re on your way.
By no means does EE force a developer into using rigid, pre-defined objects. Sure, there are default fields, but that’s just to get people started. For instance, in a news media website I’m currently building, I don’t have a single default field - every single entry point has been customized precisely for my specific data requirements. These fields are also incredibly easy to change later on, if necessary. Flexibility is a cornerstone feature of EE.
In regards to Marketplace and the restaurant listings at Lawrence.com, no problem. Seriously.
Geof:
The place where I suspect EE breaks down as compared to a framework like Django is with data relationships. Again, I don’t have much experience with EE, so I definitely could be wrong. I realize you can create custom objects and assign them various fields, but can you create relationships between objects (one-to-one, one-to-many, and many-to-many)?
For example, can you create an object called “Recipe Book,” another called “Recipe,” another called “Chef,” and another called “Cuisine Type,” (each of which have their own set of unique fields) and then build recipes that are associated with many types of cuisines, belong to one or more recipe books, and are authored by one or more chefs?
You may well be able to do this with EE — I’m not sure. But this is where many of the lightweight CMSes like WordPress break down. I suspect EE is the same, because according to its website: “Each section can have its own unique set of entry fields. These can be input boxes, pull-down menus or textareas.” That’s a nice feature, but it’s a far cry from real structured relational data.
Again, I’ve not really used EE, so I’m not sure. I’m asking because I’m sincerely curious, not to bash EE. I have a good impression of EE and know many people who use it well and love it.
I’ve used both EE and Django for many projects. When using EE I do get the feeling I’m just working around it rather than it helping me in many cases. Some things really annoy me, like the how all data entry revolves around using the weblog module. Also every data model has to have a title field. I searched but couldn’t find anyway around that. Then there are things like validation for data and enforcing unique fields. These things are a breeze in Django but in EE are not supported, and I’d expect lots of PHP/SQL hacking to get around it. No thanks!
Another point is that after a fresh EE install I’m having to turn lots of things off, adjust settings and try and reduce bloat. I’d rather add apps when I need them rather than have to turn off things like trackbacks, photo galleries, and bloody smileys every time I work with EE.
Geof — EE could support <strong>all</strong> the functionality that Marketplace offers? Listings that are fully end-user managed (this being the biggy, I guess, for something like EE?), support for uploading of images, manageable calendar of events, video, hours open, etc?
Even if it could handle these things, it seems, like Arthur notes, that one would be working <strong>around</strong> EE, instead of it really being an enabler for quick development of a truly flexible application.
Not trying to be critical here, just trying to figure out if I’ve really been missing out by overlooking EE ;)…
Thanks for the comment, Arthur. That’s kind of the impression I got — that while you may be able to do a lot of these things in EE, you’d be working in an inelegant, hack-ish sort of manner. If it works for you, then by all means, use it — but I’m kind of anal about not having to click the “add a weblog” button when I want to add a new model for, say, recipes. Just a personal preference, I guess. :)
I was going to wait until the morning to post my response, but obviously, time is of the essence.
If you design your initial ExpressionEngine architecture carefully then anything can happen, at least in my experience. With EE it is simple to create relationships between objects so the recipe analogy that Jeff references would be very possible.
For instance, in this news site I’m currently building, there are unique sets of stories, authors, media and archives. They can all be mixed up together on a single screen, shown in any manner by themselves and in endless locations across the site. Users can also sort, search, filter and create their own custom views.
As for all data revolving around the weblog module, I don’t understand how this is a limitation of the system. Again, if you design your object architecture properly, then that’s all they are - objects. You can do with them as you wish.
In regards to the title attribute being necessary, I guess I’ve never had a problem with that requirement. If you don’t need to use the title in your views, it doesn’t matter. It’s just simply a title in the database table, nothing else. As for turning off default settings, once you develop a few sites with EE, it becomes a minimal effort. You just know what to do and where to go. Personally, I’d rather spend the time turning stuff off than all that time creating it from scratch or modifying existing code. This is more cost effective in my books.
In regards to Marketplace, user-management of content is built in. All of the features listed - image uploads, events, video, hours of operation - could be handled through a secure members’ form on their individual profile page. Again, you need an EE developer who knows what they’re doing for this type of work, but it’s not too much effort to create that type of functionality. I know, because I’m doing it right now.
I truly don’t believe that EE is either inelegant or “hackish”. In fact, EE code is incredibly simple and clean but with tons of power and flexibility behind the scenes you can tap into. It’s a really sweet system.
For anybody interested, http://jambor-ee.com is currently building an EE site from scratch as a month long tutorial. This will give you some further insight into the world of ExpressionEngine.
Geof:
I have no doubt that EE is a very solid and viable content management system for many types of sites. I also have no doubt that it is no substitute for absolute, complete control over what it is that you will build. As you said yourself, Django offers some flexibility that EE doesn’t (for example, that required to build something like Pownce or Mondrian). As with all tools, it comes down to choosing what’s appropriate for the job. EE and Django are both forward-thinking, modern platforms that serve different needs very well.
This post was only meant to be an introduction to Django, and not to say that Django is better than any other system in any way. We think Django is a great solution for certain problems — as is EE. We’ll continue to use the most appropriate tool for the situation, and I’d recommended everyone else do the same.
It’s been about a year and a half since I picked up Django after toying with Rails and the early days of CakePHP. The most valuable aspect of Django that sets it apart from anything else is its community. It’s so valuable to be able to hop in IRC or Google Groups and find people genuinely determined to help you.
Plus, it’s just so much damn fun.
You’re building up some good dialog here. I agree EE is a decent blogging tool that has proven fairly capable of being stretched to a website CMS. It certainly isn’t worth being considered as a framework (where is its OO MVC?!), and Django is the opposite… a fast way to build custom apps.
There’s also a nice middle ground in the form of SilverStripe, which provides a very flexible PHP5-based object oriented framework, much like Django, with a fully featured CMS. You should see how quickly the multilingual support is going for it thanks to the Google Highschool Contest it is involved with (http://translate.silverstripe.com).
Django is a framework for rapidly developing web applications in the Python programming language. Expression Engine is a proprietary content management system built in the PHP scripting language. Make no mistake, they are very different in fundamental ways.
Simple websites (such as the majority that are built with Django and Expression Engine) can easily be achieved with either platform. But the game changes when you’re building the next YouTube or Twitter.
Which is why my site was built with <a href=”http://textpattern.com”>Textpattern</a> and my latest project which is easily five times the complexity is being built with Django. Now I could build this project in Textpattern or Expression Engine (well at least 95% of it) but that would involve a lot of plugins and overly-sophisticated template code.
It’s not about if Django is better than Expression Engine or vice versa; it’s about choosing the right tool for the job.
Jeff and Noel - I wholeheartedly agree with both of your statements regarding Django and ExpressionEngine. I simply wanted to demonstrate how great of a product EE is and expose some of its unique strengths; attributes not every web developer knows about, but should.
I’m way too busy and old (okay, 33) to get involved with, let alone, start language flamewars. I’d rather be working on projects that are fun, creative and profitable. I just happen to use EE to achieve that goal.
As an aside, I’ve always been a sucker for Django’s beautiful website and logo. The Django Book project is a fantastic idea and well-executed. If I was more of a programmer…
Cheers, bros.
Great discussion here. Its my intent to respond to some of the comments made about EE, not jump in with a sales pitch.
Jeff, if this is off topic, I certainly won’t be offended if you remove my comments. I don’t want to hijack your discussion.
@Authur - Here’s a trick that a lot of EE devs use. Create a local generic install of EE with exactly the features and options selected you want to start projects with. Instead of installing EE for new projects, simple restore this local install to the project server as your starting point. That way everything is configured exactly how you want… no need to turn off things you won’t use or configure it multiple times.
@Jeff - “Weblog” is just an arbitrary word, one that we sometimes regret using. We’ve literally had 100s of internal discussions as to what to call “data containers” that would make sense to both average consumers and application developers. In our first couple years of business the term served us well but as EE gets discovered by more and more developers its a term we find ourselves constantly explaining since a “weblog” in EE is typically not similar to a weblog in other tools.
For this reason we added an option in the CP where you can change the term ‘weblog’ to whatever language makes the most sense to you.
For example, if you prefer the term “data module” you could replace the term “weblog” with “Data module” so to add a new data module you’d literally click “Add new data module” and that’s exactly what you would be doing, at least within EE’s context.
@All EE is not an application framework, but a fully developed content management platform. It has been placed by some into the former category because of its open nature and ease of extendability via modules, plugins, and extensions, but it is not a framework. CodeIgniter is our PHP application development framework and perhaps a more appropriate comparison in regards to Django. Though even there I’d say CI and Django were developed with different goals in mind. Variety is good!
@All BMI’s primary site and music catalogue are an example of EE in a very high traffic, complex environment where ordinarily a framework would probably have been used to build a custom application. BMI uses EE plus custom add-ons. What’s notable about this is that EE is not hacked, leaving a clear upgrade path while retaining all the customization that BMI needs.
Jeff wrote “We think Django is a great solution for certain problems, as is EE. We’ll continue to use the most appropriate tool for the situation, and I’d recommended everyone else do the same.”
The EE team feels exactly the same way. Being familiar with a wide variety of solutions and technologies is indispensable in web work these days. If you’ve never messed around with Python, I recommend dipping into Django and seeing what all the fuss is about. Seeing how different teams approach programming and problem solving can only help daily life on the web.
Jeff’s article brings up a lot of excellent points and considerations that are obviously well worth the time to read and understand. Thanks for letting me get my 2 cents in.
Cheers to the Django team and to Jeff! We hold both in high regard.
Well, If anything this sure has been an educational discussion! I’ve been an avid follower of both Django (since inception) and EE. This certainly inspires one to learn more about both.
Thanks to all for participating!
Lesie and Geof: thanks for the clarifications. I will definitely consider implementing a future project in Expression Engine to see how it works.
I think somebody already mentioned this but <a href=”http://jambor-ee.com/”>Jambor-ee</a> is doing a 24-part tutorial that will guide you through building a Expression Engine site from scratch.
Great discussion!
Jeff, I’ve been looking at experimenting with Django since first reading about it on your blog a while ago, but have been a little reluctant because of the learning curve.
I would consider myself more of a designer than developer but I have done my share of hacking in PHP, am an avid EE user and have even built a few (sloppy) Rails projects for personal use. I’m always open to learning new things but it takes something special for me to dig into another programming language rather than spending that time focusing on other design-related skills.
I recently joined a small 4-person agency and am now primarily in charge of the design and development of our web work. We have some serious projects coming up that I think would benefit from a framework like Django rather than EE (what I primarily develop in now) but I’m still trying to justify the time/cost of learning Python.
Because I happen to be the closest thing we have to a programmer, would you say this is even worth while to look into or would we benefit from having a full time developer on staff to do the “hard core” stuff. I’m mostly afraid of writing crap code and the world crashing down around me.
Can you compare to Rails? I understand the basics of RoR but it still blows my mind and takes me forever to make any sort of have-decent app in it.
In the end I just want something that allows me to make cool/usable and re-usable apps as fast and as easy as possible with a little more power than EE and way less headaches than something like Rails.
Thanks!
Travis:
Make no mistake about it: Django (and Rails) are tools for programmers. If you’re not a strong programmer, then the chances of you being about to build anything too spectacular with any of these frameworks (Django, Rails, Cake, Code Igniter, etc.) is pretty slim. You may well be able to build a simple personal blog, but if you need to build serious apps that need to scale well, you’re going to need a real programmer on staff who understands how to optimize code and put together a good server architecture.
I one wrote an article called “Django for non-programmers.” In hind sight, that was a poor title. I never meant to suggest Django was for non-programmers. Rather, I wanted to explain how non-programmers could get started into the world of programming via Django.
These frameworks can be a decent place for beginners to start with web programming (although they still need a solid understanding of the underlying language and OOP concepts in order to be successful). However, they are by no means a substitute for a good, experienced programmers on your team.
Wowza! What a great thread. We even got the EllisLab VP in here!
Here’s what I’m thinking:
ExpressionEngine is a surprisingly diverse Content Management System that can handle sites whose main purpose is to collect, organize, and display many types of content. It includes a member management system as well, which is quite robust and can handle most/all of the most standard features you’d expect from a Member Management system (permission-based access to content and the CMS itself as well as an internal messaging system, the ability to have profiles, contribute content, moderate content, register other users, etc) In this way, ExpressionEngine goes <strong>way</strong> beyond most CMS systems. And yes, you CAN set up related fields and build one-to-many relationships between objects. Most of the time, for most of the sites on the web, EE will handle this in a solid and somewhat elegant way.
But there are two instances, however, where I think EE would <em>not</em> do so well:
1- The site you’re building is more like an <strong>application</strong>. Pownce, Facebook, Virb, and lots of other sites function this way. Yes, their main purpose is to manage content, but there are all kinds of very unique ways that this is done. Another example of an “application-website” is one that would include wizards, or complex reporting, or interfacing with some type of legacy database (or any external database for that matter), or an API. EE is just not going to let you do these sorts of things, and it’s not meant to.
2- You’re building a site that needs to have a custom designed admin area to manage the content, and it’s important that you are able to control the layout of this admin area yourself.
In either of these cases, and probably more, EE will start to feel like that square peg in a round hole. And it’s these situations where an application framework like Django or Rails or Code Ignitor will soar.
Thanks Jeff.
That makes sense and actually makes the difference between Django and a product like EE a little clearer.
I think I’ll stick with my Expression Engine for the time being… it really does do a fantastic job for 90% of our needs.
When the time comes when we do require more, Django will be on the top of the list of considerations… that and a programmer. :P
Thanks for very interesting discussion. btw. I really enjoyed reading all of your posts. It’s interesting to read someone’s observations.
Hi
How much does it cost the fool version of it.
regards