چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Django Unleashed

Pinkham, Andrew

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Pinkham, Andrew
سال انتشار
۲۰۱۶
فرمت
PDF
زبان
انگلیسی
حجم فایل
۲۶٫۸ مگابایت
شابک
9780321985071، 0321985079

دربارهٔ کتاب

Django is an amazingly powerful system for creating modern, dynamic websites. But programming Django hasn’t always been easy–until now. __**Django Unleashed**__ is your step-by-step, beginner-friendly guide to leveraging Django’s core capabilities and its powerful contributed library. You’ll learn in the most effective way possible: hands on, by building a fully functional Django website from scratch. You’ll even deploy the website to the cloud. As you build your website, expert Django consultant and trainer Andrew Pinkham reveals how websites operate; how Django makes building websites easy; how to write Python code that leverages its immense capabilities; and how to build solutions that are robust, reliable, and secure. You’ll start simply and learn to solve increasingly challenging problems: mastering new features and understanding how Django’s architecture shapes their behavior, and gaining essential knowledge for working with any web framework, not just Django. Drawing on his extensive experience teaching Django, Pinkham answers the key questions beginners ask most often. And as you gain experience, you’ll learn advanced techniques for enhancing site functionality and performance, strengthening security, promoting code reuse, and much more. **Detailed information on how to...** * Quickly start a new Django project and establish a strong foundation for a growing site * Define how your data is organized and create a SQLite database to manage it * Quickly produce HTML with Django templates * Create dynamic webpages with Django’s URL patterns and views, including function views, class-based views, and generic views * Enable efficient, reliable data input with Django Forms and custom form validations * Understand the Model-View-Controller (MVC) architecture, compare it to Model-Template-Views, and gain a holistic understanding of Django’s structure * Write as little code as possible, simplify code reuse, and mitigate software decay by adhering to the Don’t Repeat Yourself paradigm. * Dive into Django source code to troubleshoot problems * Extend site functionality with Django’s contributed library * Protect your site with user authentication and permissions * Avoid security pitfalls such as SQL Injection, XSS, and CSRF * Optimize site performance * Deploy your site to a managed cloud service and to a PostgreSQL database Contents 6 Preface 14 Acknowledgments 18 About the Author 20 I: Django’s Core Features 22 1 Starting a New Django Project: Building a Startup Categorizer with Blog 24 1.1 Introduction 24 1.2 Website Basics 25 1.3 Understanding Modern Websites 26 1.4 Building Modern Websites: The Problems That Frameworks Solve and Their Caveats 27 1.5 Django: Python Web Framework 29 1.6 Defining the Project in Part I 32 1.7 Creating a New Django Project and Django Apps 34 1.8 Putting It All Together 42 2 Hello World: Building a Basic Webpage in Django 44 2.1 Introduction 44 2.2 Creating and Integrating a New App 45 2.3 Building Hello World 46 2.4 Displaying Hello World 47 2.5 Controller Limitations: The Advantages of Models and Views 48 2.6 Removing Our Helloworld App from Our Project 48 2.7 Putting It All Together 50 3 Programming Django Models and Creating a SQLite Database 52 3.1 Introduction 52 3.2 Why Use a Database? 53 3.3 Organizing Our Data 53 3.4 Specifying and Organizing Data in Django Using Models 57 3.5 Using Django to Automatically Create a SQLite Database with manage.py 70 3.6 Manipulating Data in the Database: Managers and QuerySets 77 3.7 String Case Ordering 89 3.8 Putting It All Together 92 4 Rapidly Producing Flexible HTML with Django Templates 94 4.1 Introduction 94 4.2 Revisiting Hello World: The Advantages of Templates 95 4.3 Understanding Django Templates and Their Goals 98 4.4 Choosing a Format, an Engine, and a Location for Templates 98 4.5 Building a First Template: A Single Tag Object 99 4.6 Building the Rest of Our App Templates 111 4.7 Using Template Inheritance for Design Consistency 123 4.8 Using Templates in Python with the Template, Context, and loader Classes 133 4.9 Putting It All Together 139 5 Creating Webpages with Controllersin Django: Views and URL Configurations 142 5.1 Introduction 142 5.2 The Purpose of Views and URL Configurations 143 5.3 Step-by-Step Examination of Django’s Use of Views and URL Configurations 147 5.4 Building Tag Detail Webpage 149 5.5 Generating 404 Errors for Invalid Queries 153 5.6 Shortening the Development Process with Django View Shortcuts 156 5.7 URL Configuration Internals: Adhering to App Encapsulation 164 5.8 Implementing the Views and URL Configurationsto the Rest of the Site 169 5.9 Class-Based Views 176 5.10 Redirecting the Homepage 184 5.11 Putting It All Together 187 6 Integrating Models, Templates, Views, and URL Configurations to Create Links between Webpages 190 6.1 Introduction 190 6.2 Generating URLs in Python and Django Templates 191 6.3 Using the url Template Tag to Build a Navigation Menu 196 6.4 Linking List Pages to Detail Pages 198 6.5 Creating Links on the Object Detail Pages 205 6.6 Revisiting Homepage Redirection 207 6.7 Putting It All Together 208 7 Allowing User Input with Forms 210 7.1 Introduction 210 7.2 Django Forms as State Machines 211 7.3 Creating TagForm, a Form for Tag Objects 211 7.4 Building the Forms for Startup,Newslink, and Post Models 227 7.5 Putting It All Together 231 8 Displaying Forms in Templates 232 8.1 Introduction 232 8.2 Creating a New Template to Create Tag Objects 232 8.3 Creating a New Template to Update Tag Objects 245 8.4 Creating a New Template to Delete Tag Objects 247 8.5 Creating Templates for StartupForm,NewsLinkForm, and PostForm 248 8.6 Reconsidering Template Inheritance 250 8.7 Putting It All Together 252 9 Controlling Forms in Views 254 9.1 Introduction 254 9.2 Webpages for Creating Objects 254 9.3 Webpages for Updating Objects 277 9.4 Webpages for Deleting Objects 289 9.5 Putting It All Together 297 10 Revisiting Migrations 300 10.1 Introduction 300 10.2 Last Week’s Episode (Reviewing Chapter 3) 300 10.3 Data Migrations 301 10.4 Schema Migrations 309 10.5 Putting It All Together 317 11 Bending the Rules: The Contact Us Webpage 320 11.1 Introduction 320 11.2 Creating a contact App 321 11.3 Creating the Contact Webpage 322 11.4 Splitting Organizer urls.py 329 11.5 Putting It All Together 331 12 The Big Picture 334 12.1 Introduction 334 12.2 Django’s Core 334 12.3 Webpages with Views and URL Configurations 337 12.4 Generating Webpages Thanks to Models and Templates 338 12.5 Interacting with Data via Forms 339 12.6 Intervening in Control Flow 340 12.7 Moving Forward 340 II: Djangos Contributed Libraries 342 13 Django’s Contributed Library 344 13.1 Introduction 344 13.2 Django’s Source Code (and Versioning) 344 13.3 Django’s contrib Code 346 13.4 Content (Not) Covered 348 13.5 Translation 349 13.6 Putting It All Together 350 14 Pagination: A Tool for Navigation 352 14.1 Introduction 352 14.2 A Word about URLs: Query versus Path 353 14.3 Discovering Django Pagination in the Shell 354 14.4 Paginating the Startup List Webpage 358 14.5 Pagination of Tag List Webpage Using the URL Path 366 14.6 Putting It All Together 372 15 Creating Webpages with Django Flatpages 374 15.1 Introduction 374 15.2 Enabling Flatpages 374 15.3 Anatomy of the App 376 15.4 Building an About Webpage 376 15.5 Linking to FlatPage Objects 384 15.6 Security Implications of FlatPages 384 15.7 Migrations for Sites and Flatpages 386 15.8 Putting It All Together 392 16 Serving Static Content with Django 394 16.1 Introduction 394 16.2 Adding Static Content for Apps 395 16.3 Adding Static Content for the Project 397 16.4 Integrating Real CSS Content 398 16.5 Putting It All Together 402 17 Understanding Generic Class-Based Views 404 17.1 Introduction 404 17.2 Building Generic Object Detail Pages 405 17.3 Why Use Classes for Generic Views? 414 17.4 Building Generic Object Create Pages 415 17.5 Replacing CBVs with GCBVs 416 17.6 Forgoing GCBVs 421 17.7 Adding Behavior with GCBV 422 17.8 Putting It All Together 437 18 Advanced Generic Class-Based View Usage 438 18.1 Introduction 438 18.2 Rapid Review of GCBV 439 18.3 Globally Setting Template Suffix for Update Views 440 18.4 Generating Pagination Links 440 18.5 Re-creating PostDetail with DateDetailView 447 18.6 Switching to GCBVs with PostGetMixin in Post Views 450 18.7 Making PostGetMixin Generic 453 18.8 Fixing NewsLink URL Patterns and Form Behavior 459 18.9 Putting It All Together 470 19 Basic Authentication 472 19.1 Introduction 472 19.2 Configuring Logging 473 19.3 Sessions and Cookies 477 19.4 auth App Anatomy: The Basics 478 19.5 Adding Login and Logout Features 479 19.6 Putting It All Together 493 20 Integrating Permissions 494 20.1 Introduction 494 20.2 Understanding contenttypes and Generic Relations 494 20.3 auth App Anatomy: Permission and Group Models 497 20.4 Protecting Views with Permissions 504 20.5 Conditionally Displaying Template Links 517 20.6 Displaying Future Posts in the Template 518 20.7 Putting It All Together 521 21 Extending Authentication 522 21.1 Introduction 522 21.2 auth App Anatomy: Password Views 522 21.3 Changing Passwords 524 21.4 Resetting Passwords 527 21.5 Disabling Accounts 534 21.6 Creating Accounts 538 21.7 URL Cleanup 565 21.8 Anatomy of the App: Full Dissection 566 21.9 Putting It All Together 568 22 Overriding Django’s Authentication with a Custom User 570 22.1 Introduction 570 22.2 Creating a User Profile 571 22.3 Custom User 579 22.4 Data Migrations 589 22.5 Adding an Author to Blog Posts 593 22.6 Putting It All Together 597 23 The Admin Library 598 23.1 Introduction 598 23.2 A First Look 598 23.3 Modifying the Admin Controls for Blog Posts 602 23.4 Configuring the Admin for the User Model 614 23.5 Creating Admin Actions 637 23.6 Putting It All Together 639 III: Advanced Core Features 640 24 Creating Custom Managers and Querysets 642 24.1 Introduction to Part III 642 24.2 Introduction to Chapter 24 642 24.3 Custom Managers and Querysets 643 24.4 Fixtures 645 24.5 Management Commands 648 24.6 Putting It All Together 669 25 Handling Behavior with Signals 670 25.1 Introduction 670 25.2 Apps and AppConfig 671 25.3 Signals 673 25.4 Putting It All Together 681 26 Optimizing Our Site for Speed 682 26.1 Introduction 682 26.2 Profiling 683 26.3 Limiting Database Queries 684 26.4 Changing Database Behavior Internally 700 26.5 Changing Performance Globally 702 26.6 Putting It All Together 706 27 Building Custom Template Tags 708 27.1 Introduction 708 27.2 Custom Template Filters 709 27.3 Custom Template Tags 711 27.4 Putting It All Together 727 28 Adding RSS and Atom Feeds and a Sitemap 728 28.1 Introduction 728 28.2 RSS and Atom Feeds 728 28.3 Sitemaps 736 28.4 Putting It All Together 745 29 Deploy! 746 29.1 Introduction: Understanding Modern Deployments 746 29.2 Preparing for Deployment 747 29.3 Deploying to Heroku 759 29.4 Adding Backing Services 762 29.5 Putting It All Together 769 30 Starting a New Project Correctly 770 30.1 Introduction 770 30.2 Preparing a Project 770 30.3 Building the Project 773 30.4 The Road Ahead 775 IV: Appendixes 776 A: HTTP 778 B: Python Primer 782 C: Relational Database Basics 786 D: Security Basics 790 E: Regular Expressions 792 F: Compilation Basics 794 G: Installing Python, Django, and Your Tools 796 Index 800 A 800 B 801 C 803 D 805 E 807 F 808 G 810 H 811 I 812 J 813 K 813 L 813 M 814 N 816 O 817 P 818 Q 821 R 821 S 822 T 824 U 826 V 828 W 829 X 831 Y 831

قیمت نهایی

۴۴٬۰۰۰ تومان