Table of Contents
Preface
Chapter 1: Introduction to Django
Chapter 2: Getting Started
Chapter 3: Building a Social Bookmarking Application
Chapter 4: User Registration and Management
Chapter 5: Introducing Tags
Chapter 6: Enhancing the User Interface with Ajax
Chapter 7: Voting and Commenting
Chapter 8: Creating an Administration Interface
Chapter 9: Advanced Browsing and Searching
Chapter 10: Building User Networks
Chapter 11: Extending and Deploying
Chapter 12: What Next?
Index
- Chapter 1: Introduction to Django
- The MVC Pattern in Web Development
- Why Python?
- Why Django?
- Tight Integration between Components
- Object-Relational Mapper
- Clean URL Design
- Automatic Administration Interface
- Advanced Development Environment
- Multi-Lingual Support
- History of Django
- Summary
- Chapter 2: Getting Started
- Installing the Required Software
- Installing Python
- Installing Python on Windows
- Installing Python on UNIX/Linux
- Installing Python on Mac OS X
- Installing Django
- Installing Django on Windows
- Installing Django on UNIX/Linux and Mac OS X
- Installing a Database System
- Installing Python
- Creating Your First Project
- Creating an Empty Project
- Setting up the Database
- Launching the Development Server
- Summary
- Installing the Required Software
- Chapter 3: Building a Social Bookmarking Application
- A Word about Django Terminology
- URLs and Views: Creating the Main Page
- Creating the Main Page View
- Creating the Main Page URL
- Models: Designing an Initial Database Schema
- The Link Data Model
- The User Data Model
- The Bookmark Data Model
- Templates: Creating a Template for the Main Page
- Putting It All Together: Generating User Pages
- Creating the URL
- Writing the View
- Designing the Template
- Populating the Model with Data
- Summary
- Chapter 4: User Registration and Management
- Session Authentication
- Creating the Login Page
- Enabling Logout Functionality
- Improving Template Structure
- User Registration
- Django Forms
- Designing the User Registration Form
- Account Management
- Summary
- Session Authentication
- Chapter 5: Introducing Tags
- The Tag Data Model
- Creating the Bookmark Submission Form
- Restricting Access to Logged-in Users
- Methods for Browsing Bookmarks
- Improving the User Page
- Creating a Tag Page
- Building a Tag Cloud
- A Word on Security
- SQL Injection
- Cross-Site Scripting (XSS)
- Summary
- Chapter 6: Enhancing the User Interface with Ajax
- Ajax and Its Advantages
- Using an Ajax Framework in Django
- Downloading and Installing jQuery
- The jQuery JavaScript Framework
- Element Selectors
- jQuery Methods
- Hiding and Showing Elements
- Accessing CSS Properties and HTML Attributes
- Manipulating HTML Documents
- Traversing the Document Tree
- Handling Events
- Sending Ajax Requests
- What Next?
- Implementing Live Searching of Bookmarks
- Implementing Searching
- Implementing Live Searching
- Editing Bookmarks in Place
- Implementing Bookmark Editing
- Implementing In-Place Editing of Bookmarks
- Auto-Completion of Tags
- Summary
- Chapter 7: Voting and Commenting
- Sharing Bookmarks on the Main Page
- The SharedBookmark Data Model
- Modifying the Bookmark Submission Form
- Browsing and Voting for Shared Bookmarks
- The Popular Bookmarks Page
- Commenting on Bookmarks
- Enabling the Comments Application
- Creating a View for Comments
- Displaying Comments and a Comment Form
- Creating Comment Templates
- Summary
- Sharing Bookmarks on the Main Page
- Chapter 8: Creating an Administration Interface
- Activating the Administration Interface
- Customizing the Administration Interface
- Customizing Listing Pages
- Overriding Administration Templates
- Users, Groups and Permissions
- User Permissions
- Group Permissions
- Using Permissions in Views
- Summary
- Chapter 9: Advanced Browsing and Searching
- Adding RSS Feeds
- Creating the Recent Bookmarks Feed
- Customizing Item Fields
- Creating the User Bookmarks Feed
- Linking Feeds to HTML Pages
- Creating the Recent Bookmarks Feed
- Advanced Searching
- Retrieving Objects with the Database API
- Advanced Queries with Q Objects
- Improving the Search Feature
- Organizing Content into Pages (Pagination)
- Summary
- Adding RSS Feeds
- Chapter 10: Building User Networks
- Building Friend Networks
- Creating the Friendship Data Model
- Writing Views to Manage Friends
- The Friends List View
- Creating the "Add Friend" View
- Inviting Friends Via Email
- The Invitation Data Model
- The "Invite a Friend" Form and View
- Handling Activation Links
- Improving the Interface with Messages
- Summary
- Building Friend Networks
- Chapter 11: Extending and Deploying
- Internationalization (i18n)
- Marking Strings as Translatable
- Creating Translation Files
- Enabling and Configuring the i18n System
- Improving Performance with Caching
- Enabling Caching
- Simple Caching
- Database Caching
- File System Caching
- Memcached
- Configuring Caching
- Caching the Whole Site
- Caching Specific Views
- Enabling Caching
- Unit Testing
- The Test Client
- Testing the Registration View
- Testing the "Save Bookmark" View
- Deploying Django
- The Production Web Server
- The Production Database
- Turning Off Debug Mode
- Changing Configuration Variables
- Setting Error Pages
- Summary
- Internationalization (i18n)
- Chapter 12: What Next?
- Custom Template Tags and Filters
- Model Managers and Custom SQL
- Generic Views
- Contributed Sub-Frameworks
- Flatpages
- Sites
- Markup Filters
- Humanize
- Sitemaps
- Cross-site Request Forgery Protection
- Message System
- Subscription System
- User Scores
- Summary