The Definitive Guide to Django: Web Development Done Right by Adrian Holovaty, Jacob Kaplan-Moss (auth.)

By Adrian Holovaty, Jacob Kaplan-Moss (auth.)

Django, the Python-based comparable to Ruby’s Rails net improvement framework, is among the preferred themes in internet improvement this present day. Its author (and co-author of this ebook) Adrian Holovaty has develop into a big name of types end result of the compelling array of net functions he’s outfitted utilizing Django, together with such a lot significantly http://chicagocrime.org. Holovaty and Django lead developer Jacob Kaplan-Moss have created this ebook because the definitive advisor to the technology.

Django: net improvement performed correct is split into 3 elements, with the 1st introducing Django basics comparable to set up and configuration, and developing the elements that eventually interact to strength a Django-driven web site. half II delves into the extra subtle positive aspects of Django, comparable to outputting non-HTML content material like RSS feeds and PDFs, caching, and person administration. half III is an in depth connection with Django’s many configuration innovations and instructions. This ebook serves as either the final word instructional and the go-to reference in this well known framework.

Show description

Read or Download The Definitive Guide to Django: Web Development Done Right PDF

Similar python books

Fundamentals of Python: From First Programs through Data Structures

In basics OF PYTHON: FROM FIRST courses via information buildings, Washington and Lee collage professor Kenneth A. Lambert provides all the very important themes in CS1 and CS2 in a single quantity. This reasonably-priced layout presents teachers with a constant method of educating introductory programming and knowledge buildings over a regular two-term direction series.

Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython

Python for info research is worried with the nuts and bolts of manipulating, processing, cleansing, and crunching facts in Python. it's also a realistic, smooth creation to clinical computing in Python, adapted for data-intensive functions. it is a ebook in regards to the elements of the Python language and libraries you'll have to successfully remedy a large set of knowledge research difficulties.

Python and AWS

In the event you intend to take advantage of Amazon internet providers (AWS) for distant computing and garage, Python is a perfect programming language for constructing purposes and controlling your cloud-based infrastructure. This cookbook will get you began with greater than dozen recipes for utilizing Python with AWS, in line with the author’s boto library.

Artificial Intelligence with Python

Construct real-world man made Intelligence purposes with Python to intelligently engage with the area round you approximately This e-book Step into the fantastic global of clever apps utilizing this finished advisor input the realm of man-made Intelligence, discover it, and create your personal purposes paintings via easy but insightful examples that might get you up and operating with man made Intelligence very quickly Who This booklet Is For This ebook is for Python builders who are looking to construct real-world synthetic Intelligence purposes.

Additional info for The Definitive Guide to Django: Web Development Done Right

Example text

The view function, hours_ahead, takes two parameters: request and offset. • request is an HttpRequest object, just as in current_datetime. We’ll say it again: each view always takes an HttpRequest object as its first parameter. • offset is the string captured by the parentheses in the URLpattern. For example, if the requested URL were /time/plus/3/, then offset would be the string '3'. If the requested URL were /time/plus/21/, then offset would be the string '21'. Note that captured strings will always be strings, not integers, even if the string is composed of only digits, such as '21'.

1:8000/time/plus/100/ to verify that the pattern in your URLconf 27 28 CHAPTER 3 ■ THE BASICS OF DYNAMIC WEB PAGES only accepts one- or two-digit numbers; Django should display a “Page not found” error in this case, just as we saw in the “404 Errors” section earlier. 1:8000/time/ plus/ (with no hour designation) should also throw a 404. py file now contains two views. " % (offset, dt) return HttpResponse(html) Django’s Pretty Error Pages Take a moment to admire the fine Web application we’ve made so far .

It’s quite slick. Setting Up a Database Django’s only prerequisite is a working installation of Python. However, this book focuses on one of Django’s sweet spots, which is developing database-backed Web sites, so you’ll need to install a database server of some sort for storing your data. If you just want to get started playing with Django, skip ahead to the “Starting a Project” section—but trust us, you’ll want to install a database eventually. All of the examples in this book assume you have a database set up.

Download PDF sample

Rated 4.63 of 5 – based on 19 votes