Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Best way for a new developer to learn Django?
6 points by andy93 on Nov 22, 2012 | hide | past | web | favorite | 10 comments
Hey guys, I am looking to finally get in to web development with Django. Django and Python are in a weird stage right now, add in the fact I don't have any development experience and I am lost on how I should get started. I am first year CS student and have been learning Java in class, but I have taught myself Python at the same pace and am more comfortable programming in Python. I have been using 3.xx, not that it is a huge deal for Python, but I am wondering if I should try to use the latest version of Django so I can use the same version of Python I have been using.

My main question though is what is the best way to learn Django? I do not have ANY experience with a framework like this, my only experience is Python, HTML, CSS, some Javascript and a little bit of jQuery. Many people say just to use the documentary online, and I feel this would be good if I had some kind of development background. I am really looking for a book to purchase that is focused towards teaching the basics inside and out. From there I can start to hack stuff together and go off on my own, that is just the way I learn. So if you guys would suggest a book, what would it be? Otherwise what other options should I consider?

I think the best way to learn anything is by doing. So a great place to start is djangoproject.

Following which, I recommend trying to build from scratch simple webapps that uses 3rd party api's like Twitter or Flickr.

The goto book is http://www.amazon.com/Definitive-Guide-Django-Development-Ri...

For some reason, a lot of the django books are outdated.

As for the versions, I would say go with Python2.7/Django1.4

I wrote a short checklist that might help you in your progress!


I recently applied for a Django role and was asked to create a simple blogging script. It was a surprising amount of fun and even a small script like that helped me learn a ton about Django, enough for me to be able to pick it up and put it to use on other projects.

So give a blog system a try! Play with getting "SEO friendly URL's" set up, get TinyMCE/Markdown implemented and toy with stopping XSS attacks, set up tagging, etc. If you know a language already I reckon you could easily write it in a weekend.

Like other people comnented, the django docs is the place to start. If i started from scratch again i would read it all first because there are many important details there, that will even be handy at more advanced stages. Would probably also follow and type myself the tutorial, get it running locally and then learn do deploy it online, perhaps on EC2/heroku/gondor.io . It pretty much covers the lifecycle and its a good kickstart.

I'd also pickup virtualenv + pip skills asap.

Here are your vitualevn/pip skills:

1) virtualenv --no-site-packages <project_name>

2) source project_name/bin/activate

3) pip install <package_name>

4) pip freeze > requirements.txt

5) pip install -r requirements.txt

Thats pretty much all you need to know to get a LONG way with those two.

In general pyhton and django are very easy, dont be intimidated by the number of new words showing up. Best thing to do is start a practice project and get coding away.

thanks for complementing :-) commenting from a zte blade is a pain.

ps.: use distribute ( * )

* - Sponsored by the Ministry Of Packaging, http://s3.pixane.com/python_comrades.png

The Django documentation page is fantastic. Also, djangobook.com is an awesome site to visit. One of the best tutorials I've ever read. I was building a prototype site with Python and Django at work and I finished writing it in a week without any prior experience with the language or the framework.

Django has great documentation, so it will be more than enough to get you started, and if you want to use the latest version of Django then your best option will be Django documentation. https://docs.djangoproject.com

What do you mean by `weird stage`? Yeah like others said, do the tutorials on the website, then make something of your own.

Or you can try Django by Example http://lightbird.net/dbe/

maybe you can try read on this book : Pratical django projects?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact