Programming Books C Java PHP Python Learn more Browse Programming Books
Sams Teach Yourself Django in 24 Hours and over one million other books are available for Amazon Kindle. Learn more
Buy Used
FREE Shipping on orders over $35.
Used: Very Good | Details
Condition: Used: Very Good
Comment: While this book has been loved by someone else, they left it in great condition. Hurry and buy it before someone else does and take advantage of our FREE Super Saver Shipping!!! (there is a chance this book could contain a gift inscription)
Add to Cart
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more

Sams Teach Yourself Django in 24 Hours Paperback

ISBN-13: 978-0672329593 ISBN-10: 067232959X Edition: 1st

See all 3 formats and editions Hide other formats and editions
Amazon Price New from Used from Collectible from
"Please retry"
"Please retry"
$15.60 $1.60



Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 528 pages
  • Publisher: Sams Publishing; 1 edition (March 3, 2008)
  • Language: English
  • ISBN-10: 067232959X
  • ISBN-13: 978-0672329593
  • Product Dimensions: 9 x 7 x 1.2 inches
  • Shipping Weight: 1.8 pounds
  • Average Customer Review: 2.3 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #1,381,769 in Books (See Top 100 in Books)

Editorial Reviews

About the Author

Brad Dayley is a senior software engineer in Novell’s Product Development Group. He has 16 years of experience in designing, developing, and implementing software from the kernel level through web development. He is the author of several books on server and network management as well as programming languages. When he is not developing software or writing books, he can be found biking, hiking, and/or Jeeping somewhere in the remote regions of the western United States with his wife, DaNae, and four sons.

Excerpt. © Reprinted by permission. All rights reserved.



I have been working with the Django framework for about a year and a half, and I love it. Every so often you run into ideas that make absolute, complete sense, and Django is one of those. The folks at Django seem to be bent on making it the most elegant web framework available, and so far they are doing a great job.

This was a tough book to write. The Django framework is simple to implement, but you can accomplish so much with it. The format of this book is Teach Yourself in 24 Hours. The idea is that after spending 24 hours with this book and a Django installation, you should have a pretty good idea of how to use Django to build a full-featured production website.

Throughout this book, I use a fictitious website project called iFriends to illustrate the building blocks of a Django-powered website. The book has several "Try It Yourself" sections that take you through specific tasks of building the iFriends website. Actually do the "Try It Yourself" sections. They will help everything else make a lot more sense. They build on each other, so if you skip one, future "Try It Yourself" sections may not work properly.

When you have finished the "Try It Yourself" sections, you will have a mostly functional website. You should easily have enough skills by then that you could tweak and finish the website on your own in only a few hours if you wanted to. There just wasn't enough room in the book to finish every component. I felt it was much more important to cover the topics that I did.

I do have one disclaimer: There is absolutely no CSS code in my HTML template examples. I would much rather have used CSS code to format my HTML templates than the classic HTML tags (some of them deprecated) that I used. I chose not to include CSS for two important reasons. The first reason is room. Adding CSS files to all the examples would have taken quite a bit more room, which I didn't have. The second reason is that this book is designed for Python programmers as well as HTML programmers. Using CSS for someone who is not as familiar with it could provide a distraction. This book is about learning to implement the Django framework. CSS programming techniques belong in a different book.

When designing the content for this book, I tried to come up with the most relevant way to present the Django framework that will actually help programmers develop websites that are pertinent to real-world needs. I know that a few components and concepts have been left out. I welcome your comments and any suggestions on things that you feel need to be added to this book. If I get a chance, I will try to incorporate them into future revisions of the book. You can email any queries or suggestions to

I hope you enjoy the Django framework as much as I have and that the concepts in this book prove useful to you.

Who Should Read This Book

This book should be read by anyone who is developing or even considering developing websites. The Django framework saves web developers a lot of time and headaches. This book is designed for website developers who have at least some familiarity with the Python programming language. Don't worry if you are not very familiar with Python. You should be able to pick up on what is going on with a few visits to

How This Book Is Organized

This book is organized into four parts that help you quickly navigate the Django framework so that you will have the knowledge necessary to leverage the framework to build production websites. I tried to design the book to start slowly so that you will be able to build a good foundation for the Django framework. Then, as the hours (chapters) progress, the book delves deeper into different aspects of the Django framework.

  • Part I, "Creating the Website Framework," covers the basics of installing, configuring, and using the Django framework to build basic websites. You are introduced to the model, template, and view concepts that Django uses to implement websites.

  • Part II, "Implementing the Website Interface," covers building templates and views to build web pages. You will learn how to use templates and views to store, access, and retrieve data that is stored in the website's database.

  • Part III, "Implementing a Full-Featured Website," covers adding authentication, cookie handling, and other features necessary to implement a full production website. You will learn how to create users and groups and how to assign permissions to specific data.

  • Part IV, "Implementing Advanced Website Components," covers some of the advanced features of the Django framework that you will likely want to implement in production websites. You will learn how to implement middleware to enable advanced request and response handlers. You will also learn how to implement localized strings to add multiple-language capability to the website, implement caching to improve website performance, and deploy a Django website.

How to Use This Book

The Teach Yourself in 24 Hours series has several unique elements that will help you as you are trying to learn the Django framework. Throughout the book, I use the following elements to draw attention to specific concepts:

Tip - This element provides information about slightly off-topic tangents that may be beneficial to you but that are not necessarily directly related to the current section.

Caution - This element provides information that is directly related to the current section but that does not necessarily flow with the text. It discusses what is happening in the background or points that you may not easily pick up on but that are important.

Caution - This element notes important things that you need to know before proceeding through the book. It is important to read these sections to avoid problems with your website.

