views:

774

answers:

9

First question: What is your favorite Django book or online learning material? CodeProject examples + Django documentation, O'Reilly, etc.

Second Question: What are some good tips and advice you have picked up along the way which helps you to use Django more effectively? Certain design patterns, language idioms, frameworks which tie into Django well, etc.

Thanks!

+3  A: 

I've only just started with it, but I've found the Django project's own online documentation to be entirely sufficient for me with regards to Django per se.

I Lie! there was one point I couldn't quite understand early in my experience; at the bottom of each page on docs.djangoproject.com they mention several ways to find help, so I used the IRC channel and my question was answered immediately, more than satisfactorily, and entirely unceremoneously. I was elated!

After that the documentation was entirely useful on it's own..

Wait! again, not quite true.. I use wikipedia and google to fill in the gaps in my knowledge while reading.. but I think it's reasonable to assume most people do that or something similar...

Phil
+1 just for writing style
Iceman
Thanks Kevin, I appreciate it! Looking back over my answer, I think it really amplifies my core point which is the clarity of the djangoproject's documentation. as well as the sheer ease with which I could find help straight out of the documentation itself! BTW Did I mention how clear the docs are?
Phil
very cute way to make your point - +1
Rob
Thank you as well, Sir Rob!
Phil
+7  A: 

Answer to first question:

Answer to second question:

Yes, I added "Django source" to both, and I dropped it one more time here.

ken
+1. Too many people wrestling with Django before learning proper Python.
muhuk
+12  A: 

As for books:

  • There's the free Django Book
  • I really like Practical Django Projects
  • Amazon has a couple more. Generally, if it's written or edited by one of the Django core devs, it should be worth the money. But pay attention that you don't buy an edition for an obsolete Django version (e.g. 0.96)
  • Like others said, the official documentation is top notch, and #django on freenode and the mailing list can help with specific problems

And the second question:

  • before developing an app yourself, look if there isn't already something similar on Google Code, GitHub or Bitbucket. There's an incredible number of useful django apps around
  • learn to love generic views
piquadrat
+1 for warning about obsolete books. There are more books targeted at version 1+ now, but they've taken a while to appear.
Alasdair
Practical Django Projects: get the second edition, published earlier this year. First edition was unfortunately targeted at 0.96 and came out shortly before Django 1.0.
hughdbrown
With the abundance of marvelous free and up-to-date online books and documentation, I suggest that the only reason to purchase print copies of the book is to support authors and publishing companies. I will continue to purchase them, but do not use them nearly as much as online resources.
ken
Also beware of abandoned code. There seems to be more of it in the django world than I've encountered elsewhere, not sure the reason.
Paul McMillan
+5  A: 
  1. a. Use the IRC Channel mentioned #django on freenode

    b. Use stackoverflow whenever you have questions you will get well informed answers in minutes but it seems like you got that one locked down.

    c. The django book at http://www.djangobook.com/en/2.0/ (you'll want the second version in english i suspect)

    d. The django documentation found at http://docs.djangoproject.com/en/dev/

    e. Django Snippets found at http://www.djangosnippets.org/ (good for simple snippets of code just like it sounds)

    f. A django book I like a lot is by Apress called Practical Django Projects, Second Edition found here: http://www.apress.com/book/view/1430219386

    e. Nice django/python video tutorials found here for example:http://showmedo.com/videotutorials/video?name=1100000 (these really helped me get started) Showmedo also has other great video tutorials on django.

  2. Tips ... umm use the links/ideas above ... a lot.

Travis
+2  A: 

I like the Practical Django Projects as mentioned in piquadrat and Travis' answers.

The author James Bennet is putting all the code samples into a Mercurial repository on BitBucket so you can follow the code as it progresses through the book (only the first three chapters' code is up there at the moment). If you decide to buy the book, it's a good excuse to learn the basics of revision control with Mercurial.

Alasdair
+1 for version control!
ken
+2  A: 

Books and resources: This question has been answered before. Look here and here.

Tips and tricks: here.

hughdbrown
+1  A: 
  1. Django official documentation
  2. Master Django Generic views
  3. Try not to hardcode urls in your templates
phmr
s/Try not to/Never/, and while on URLs, check out named URLs, the permalink decorator, reverse(), and the {% url %} template tag.
ken
+5  A: 

The single greatest thing you can do to make your life with Django better is -Learn Python-

I have watched people inundate the mailing lists and IRC with problems directly related to their lack of language knowledge. I am not even talking about hard concepts, but rather things like this example interaction:

User: How do I display all the things in a query
Developer: It's an iterable list. You do it the same way you would with any list
User: Uh, I'm new to python how do I do that.

That is an example of what you don't want to be asking when you try to get django help.

wlashell
+1 for reinforcing my point about learning Python.
ken
+1  A: 

I Just finished the Practical Django Projects (for version 1.1)as mentioned in piquadrat, Travis' and Alasdairs' answers. I had a lot of aha moments and many more I'll need to get back to that again to fully digest moments.

When James Bennet, the author gets the code samples into the Mercurial repository on BitBucket it will improve my overall rating of the book since you will presumably be able to test the code as it progresses through the book (only the first three chapters' code is up there at the moment). The last sections of the book on development methods are in particular very helpful.

If you decide to buy the book, it's a good excuse to learn the basics of revision control with Mercurial.

I believe in picking up operating projects and working them though, helps me learn better and also seeing good practices. A new pretty comprehensive blog engine is Mingus on bit bucket, worth a look, still early stage, but is teaching me a lot, there are others take your pick.

dartdog