Discover the best of the web!
Learn more about Digg by taking the tour.
How To Get Started Programming With Django
webmonkey.com — Django is a web framework designed to help you build complex web applications simply and quickly. It's written in the Python programming language. Django can do some very complex things with less code and a simpler execution than you'd expect. This tutorial breaks down how to start working with Django.
- 1213 diggs
- digg it
- bixby1, on 07/02/2008, -1/+20It looks like 4 out of 5 dentists recommend this thing so I'm going to take the tutorial.
- pentupentropy, on 07/02/2008, -2/+17python is a million operations in 11 commands =)
- albiniak, on 07/02/2008, -0/+8a cool application of django for musicians: "djedna is to musicians what wordpress is to bloggers."
http://www.djedna.org- matrixbandit, on 07/04/2008, -1/+4***** that. Like I didn't have a hard enough time pronouncing Django, someone had to come up with "djedna".
I'm working on a framework and I'm going to call it Kjhnaklebackle, hows that sit with you?
- matrixbandit, on 07/04/2008, -1/+4***** that. Like I didn't have a hard enough time pronouncing Django, someone had to come up with "djedna".
- alexbu, on 07/03/2008, -0/+4also, great for GAE
- irishjays, on 07/03/2008, -3/+22My potential girlfriends will continue to cease to exist as I digg this article.
- GIScope, on 07/03/2008, -0/+7I confirm
- mozert, on 07/04/2008, -0/+4Agreed.
- j3one, on 07/04/2008, -0/+4Not bad for webmonkey... or you can head over to the horses mouth http://www.djangoproject.com/documentation/install ...
- Dumbledorito, on 07/04/2008, -0/+25Dueling Djangos. "SQL like a pig!"
- yellowcakewalk, on 07/04/2008, -0/+6LOL
- TomTruelle, on 07/04/2008, -0/+2I'm glad I dont get that...
- DangerCollie, on 07/04/2008, -0/+2Don't be drinking coffee when you read that. Almost had it coming out my nose. Good one.
- vawksel, on 07/04/2008, -2/+2It "Looks" more complicated than Rails 2.0. Perhaps it's more powerful though? Anyone want to chime in?
- PabloMac, on 07/04/2008, -1/+4"Chime."
- rumblestrut, on 07/04/2008, -0/+2Maybe this will help:
http://www.railsenvy.com/2007/9/10/ruby-on-rails-v ...- superkendall, on 07/04/2008, -1/+4Oddly, it did not.
I enjoyed it anyway though! - rumblestrut, on 07/04/2008, -0/+2I should have included the comments on that page underneath the video:
"After taking a good look at Django and weighing all the pros/cons, I didn't really think we should make fun of it. Django is a great framework for building web applications, one that employs many of the same techniques that Ruby on Rails does. If it wasn't for Rails I'd probably be programming Django right now. Amongst a sea of mediocre web frameworks it's definitely close to the top."
- superkendall, on 07/04/2008, -1/+4Oddly, it did not.
- davepederson, on 07/04/2008, -0/+1Rails is great, but django has built in administration application; you just give your models an interal administration class...seems cool.
- SquishyWaffle, on 07/04/2008, -0/+1It may be just some syntactical differences that make it look a lot different from Ruby. You can expect to be pretty productive with Django within a few days, depending on if you can devote an hour or so for each of those days. From then on, things tend to fly.
And as mentioned, the admin interface is a huge timesaver. Even if you don't end up using it in your finished product, it's a great help during development.
- brainnovate, on 07/25/2008, -7/+6i am surprised no "PHP is better" types have shown up yet!
- TrellSaracen, on 07/04/2008, -2/+7Personally, I enjoy developing in PHP, can't stand Python, and have never had any reason or inclination to look at Ruby or Rails. Other people have different preferences.
Frankly, I don't much care what people develop with as long as what they produce is easy to use, looks and runs smoothly on my current-generation browser of choice, and isn't bogged down with needless or intrusive crap (Flash, excessive AJAX, etc). - Oryx, on 07/04/2008, -0/+7PHP is better.
Just to annoy you >:-) - markstory, on 07/04/2008, -0/+1I wouldn't say PHP is better by default. But both languages have their ups and downs. PHP has well known issues, python less so. No language is perfect.
- TrellSaracen, on 07/04/2008, -2/+7Personally, I enjoy developing in PHP, can't stand Python, and have never had any reason or inclination to look at Ruby or Rails. Other people have different preferences.
- emehrkay, on 07/04/2008, -2/+18I have no interest in Django, but I do like the fact that this article is here *digg*
- Oryx, on 07/04/2008, -0/+1Yep, absolutely. Good piece, great reference... if I ever really decide to try Python/Django rather than PHP/Smarty ;)
- rockwithme000, on 07/04/2008, -12/+39PHP is better
- freeplatypus, on 07/15/2008, -0/+1Completely argument-less point ... but kind of have to agree with you ;)
- mozert, on 07/04/2008, -8/+1I am going to build an extremely interactive web program soon. I guess this Django thing incorporates the latest technologies available, so I am keeping an eye on it.
- VelvetoneFusion, on 07/04/2008, -0/+13...and here I thought I was gonna learn a programming language from a 1930s jazz guitarist.
- zer0nix, on 07/04/2008, -0/+1...i thought it would be with a western gunslinger. guess i'm disappointed too.
NOTE: 'django' is a gypsy moniker derivative of the biblical 'john.' it's also used in the title of a hentai game released earlier this year that features anime babes with guns.
i'm predicting 'django' will be used in many more places by the year's end.
- zer0nix, on 07/04/2008, -0/+1...i thought it would be with a western gunslinger. guess i'm disappointed too.
- Crath, on 07/04/2008, -10/+6Why do they keep making new programming languages that are "faster and easier to make large web applications". Its easy enough, why do we need to make it easier for the not so talented programmers to make crappy large scale software?
- xeslana, on 07/04/2008, -0/+11These new frameworks make development faster so we developers do not need to sit there and write the same tedious code over and over. Less time writing code allows for more time designing code.
- adolfojp, on 07/04/2008, -0/+11Django: Not a programming language.
- OpCzar, on 07/04/2008, -0/+13They're called frameworks. The reason for their existence is simple: to keep you from "reinventing the wheel" every time you want to build a new web site for a client. Many of them base themselves on the Model-View-Controller concept so it's easy to find code pertaining to the change you want to make. Even the best programmers don't have 'unlimited' foresight. Therefore, these tools are best for the freelance web programmers that don't have the luxury of a QA department. If you're interested, you should start right away researching for the ones you find easiest - there's countless frameworks out there. Be sure to choose one that might be supported for a while though because they come and go quite often.
- superkendall, on 07/04/2008, -3/+2Yes, instead of spending time reinventing the wheel we spend all our time re-inventing the same car frame that sits atop the wheel.
MVC, for the repeat! - MWeather, on 07/04/2008, -1/+1That's what generic views are for.
- superkendall, on 07/04/2008, -3/+2Yes, instead of spending time reinventing the wheel we spend all our time re-inventing the same car frame that sits atop the wheel.
- SquishyWaffle, on 07/04/2008, -0/+3Why are people so quick to knock things before even bothering to figure out what they are? :)
- donkeySays, on 07/04/2008, -7/+12I really hope, Python takes over PHP as the most popular serverside web development language. The language design of PHP is a big headache.
- HigherLogic, on 07/04/2008, -0/+10Don't hold your breath.
- superkendall, on 07/04/2008, -8/+1After having done some work in python, and PHP - I'm going to have to say I prefer Ruby. Or Haskel. Or many other things...
- Tulle, on 07/04/2008, -0/+5After having done some work in Haskel and many other things - I'm going to have to say you're a douchebag.
- whorunbartertwn, on 07/04/2008, -2/+1Agreed.
Ruby I can see, but there is always someone coming out of left field saying they'd rather do it in Haskel or OCaml.
- markstory, on 07/04/2008, -0/+2PHP is dead simple to start with though, its everywhere, and easy to begin with. Furthermore, 5.x and 6.x are correcting some of the sins of PHP's past. Python by contrast is much more difficult to deploy and begin with as a total noob.
- swordedge, on 07/04/2008, -1/+3seems to me lesson one should be how to pronounce the blame thing
- TrellSaracen, on 07/04/2008, -2/+1Why? It's pronounced exactly the way it's spelled.
- markstory, on 07/04/2008, -1/+1d'-JAN-go is how I say it.
- HigherLogic, on 07/07/2008, -0/+1Django is pronounced JANG-oh. Rhymes with FANG-oh. The āDā is silent.
http://www.djangoproject.com/documentation/faq/#wh ...
- rofflebuster, on 07/04/2008, -1/+1I wish you didn't have to write regular expressions for every page. Sometimes I just want to run a quick test without having to fiddle around with the URL beforehand. A scaffold feature like Rails would be nice.
- nolemonplease, on 07/04/2008, -1/+1Cake, a competing framework for PHP, has scaffolding.
- SquishyWaffle, on 07/04/2008, -0/+0I usually keep a test view around for just that purpose.
The admin interface is comparable to the scaffolding, and sometimes better. There are also other third party solutions, as well as databrowse.
- JarJar420, on 07/04/2008, -8/+1So now Meesa so confused. Meesa familiar with Python (have O'Reilly Learning Python book), then Meesa stumbled onto Rails, and Meesa learning Rails now, and next Meesa find out about Django. What Meesa to do??? Learn both Meesa suppose.
- thebradz, on 07/04/2008, -0/+4I hate you.
- thebrinkman, on 07/04/2008, -1/+7I'd rather he teach my jazz guitar.
- philodygmn, on 07/04/2008, -6/+3This sounds less rich, robust, and powerful than SproutCore :-\
http://digg.com/apple/Cocoa_for_Windows_Flash_Kill ...
http://www.sproutcore.com/- placidified, on 07/04/2008, -0/+2Sproutcore is a Javascript framework, Django "is a high-level Python Web framework"
Apples to Oranges
- placidified, on 07/04/2008, -0/+2Sproutcore is a Javascript framework, Django "is a high-level Python Web framework"
- Acglaphotis, on 07/04/2008, -1/+55Digg? Is...is that you? Are you coming back?
- TheKeithD, on 07/04/2008, -0/+21No, this making the front page is a glitch in the digg system. Don't worry, admins are working on the issue right now. Motivational posters and videos from Break will soon be returning to the front page.
- superkendall, on 07/04/2008, -1/+4It's showing signs of life! Nice to be able to read again.
- tramblings, on 07/04/2008, -0/+3I couldn't believe it when I found this article! I'd like it either way but I'm a Django user too.
- paradizzle, on 07/04/2008, -6/+2I have it running for my small time site I started at school. http://www.ducoopreview.com I must say it is extremely secure and easier to understand and works wonderfully. The site runs 100% better then it did on php. I recommend Django to anyone who is looking to see what is out there besides php and crappy RoR.
- Matt2k, on 07/04/2008, -1/+5Oh. So the Django framework is 'extremely secure'. Could you kindly elaborate, as you are clearly a security expert with years of experience in the field? Also qualify how it runs 100% better than PHP. I take it you designed the same website twice and ran some tests?
Digg is a never ending source of fascinating information!!!!- placidified, on 07/04/2008, -1/+3I was about to digg you up until you said "crappy RoR". There is no need to resort that type of language and "diss" other frameworks. If Django tickles your fancy great, leave you other frameworks/languages alone.
- Matt2k, on 07/04/2008, -1/+5Oh. So the Django framework is 'extremely secure'. Could you kindly elaborate, as you are clearly a security expert with years of experience in the field? Also qualify how it runs 100% better than PHP. I take it you designed the same website twice and ran some tests?
- fugazied, on 07/04/2008, -2/+3Awesome, I've been planning to get into Python/Django for a while, this might be a great starting point.
- warchant, on 07/04/2008, -4/+3i literally use django every single day...DUGG!
- Mesiance, on 07/04/2008, -1/+2We used this for a client project from school and even though we were all new to it, very easy to pick up and tons of guides/communities available to help you out.
- mrdorian, on 07/04/2008, -2/+1dugg for a different tutorial of django
- Gracenotes, on 07/04/2008, -4/+1Eh. Most of these "you can write code as easy as breathing" frameworks tend to have surprisingly inflexible paradigms anyway (jQuery, anyone? Ruby on Rails, is that you?)
- tramblings, on 07/04/2008, -0/+1Django is pretty dang easy to use. And flexible. :)
- whorunbartertwn, on 07/04/2008, -0/+1If you want more flexibility look into Pylons.
- DesdinovaEL, on 07/04/2008, -0/+4I went to Berklee and took a Django guitar lab. Has nothing to do with this but thought I'd throw that out there.
- davepederson, on 07/04/2008, -0/+1It would be great if these mvc web development frameworks had an easy way to run against something like sqlrelay instead of accessing the database directly. It could help them scale out (horizontally) better.
- shinkou, on 07/04/2008, -4/+1Great! I've been studying Python for a weeks and I know Python is cool! But this Django just rocks! Who still needs PH-Pee or the Rusty Rail? :P
- r3negadeX, on 08/11/2008, -0/+1I just blocked you.
- reformation, on 07/04/2008, -1/+3http://en.wikipedia.org/wiki/Return_of_Django
- igutekunst, on 07/04/2008, -0/+4I have a girlfriend. And she stole my PHP book. I'm serious.
- nolemonplease, on 07/04/2008, -0/+1I've taken PHP books before.
- Oryx, on 07/04/2008, -0/+2What's a PHP book?
Doesn't everyone just use the online documentation at http://www.php.net/manual/en/ (or other spoken language)?- bxblox, on 07/04/2008, -0/+2I think the online documentation is more useful for people who already have some minimal familiarity with PHP. Otherwise it's like trying to learn how to use the unix shell by randomly typing "man" and a random word and hoping it's a command.
- AngelaQ, on 07/04/2008, -0/+2I got to the part where it said, "If you understand perl or C++ this will be perfectly clear. If not, go study perl or C++."
Talk about useless.
- koreth, on 07/08/2008, -0/+1Wow, she must really love you to want to spare you from finding out too much about PHP.
- fLUx1337, on 07/04/2008, -0/+6You know what I think? The Digg recommendation engine is working....
OK, here's what's happened to me personally over the last few days:
Before it was launched, I had 12 diggs for the entire month. I only digg things I'm really into, tech stuff mainly. But just looked, I have dugg 54 items this month now.
So if everyone has had a similar experience, no wonder we have more tech stuff reaching the front page! ;) - noidea13, on 07/04/2008, -0/+2I'm starting to learn Django and I must say that it is refreshing, and in fact, a pleasure to code with it.
Can't wait until the 1.0 relase. - phatvolvo, on 07/04/2008, -0/+2Sssssssssssssssssssssss
- bitbytebit, on 07/04/2008, -0/+1http://bash.org/?400459
- bxblox, on 07/04/2008, -1/+1Even though I have no interest in django il digg it, just to get similar recommendations...
- mistafreeze, on 07/04/2008, -0/+6Maybe the Django ate your baby.
- zeeneo, on 07/04/2008, -1/+1I like the look of Python/Django but I've just spent the last 2 years learning CakePHP and not prepared to give it up yet.
- perot9296, on 07/04/2008, -3/+1Django's cascading templating system is great. However, they still have not reached 1.0 (was supposed to happen in 2006), which means any code you write is not guaranteed to be backwards compatible. There are still no good books on using Python strictly for the web, most python books cover it for using apps and have 1 chapter about the web and its so basic its worthless. Also there are only like a few recent books on python that have come out, before like 2005 the last ones made were around 2001. There are like 2 or 3 books on Django, but you really do need to know Python if you are going to play around with it. Most of the people using Django are using the Ellington CMS which is about $30,000 last I heard, and I'm sure it's gone up in price again. Don't expect either Django/Python to become more popular than Rails, PHP or ASP on the web anytime soon, it's not going to happen.
- SquishyWaffle, on 07/04/2008, -0/+2Lots of funny stuff towards the end.
The bulk of people using Django are *NOT* using Ellington, take a look at djangosites.org.
The Django book (which you can either buy in dead tree or browser online, free, http://www.djangobook.com/) does not assume previous Django knowledge. Wrong again.
Django adoption is taking off, and the latest endorsement by Google's App Engine reinforces the fact. I don't care which language/framework becomes the most popular, but Django is here to stay and doing well. The notion of writing it off is just silly and close-minded.
- SquishyWaffle, on 07/04/2008, -0/+2Lots of funny stuff towards the end.
- whoaohh, on 07/04/2008, -0/+3Programming? What? This is Digg!
- sensibledriver, on 07/04/2008, -3/+1Jesus, still not in 1.0? I tried Django in early 2006 and found it super unstable and was waiting for the promised 1.0 from that smug Adrian guy- no dice. What compelling reason is there to try it now?
- cjlesh, on 07/04/2008, -0/+1I have written a similar tutorial, which includes a portable Django development environment for Windows. No installation required, and it can even be run from a USB flash drive.
If you're interested, check out:
http://www.instantdjango.com - ndib, on 07/05/2008, -0/+1Yeah I will say it. Django is better than Rails...bla bla bla!!!
- parallax7d, on 07/06/2008, -0/+1i tried this tutorial, it basically sucked. tons of incorrect code and many other issues. this video is pretty good though: http://www.youtube.com/watch?v=CpXz_LsBDBo&feature ...
- parallax7d, on 07/06/2008, -0/+1ok, not tons of incorrect code, but lots and lots left out.
- OneTrueDabe, on 07/06/2008, -1/+0Django makes web development so easy, you can do it with TWO FINGERS!
(Now *THAT* was a good -- albeit twisted -- Django Reinhart joke...) - Budo7, on 07/15/2008, -0/+1going to try it out, will report back. It looks much easier then php, will find out.
- soyrex, on 07/16/2008, -0/+0i don't know why people complain about django being unstable.
I'm using the svn version for 2 different sites... and both are running fine.
My blog: http://soyrex.com AND another silly personal project: http://the-hive-mind.com
Seems to me that unstable web apps are more likely to be the product of the programmer than the framework.. - Davorin, on 07/24/2008, -0/+1My Django site http://tao-adventure.si/ works perfectly, no unstability noticed ;)
And yes, Webmonkey tutorials are very good!
Digg is coming to a city (and computer) near you! Check out all the details on our