The "Try It Yourself" sections are designed to take you through the steps of actually performing the tasks that you have been reading about. Do not skip these sections. They usually provide additional information about the topic and are a great chance to practice the concepts.

At the end of each hour, you will find the following sections that are designed to help you solidify what you have read:

  • The "Q&A" section poses questions and gives answers on concepts that are related to the hour but that fall outside what is covered in the book.

  • The "Quiz" section provides questions and answers about the topics covered in each hour.

  • The "Exercises" section lists activities that you can do to practice what you have learned during the hour. These exercises are a great way to strike out on your own a bit and get more confident with Django.

© Copyright Pearson Education. All rights reserved.

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Code examples frequently don't work.
Brian Melton
That said, I don't know if I would have survived learning Django with this book if I had started from scratch.
Jamie Arseneault
For a "how to" book this title is filled with errors.

Most Helpful Customer Reviews

13 of 15 people found the following review helpful By C. Young VINE VOICE on April 22, 2008
Format: Paperback Verified Purchase
I have this book and have read most of it, and I think the 1 star reviews here are overly critical and not really deserved.

Yes, the book has some mistakes in it, but most computer books do. I think this book gives you enough instruction that if a code snippet does have an error in it, you can easily identify what it is and fix it yourself. Also, most code snippets are listed more than once, and if I remember correctly, errors present in one code snippet were not present in the others.

I originally learned Django from the Django project's website, but it lacks in a lot of areas. Some features of the framework are covered really well, and others aren't.

When The Django Book came out, I bought it, read it, and gave it a really good review, but the truth is that is suffers from the same lack of consistent focus that the Django website does; some things are covered well and others are lightly touched upon.

I think that is where this book comes in. For me anyway, it filled in some of the missing pieces and clarified some aspects of Django that had been a bit hazy for me before.

None of the other documentation or currently published books provide you with a complete view of Django, and neither does this one. It does, however, provide pieces to the puzzle that the other documentation doesn't. Therefore, I would not write it off as some reviewers have. It does provide value.
2 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
7 of 8 people found the following review helpful By Michael McKee TOP 1000 REVIEWERVINE VOICE on June 7, 2008
Format: Paperback
First off, there are a number of code errors in this book. Look at some other reviews of Sam's 24 Hours or 24 Days books and you will find that this is common. Apparently one of the reasons that these books are so inexpensive is that the publisher doesn't spend money on technical reviews. I knew that when I got this book so was not disappointed. I have just enough coding experience that I am able to catch obvious mistakes and not get bogged down by the sample code. I can see why someone who is less experienced might find the book unacceptable. To be fair, the book description does mention that it is for people with some Python background, who should be able to spot mistakes in the text.

On the plus side this book actually does a good job of offering Django basics in a logical and straightforward manner. It is a well thought out and paced tutorial and currently the only one available.

I find the Definitive Guide to be more of a reference book than a training one. If you are already an experienced programmer then skip the Sam's volume. If, like me, you have some background but need a step-by-step primer then this book is pretty good. The not yet released Django Projects book might be better but this is what's here now and it has given me enough of a background that I can understand the more advanced material of the Definitive Guide to Django.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 6 people found the following review helpful By Teo Choong Ping on April 17, 2008
Format: Paperback
This is indeed a good beginner Django book and no doubt will teach you Django in the short 24 hours. However do note that you will not be an expert in Django, but enough to get started and get things going. The real stuff in the online reference anyway. :-)

I did find the chapter on Model lacking and seems incomplete -- hence the 4 stars. But this could be because Django API is still growing, as reflected by the online API.

In short this book delivers the promise of learning Django in 24 hours.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By Rob on May 31, 2009
Format: Paperback
For a "how to" book this title is filled with errors. Examples are incorrect, parameters are misspelled and the instructions are not correct for the current stable release of Django (1.0.3).

Complete waste of money. Perhaps back in 2008 when it was written it was better, but still there were errors that can't be explained by the version alone.

Skip this one.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By Jesse J. Aiton on October 10, 2008
Format: Paperback
I would have given this book 4 stars if there had only been one or two errors. However, there are so many errors that it breaks your concentration on learning the Django framework. There are so many errors that I had to dock it 2 stars!

If you don't mind the examples being broken in just about every chapter, this book is worth reading.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By scott adams on June 29, 2008
Format: Paperback
I give this book a 3. I think the way it is presented and the pace is good. However I think a lot of the errors go beyond just minor typos and cause much confusion and waste of time. On the bright side, figuring out why the code doesn't work and finding the errors in the book was also very instructive and showed to me that Djangos error system is very good.

I would like to find a book that would let you display images in a Django app with the development server, out of the box. Does anyone know how to do it?
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
By Earl3 on January 26, 2013
Format: Paperback Verified Purchase
I bought this book, and wish I hadn't. I also wish that I'd noticed that the "good" reviews for this book were all written in 2008.

First off there are typos, typos, typos. When you're trying to learn code by following the steps in this book, be prepared to spend a lot of time debugging. There are pages where the author shows you want to type, then on the following page in the recap he shows different code.

The biggest problem is that the book is out of date. If you're trying to learn the current version of Django then many of the examples listed in this book do not work at all. You're better off going to the Django website and reading their on-line tutorials than trying to use this book. For example, in Hour 3 you learn how to set up the admin interface and make your "Person" model editable with the admin interface, except that the instructions do not work at all. I spent about an hour trying to figure out what I'd done wrong, then I finally went to the Django website, read their instructions, and realized that the Sam's book was just so far out of date that it's instructions were useless.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Product Images from Customers

Most Recent Customer Reviews