Hacker News new | past | comments | ask | show | jobs | submit login
The Django Book (djangobook.com)
122 points by pajju on Nov 25, 2012 | hide | past | favorite | 17 comments



I've been using Python3 intensely for three or four years and have long forgotten Python2. I'm teaching my kids to program, and that means the living Python not the living dead zombie Python.

I work in other languages, too, but I'd like to switch to Python3 for webdev if practical. Part of that is the ongoing need to prune the garden of knowledge, so I can sharpen my focus on what I decide to keep. Part is because Python3 is the only language my kids know, and I'd like to get them involved in some of what I do.

I would consider Django if there were good resources, such as an edition of this book, that taught Django as a Python3 web framework. I don't know enough about Django to know what's reasonable, but if the Django community updates this book from Python-1998 to Python-2005 then my kids and I will check it out--when it goes on display in the Computer History Museum.

But if it is reasonable to aim the next edition of this book at pure Python3, I might be interested. Django itself might not allow it, for all I know, in which case the book I'm talking about would be irrelevant. I really don't know.

What I'd really like to find is a production-ready framework in which Python3 was the assumed language of the framework, docs, and community, and Python2, if mentioned at all, was the "special case" that was "experimentally supported."


I completely agree. I consider myself lucky that I don't rely on Python for any production code, so I can do all the work that I want in Python 3 despite most resources being focused on 2.X. I'm considering switching back to Django for certain client work though, so the experimental support in Django 1.5 was quite timely and might give me a chance to go through it and see what needs work. Hopefully some of the Django devs have the time and can see the benefit of investing in support for Python 3.


I've used python2.7 for the last two years, and I'm probably part of the problem, but python 3 really doesn't have enough killer features for me to be incentivized.


Django 1.5 will include alpha Python3 support. https://docs.djangoproject.com/en/dev/topics/python3/


That's what I said in the other reply. Python community is stuck with three versions: 2.6.5, 2.7.x, and 3.x (and now 3.3). Cpython should now announce a deadline for support for 2.6.5 and 2.7.x. I don't think 2.7.x is catching up with Python 3.3 branch anymore. I am not sure. The versioning 3.1, 3.2, 3.3 still throwing people off, at least for me.


For those like me who wondered why this was posted since the book content was out of date: The Django Book project needs help updating the book to cover Django 1.4 and beyond. Send pull requests to https://github.com/jacobian/djangobook.com


Do you know if there's an issue tracker or list of topics that need work anywhere? I'd be interested in contributing, but I'd rather not scan the whole text for things to fix (and risk duplicating effort with others)


It's slightly disappointing that the revision will not at all focus on Django 1.5 that would operate on Python3. Perhaps a few 'If you're doing this on Python3' side-notes will suffice?


Django 1.4.2 is still alive! 1.5 support for Python 3 is still considered "experimental". It wouldn't get mature until 1.7, or even 1.7 IMHO. Python community is now stuck at 2.6.5/6, 2.7.3 and 3.x, which does screws people over. Lots of changes in 3.3 now. I am not even sure if 2.7.x is catching up with the 3.3 branch. I doubt.


Cool, although I remember when the Dojo Book was the primary documentation for Dojo Tookit before there was any reference. It was quite a frustrating experience. While books like these are useful, the book format is not a great main source of documentation for a library or a framework.


Your point does not really apply because Django had a pretty good reference and tutorial from day one and the docs are kept up-to-date.


It puzzles me that there is no dedicated chapter on testing.


It's sorely needed. Unit testing for django is not very well documented. The best guide I've found out there is probably by Daniel Lindsley @ toastdriven.[0] However, even that guide suggests using fixture data which break badly as a project grows (I've experienced this first hand), so I'd much prefer a factories based testing chapter.[1]

[0]: http://toastdriven.com/blog/2011/apr/10/guide-to-testing-in-... [1]: https://pycon-2012-notes.readthedocs.org/en/latest/testing_a..., http://pyvideo.org/video/699/testing-and-django


Thanks for [1]. It has some good points.


[1] is great - thanks a lot!


Pull requests gladly accepted.


there is a chapiter on testing in the official doc which is quite good. And i'm sure you can make a contribution so everybody can enjoy your expertise on the matter.




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

Search: