وبلاگ بلیان

Python Web Development with Django

جلد کتاب Python Web Development with Django

معرفی کتاب «Python Web Development with Django» نوشتهٔ Jeff Forcier, Paul Bissex, Wesley Chun، منتشرشده توسط نشر Addison-Wesley Professional در سال 2008. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Using the simple, robust, Python-based Django framework, you can build powerful Web solutions with remarkably few lines of code. In Python Web Development with Django®, three experienced Django and Python developers cover all the techniques, tools, and concepts you need to make the most of Django 1.0, including all the major features of the new release. The authors teach Django through in-depth explanations, plus provide extensive sample code supported with images and line-by-line explanations. You’ll discover how Django leverages Python’s development speed and flexibility to help you solve a wide spectrum of Web development problems and learn Django best practices covered nowhere else. You’ll build your first Django application in just minutes and deepen your real-world skills through start-to-finish application projects including - Simple Web log (blog) - Online photo gallery - Simple content management system - Ajax-powered live blogger - Online source code sharing/syntax highlighting tool - How to run your Django applications on the Google App Engine This complete guide starts by introducing Python, Django, and Web development concepts, then dives into the Django framework, providing a deep understanding of its major components (models, views, templates), and how they come together to form complete Web applications. After a discussion of four independent working Django applications, coverage turns to advanced topics, such as caching, extending the template system, syndication, admin customization, and testing. Valuable reference appendices cover using the command-line, installing and configuring Django, development tools, exploring existing Django applications, the Google App Engine, and how to get more involved with the Django community. Table of Contents 7 Introduction 26 Where Web Frameworks Come From 26 A Better Way 27 We’re Not in Kansas Anymore 27 Web Development Is Better with Python and Django 28 I: Getting Started 30 1 Practical Python for Django 32 Python Skills Are Django Skills 32 Getting Started: Python’s Interactive Interpreter 33 Python Basics 35 Python Standard Types 36 Flow Control 53 Exception Handling 55 Files 58 Functions 59 Object-Oriented Programming 69 Regular Expressions 72 Common Gotchas 73 Coding Style (PEP 8 and Beyond) 78 Summary 80 2 Django for the Impatient: Building a Blog 82 Creating the Project 83 Running the Development Server 84 Creating the Blog Application 86 Designing Your Model 87 Setting Up the Database 87 Setting Up the Automatic admin Application 90 Trying Out the admin 91 Making Your Blog’s Public Side 95 Finishing Touches 98 Summary 100 3 Starting Out 102 Dynamic Web Site Basics 102 Understanding Models, Views, and Templates 104 Overall Django Architecture 107 Core Philosophies of Django 107 Summary 111 II: Django in Depth 112 4 Defining and Using Models 114 Defining Models 114 Using Models 127 Summary 141 5 URLs, HTTP Mechanisms, and Views 142 URLs 142 Modeling HTTP: Requests, Responses, and Middleware 147 Views/Logic 152 Summary 158 6 Templates and Form Processing 160 Templates 160 Forms 167 Summary 179 III: Django Applications by Example 182 7 Photo Gallery 184 The Model 185 Preparing for File Uploads 186 Installing PIL 187 Testing ImageField 188 Building Our Custom File Field 189 Using ThumbnailImageField 194 Setting Up DRY URLs 194 The Item App’s URL Layout 197 Tying It All Together with Templates 198 Summary 204 8 Content Management System 206 What’s a CMS? 206 The Un-CMS: Flatpages 207 Beyond Flatpages: A Simple Custom CMS 210 Possible Enhancements 227 Summary 228 9 Liveblog 230 What Exactly Is Ajax? 230 Planning the Application 231 Laying Out the Application 233 Putting the Ajax In 236 Summary 244 10 Pastebin 246 Defining the Model 247 Creating the Templates 248 Designing the URLs 250 Trying It Out 251 Limiting Number of Recent Pastes Displayed 254 Syntax Highlighting 255 Cleanup Via Cron Job 256 Summary 257 IV: Advanced Django Techniques and Features 258 11 Advanced Django Programming 260 Customizing the Admin 260 Using Syndication 265 Generating Downloadable Files 268 Enhancing Django’s ORM with Custom Managers 273 Extending the Template System 275 Summary 285 12 Advanced Django Deployment 286 Writing Utility Scripts 286 Customizing the Django Codebase Itself 289 Caching 290 Testing Django Applications 299 Summary 306 V: Appendices 308 A: Command Line Basics 310 Putting the “Command” in “Command Line” 310 Options and Arguments 313 Pipes and Redirection 314 Environment Variables 316 The Path 318 Summary 319 B: Installing and Running Django 320 Python 320 Django 326 Web Server 328 SQL Database 333 Summary 336 C: Tools for Practical Django Development 338 Version Control 338 Project Management Software 343 Text Editors 344 D: Finding, Evaluating, and Using Django Applications 346 Where to Look for Applications 346 How to Evaluate Applications 347 How to Use Applications 348 Sharing Your Own Application 348 E: Django on the Google App Engine 350 Why the App Engine Matters 350 Pure Google App Engine Applications 351 Limitations of the App Engine Framework 351 Google App Engine Helper for Django 352 Integrating the App Engine 353 Creating a New Django Application That Runs on App Engine 358 Summary 359 Online Resources 359 F: Getting Involved in the Django Project 362 Index 364 A 364 B 367 C 368 D 371 E 378 F 379 G 381 H 382 I 382 J 383 K 384 L 384 M 385 N 387 O 388 P 388 Q 391 R 392 S 393 T 395 U 396 V 397 W 398 X–Z 399 Colophon 400
دانلود کتاب Python Web Development with Django