By Adrian Holovaty, Jacob Kaplan-Moss

This newest variation of The Definitive consultant to Django is up-to-date for Django 1.1, and, with the forward–compatibility make sure that Django now offers, should still function the final word educational and reference for this renowned framework for future years.

Django, the Python–based resembling Ruby’s Rails internet improvement framework, is likely one of the most well-liked issues in net improvement at the present time. Lead developer Jacob Kaplan–Moss and Django writer Adrian Holovaty convey you the way they use this framework to create award–winning websites by means of guiding you thru the construction of an online program comparable to ChicagoCrime.org.

The Definitive consultant to Django is damaged into 3 elements, with the 1st introducing Django basics similar to set up and configuration, and developing the parts that jointly strength a Django–driven website. the second one half delves into the extra subtle positive aspects of Django, together with outputting non–HTML content material corresponding to RSS feeds and PDFs, caching, and person administration. The appendixes function a close connection with Django’s many configuration innovations and instructions.

What you’ll learn

  • The first half this ebook explains extensive how you can construct internet functions utilizing Django together with the fundamentals of dynamic websites, the Django templating method interacting with databases, and net kinds.
  • The moment half this ebook discusses higher-level techniques akin to caching, protection, and the way to install Django.
  • The appendixes shape a reference for the instructions and configurations on hand in Django.

Who this publication is for

somebody who desires to use the robust Django framework to construct dynamic sites speedy and simply.

Table of Contents

  1. Introduction to Django
  2. Getting all started
  3. Views and URLconfs
  4. Templates
  5. Models
  6. The Django Admin web site
  7. Forms
  8. Advanced perspectives and URLconfs
  9. Advanced Templates
  10. Advanced types
  11. Generic perspectives
  12. Deploying Django
  13. Generating Non-HTML content material
  14. Sessions, clients, and Registration
  15. Caching
  16. django.contrib
  17. Middleware
  18. Integrating with Legacy Databases and functions
  19. Internationalization
  20. Security

Show description

Preview of The Definitive Guide to Django: Web Development Done Right (Expert's Voice in Web Development) PDF

Best Web Development books

Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL (The Morgan Kaufmann Series in Data Management Systems)

Completely clever programmers frequently fight while pressured to paintings with SQL. Why? Joe Celko believes the matter lies with their procedural programming approach, which retains them from taking complete good thing about the facility of declarative languages. the result's overly complicated and inefficient code, let alone misplaced productiveness.

Internet & World Wide Web How to Program (3rd Edition) (How to Program (Deitel))

The aim of Deitel & affiliates, Inc. 's web & world-wide-web tips to software, 3/e is to introduce readers with very little programming event to the fascinating international of Web-based functions. This complete ebook with accompanying CD-ROM teaches the basics had to software on the net.

Python Web Development with Django

Utilizing the straightforward, powerful, Python-based Django framework, you could construct strong net options with remarkably few traces of code. In Python net improvement with Django®, 3 skilled Django and Python builders conceal the entire ideas, instruments, and ideas you must utilize Django 1. zero, together with all of the significant gains of the hot liberate.

PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)

Readers can take their Hypertext Preprocessor talents to the subsequent point with this absolutely revised and up to date Hypertext Preprocessor complicated: visible QuickPro consultant, 3rd variation! jam-packed with fourteen chapters of step by step content material and written via bestselling writer and personal home page programmer Larry Ullman, this consultant teaches particular subject matters in direct, concentrated segments, indicates how personal home page is utilized in real-world purposes.

Additional info for The Definitive Guide to Django: Web Development Done Right (Expert's Voice in Web Development)

Show sample text content

213 getting ready Your Codebase for creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Turning Off Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Turning Off Template Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 imposing a 404 Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 imposing a 500 Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 developing errors signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 constructing damaged hyperlink indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 utilizing diverse Settings for creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 DJANGO_SETTINGS_MODULE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 NC O N T E N T S utilizing Django with Apache and mod_python . . . . . . . . . . . . . . . . . . . . . . . 218 uncomplicated Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 operating a number of Django Installations at the comparable Apache example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 operating a improvement Server with mod_python . . . . . . . . . . . . . . 220 Serving Django and Media records from a similar Apache example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 mistakes dealing with . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 dealing with a Segmentation Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 an alternate: mod_wsgi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 utilizing Django with FastCGI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 FastCGI evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 operating Your FastCGI Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 utilizing Django with Apache and FastCGI . . . . . . . . . . . . . . . . . . . . . . . 224 FastCGI and lighttpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 operating Django on a Shared-Hosting supplier with Apache . . . . . 227 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 operating on a unmarried Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 setting apart Out the Database Server . . . . . . . . . . . . . . . . . . . . . . . . . 229 working a Separate Media Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 enforcing Load Balancing and Redundancy . . . . . . . . . . . . . . . 230 Going great . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 functionality Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 There’s No Such factor As an excessive amount of RAM . . . . . . . . . . . . . . . . . . . . 233 flip Off Keep-Alive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Use Memcached. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Use Memcached usually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 subscribe to the dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 What’s subsequent? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 half three NNN bankruptcy thirteen different Django gains producing Non-HTML content material . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 the fundamentals: perspectives and MIME varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 generating CSV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 producing PDFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 fitting ReportLab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Writing Your View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 advanced PDFs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 xiii xiv NCO NTENT S different percentages . . . . . . . . . .

Download PDF sample

Rated 4.35 of 5 – based on 34 votes