[{"data":1,"prerenderedAt":2650},["ShallowReactive",2],{"navigation":3,"/class-based-views":1016,"/class-based-views-surround":2645},[4,54,89,123,165,211,253,331,389,439,462,488,514,540,578,624,650,672,702,736,774,800,850,856,862,868,874,928],{"title":5,"path":6,"stem":7,"children":8},"Introduction and Foundations","/introduction-and-foundations","01.introduction-and-foundations/01.index",[9,10,14,18,22,26,30,34,38,42,46,50],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"What is Django","/introduction-and-foundations/what-is-django","01.introduction-and-foundations/02.what-is-django",{"title":15,"path":16,"stem":17},"Key Concepts and Philosophy","/introduction-and-foundations/key-concepts-and-philosophy","01.introduction-and-foundations/03.key-concepts-and-philosophy",{"title":19,"path":20,"stem":21},"MVC vs MVT: Understanding Django's Architecture","/introduction-and-foundations/mvc-vs-mvt","01.introduction-and-foundations/04.mvc-vs-mvt",{"title":23,"path":24,"stem":25},"Project Structure Overview","/introduction-and-foundations/project-structure-overview","01.introduction-and-foundations/05.project-structure-overview",{"title":27,"path":28,"stem":29},"Installing Django","/introduction-and-foundations/installing-django","01.introduction-and-foundations/06.installing-django",{"title":31,"path":32,"stem":33},"Creating Your First Django Project","/introduction-and-foundations/creating-first-project","01.introduction-and-foundations/07.creating-first-project",{"title":35,"path":36,"stem":37},"Creating Your First Django App","/introduction-and-foundations/creating-first-app","01.introduction-and-foundations/08.creating-first-app",{"title":39,"path":40,"stem":41},"Your First Django \"Hello World\"","/introduction-and-foundations/hello-world","01.introduction-and-foundations/09.hello-world",{"title":43,"path":44,"stem":45},"Django Quick Start Guide","/introduction-and-foundations/quick-start-guide","01.introduction-and-foundations/10.quick-start-guide",{"title":47,"path":48,"stem":49},"How Django Handles Requests","/introduction-and-foundations/how-django-handles-requests","01.introduction-and-foundations/11.how-django-handles-requests",{"title":51,"path":52,"stem":53},"Django Settings","/introduction-and-foundations/django-settings","01.introduction-and-foundations/12.django-settings",{"title":55,"path":56,"stem":57,"children":58},"The Development Environment","/development-environment","02.development-environment/1.index",[59,61,65,69,73,77,81,85],{"title":60,"path":56,"stem":57},"Development Environment",{"title":62,"path":63,"stem":64},"Recommended Tooling for Django Development","/development-environment/recommended-tooling","02.development-environment/2.recommended-tooling",{"title":66,"path":67,"stem":68},"Virtual Environments","/development-environment/virtual-environments","02.development-environment/3.virtual-environments",{"title":70,"path":71,"stem":72},"Django Admin and Management Commands","/development-environment/admin-and-management-commands","02.development-environment/4.admin-and-management-commands",{"title":74,"path":75,"stem":76},"Django Project Settings","/development-environment/project-settings","02.development-environment/5.project-settings",{"title":78,"path":79,"stem":80},"Managing Django Environments: Local, Staging, and Production","/development-environment/environments-local-staging-production","02.development-environment/6.environments-local-staging-production",{"title":82,"path":83,"stem":84},"Running Django Development Server","/development-environment/running-development-server","02.development-environment/7.running-development-server",{"title":86,"path":87,"stem":88},"Working with Django Shell","/development-environment/working-with-shell","02.development-environment/8.working-with-shell",{"title":90,"path":91,"stem":92,"children":93},"Templates and Presentation Layer","/templates-and-presentation","03.templates-and-presentation/1.index",[94,95,99,103,107,111,115,119],{"title":90,"path":91,"stem":92},{"title":96,"path":97,"stem":98},"Introduction to Django Templates","/templates-and-presentation/introduction-to-templates","03.templates-and-presentation/2.introduction-to-templates",{"title":100,"path":101,"stem":102},"The Django Template Language","/templates-and-presentation/django-template-language","03.templates-and-presentation/3.django-template-language",{"title":104,"path":105,"stem":106},"Template Inheritance","/templates-and-presentation/template-inheritance","03.templates-and-presentation/4.template-inheritance",{"title":108,"path":109,"stem":110},"Built-in Template Tags and Filters","/templates-and-presentation/built-in-template-tags-and-filters","03.templates-and-presentation/5.built-in-template-tags-and-filters",{"title":112,"path":113,"stem":114},"Including Static Files","/templates-and-presentation/including-static-files","03.templates-and-presentation/6.including-static-files",{"title":116,"path":117,"stem":118},"Working with Media Files","/templates-and-presentation/working-with-media-files","03.templates-and-presentation/7.working-with-media-files",{"title":120,"path":121,"stem":122},"Using Alternative Template Engines","/templates-and-presentation/using-alternative-template-engines","03.templates-and-presentation/8.using-alternative-template-engines",{"title":124,"path":125,"stem":126,"children":127},"URLs and Views","/urls-and-views","04.urls-and-views/01.index",[128,129,133,137,141,145,149,153,157,161],{"title":124,"path":125,"stem":126},{"title":130,"path":131,"stem":132},"The URL Dispatcher","/urls-and-views/the-url-dispatcher","04.urls-and-views/02.the-url-dispatcher",{"title":134,"path":135,"stem":136},"Writing Function-Based Views","/urls-and-views/writing-function-based-views","04.urls-and-views/03.writing-function-based-views",{"title":138,"path":139,"stem":140},"View Decorators","/urls-and-views/view-decorators","04.urls-and-views/04.view-decorators",{"title":142,"path":143,"stem":144},"Rendering Responses","/urls-and-views/rendering-responses","04.urls-and-views/05.rendering-responses",{"title":146,"path":147,"stem":148},"Redirects","/urls-and-views/redirects","04.urls-and-views/06.redirects",{"title":150,"path":151,"stem":152},"Handling HTTP Methods","/urls-and-views/handling-http-methods","04.urls-and-views/07.handling-http-methods",{"title":154,"path":155,"stem":156},"Conditional View Processing","/urls-and-views/conditional-view-processing","04.urls-and-views/08.conditional-view-processing",{"title":158,"path":159,"stem":160},"File Uploads","/urls-and-views/file-uploads","04.urls-and-views/09.file-uploads",{"title":162,"path":163,"stem":164},"Using Django Shortcut Functions","/urls-and-views/using-django-shortcut-functions","04.urls-and-views/10.using-django-shortcut-functions",{"title":166,"path":167,"stem":168,"children":169},"Class Based Views","/class-based-views","05.class-based-views/01.index",[170,171,175,179,183,187,191,195,199,203,207],{"title":166,"path":167,"stem":168},{"title":172,"path":173,"stem":174},"Introduction to Class-Based Views","/class-based-views/introduction-to-class-based-views","05.class-based-views/02.introduction-to-class-based-views",{"title":176,"path":177,"stem":178},"Common Base Classes","/class-based-views/common-base-classes","05.class-based-views/03.common-base-classes",{"title":180,"path":181,"stem":182},"Built-in Generic Views","/class-based-views/built-in-generic-views","05.class-based-views/04.built-in-generic-views",{"title":184,"path":185,"stem":186},"Views for CRUD Operations","/class-based-views/views-for-crud-operations","05.class-based-views/05.views-for-crud-operations",{"title":188,"path":189,"stem":190},"Handling Forms with Class-Based Views","/class-based-views/handling-forms-with-class-based-views","05.class-based-views/06.handling-forms-with-class-based-views",{"title":192,"path":193,"stem":194},"Using Mixins","/class-based-views/using-mixins","05.class-based-views/07.using-mixins",{"title":196,"path":197,"stem":198},"URL Configuration with Class-Based Views","/class-based-views/url-configuration-with-class-based-views","05.class-based-views/08.url-configuration-with-class-based-views",{"title":200,"path":201,"stem":202},"Subclassing Generic Views","/class-based-views/subclassing-generic-views","05.class-based-views/09.subclassing-generic-views",{"title":204,"path":205,"stem":206},"Asynchronous Class-Based Views","/class-based-views/asynchronous-class-based-views","05.class-based-views/10.asynchronous-class-based-views",{"title":208,"path":209,"stem":210},"Pagination","/class-based-views/pagination","05.class-based-views/11.pagination",{"title":212,"path":213,"stem":214,"children":215},"Forms and User Input","/forms-and-user-input","06.forms-and-user-input/01.index",[216,217,221,225,229,233,237,241,245,249],{"title":212,"path":213,"stem":214},{"title":218,"path":219,"stem":220},"Understanding HTML Forms","/forms-and-user-input/understanding-html-forms","06.forms-and-user-input/02.understanding-html-forms",{"title":222,"path":223,"stem":224},"Django's Role in Form Handling","/forms-and-user-input/djangos-role-in-form-handling","06.forms-and-user-input/03.djangos-role-in-form-handling",{"title":226,"path":227,"stem":228},"Creating Forms with Forms API","/forms-and-user-input/creating-forms-with-forms-api","06.forms-and-user-input/04.creating-forms-with-forms-api",{"title":230,"path":231,"stem":232},"Form Validation","/forms-and-user-input/form-validation","06.forms-and-user-input/05.form-validation",{"title":234,"path":235,"stem":236},"Built-in Fields and Widgets","/forms-and-user-input/built-in-fields-and-widgets","06.forms-and-user-input/06.built-in-fields-and-widgets",{"title":238,"path":239,"stem":240},"Form Rendering in Templates","/forms-and-user-input/form-rendering-in-templates","06.forms-and-user-input/07.form-rendering-in-templates",{"title":242,"path":243,"stem":244},"Model Forms","/forms-and-user-input/model-forms","06.forms-and-user-input/08.model-forms",{"title":246,"path":247,"stem":248},"Advanced Form Techniques","/forms-and-user-input/advanced-form-techniques","06.forms-and-user-input/09.advanced-form-techniques",{"title":250,"path":251,"stem":252},"Security Considerations for Forms","/forms-and-user-input/security-considerations-for-forms","06.forms-and-user-input/10.security-considerations-for-forms",{"title":254,"path":255,"stem":256,"children":257},"Models and Databases","/models-and-databases","07.models-and-databases/01.index",[258,259,263,267,271,275,279,283,287,291,295,299,303,307,311,315,319,323,327],{"title":254,"path":255,"stem":256},{"title":260,"path":261,"stem":262},"Understanding Django Models","/models-and-databases/understanding-django-models","07.models-and-databases/02.understanding-django-models",{"title":264,"path":265,"stem":266},"Defining Fields","/models-and-databases/defining-fields","07.models-and-databases/03.defining-fields",{"title":268,"path":269,"stem":270},"Relationships and Foreign Keys","/models-and-databases/relationships-and-foreign-keys","07.models-and-databases/04.relationships-and-foreign-keys",{"title":272,"path":273,"stem":274},"Examples of Relationship Patterns","/models-and-databases/examples-of-relationship-patterns","07.models-and-databases/05.examples-of-relationship-patterns",{"title":276,"path":277,"stem":278},"Making Queries","/models-and-databases/making-queries","07.models-and-databases/06.making-queries",{"title":280,"path":281,"stem":282},"Filtering, Ordering, and Slicing","/models-and-databases/filtering-ordering-slicing","07.models-and-databases/07.filtering-ordering-slicing",{"title":284,"path":285,"stem":286},"Managers and QuerySets","/models-and-databases/managers-and-querysets","07.models-and-databases/08.managers-and-querysets",{"title":288,"path":289,"stem":290},"Aggregation","/models-and-databases/aggregation","07.models-and-databases/09.aggregation",{"title":292,"path":293,"stem":294},"Search","/models-and-databases/search","07.models-and-databases/10.search",{"title":296,"path":297,"stem":298},"Raw SQL Queries","/models-and-databases/raw-sql-queries","07.models-and-databases/11.raw-sql-queries",{"title":300,"path":301,"stem":302},"Transactions","/models-and-databases/transactions","07.models-and-databases/12.transactions",{"title":304,"path":305,"stem":306},"Multiple Databases","/models-and-databases/multiple-databases","07.models-and-databases/13.multiple-databases",{"title":308,"path":309,"stem":310},"Tablespaces","/models-and-databases/tablespaces","07.models-and-databases/14.tablespaces",{"title":312,"path":313,"stem":314},"Composite Primary Keys","/models-and-databases/composite-primary-keys","07.models-and-databases/15.composite-primary-keys",{"title":316,"path":317,"stem":318},"Database Instrumentation","/models-and-databases/database-instrumentation","07.models-and-databases/16.database-instrumentation",{"title":320,"path":321,"stem":322},"Database Optimization","/models-and-databases/database-optimization","07.models-and-databases/17.database-optimization",{"title":324,"path":325,"stem":326},"Fixtures","/models-and-databases/fixtures","07.models-and-databases/18.fixtures",{"title":328,"path":329,"stem":330},"Signals","/models-and-databases/signals","07.models-and-databases/19.signals",{"title":332,"path":333,"stem":334,"children":335},"Migrations","/migrations","08.migrations/01.index",[336,337,341,345,349,353,357,361,365,369,373,377,381,385],{"title":332,"path":333,"stem":334},{"title":338,"path":339,"stem":340},"How Migrations Work","/migrations/how-migrations-work","08.migrations/02.how-migrations-work",{"title":342,"path":343,"stem":344},"Management Commands","/migrations/management-commands","08.migrations/03.management-commands",{"title":346,"path":347,"stem":348},"Dependencies and Workflow","/migrations/dependencies-and-workflow","08.migrations/04.dependencies-and-workflow",{"title":350,"path":351,"stem":352},"Transaction Handling","/migrations/transaction-handling","08.migrations/05.transaction-handling",{"title":354,"path":355,"stem":356},"Adding Migrations to Apps","/migrations/adding-migrations-to-apps","08.migrations/06.adding-migrations-to-apps",{"title":358,"path":359,"stem":360},"Reversing Migrations","/migrations/reversing-migrations","08.migrations/07.reversing-migrations",{"title":362,"path":363,"stem":364},"Historical Models","/migrations/historical-models","08.migrations/08.historical-models",{"title":366,"path":367,"stem":368},"Considerations When Removing Fields","/migrations/considerations-when-removing-fields","08.migrations/09.considerations-when-removing-fields",{"title":370,"path":371,"stem":372},"Data Migrations","/migrations/data-migrations","08.migrations/10.data-migrations",{"title":374,"path":375,"stem":376},"Squashing Migrations","/migrations/squashing-migrations","08.migrations/11.squashing-migrations",{"title":378,"path":379,"stem":380},"Serializing Values","/migrations/serializing-values","08.migrations/12.serializing-values",{"title":382,"path":383,"stem":384},"Supporting Multiple Django Versions","/migrations/supporting-multiple-django-versions","08.migrations/13.supporting-multiple-django-versions",{"title":386,"path":387,"stem":388},"Django Serialization Framework","/migrations/django-serialization-framework","08.migrations/14.django-serialization-framework",{"title":390,"path":391,"stem":392,"children":393},"Authentication and Authorization","/authentication-and-authorization","09.authentication-and-authorization/01.index",[394,395,399,403,407,411,415,419,423,427,431,435],{"title":390,"path":391,"stem":392},{"title":396,"path":397,"stem":398},"Overview of Django's Authentication System","/authentication-and-authorization/overview-of-django-authentication-system","09.authentication-and-authorization/02.overview-of-django-authentication-system",{"title":400,"path":401,"stem":402},"Users and Groups","/authentication-and-authorization/users-and-groups","09.authentication-and-authorization/03.users-and-groups",{"title":404,"path":405,"stem":406},"Permissions","/authentication-and-authorization/permissions","09.authentication-and-authorization/04.permissions",{"title":408,"path":409,"stem":410},"Password Management","/authentication-and-authorization/password-management","09.authentication-and-authorization/05.password-management",{"title":412,"path":413,"stem":414},"Authentication Views","/authentication-and-authorization/authentication-views","09.authentication-and-authorization/06.authentication-views",{"title":416,"path":417,"stem":418},"Login and Logout","/authentication-and-authorization/login-and-logout","09.authentication-and-authorization/07.login-and-logout",{"title":420,"path":421,"stem":422},"Custom User Models","/authentication-and-authorization/custom-user-models","09.authentication-and-authorization/08.custom-user-models",{"title":424,"path":425,"stem":426},"Middleware for Authentication","/authentication-and-authorization/middleware-for-authentication","09.authentication-and-authorization/09.middleware-for-authentication",{"title":428,"path":429,"stem":430},"Authorization in Views and Templates","/authentication-and-authorization/authorization-in-views-and-templates","09.authentication-and-authorization/10.authorization-in-views-and-templates",{"title":432,"path":433,"stem":434},"Integrating Social Authentication","/authentication-and-authorization/integrating-social-authentication","09.authentication-and-authorization/11.integrating-social-authentication",{"title":436,"path":437,"stem":438},"Security Best Practices","/authentication-and-authorization/security-best-practices","09.authentication-and-authorization/12.security-best-practices",{"title":440,"path":441,"stem":442,"children":443},"Sessions, Cookies, and State","/sessions-cookies-state","10.sessions-cookies-state/01.index",[444,446,450,454,458],{"title":445,"path":441,"stem":442},"Sessions, Cookies, and State Management",{"title":447,"path":448,"stem":449},"Introduction to Sessions","/sessions-cookies-state/introduction-to-sessions","10.sessions-cookies-state/02.introduction-to-sessions",{"title":451,"path":452,"stem":453},"Working with Cookies","/sessions-cookies-state/working-with-cookies","10.sessions-cookies-state/03.working-with-cookies",{"title":455,"path":456,"stem":457},"Server-Side Session Storage Options","/sessions-cookies-state/server-side-session-storage-options","10.sessions-cookies-state/04.server-side-session-storage-options",{"title":459,"path":460,"stem":461},"Session Security","/sessions-cookies-state/session-security","10.sessions-cookies-state/05.session-security",{"title":463,"path":464,"stem":465,"children":466},"Working with Files","/working-with-files","11.working-with-files/01.index",[467,468,472,476,480,484],{"title":463,"path":464,"stem":465},{"title":469,"path":470,"stem":471},"Files in Models","/working-with-files/files-in-models","11.working-with-files/02.files-in-models",{"title":473,"path":474,"stem":475},"The File Object","/working-with-files/the-file-object","11.working-with-files/03.the-file-object",{"title":477,"path":478,"stem":479},"Storage Backends","/working-with-files/storage-backends","11.working-with-files/04.storage-backends",{"title":481,"path":482,"stem":483},"Using Cloud Storage Providers","/working-with-files/using-cloud-storage-providers","11.working-with-files/05.using-cloud-storage-providers",{"title":485,"path":486,"stem":487},"Managing Media in Production","/working-with-files/managing-media-in-production","11.working-with-files/06.managing-media-in-production",{"title":489,"path":490,"stem":491,"children":492},"Admin Site","/admin-site","12.admin-site/01.index",[493,494,498,502,506,510],{"title":489,"path":490,"stem":491},{"title":495,"path":496,"stem":497},"Enabling the Admin","/admin-site/enabling-the-admin","12.admin-site/02.enabling-the-admin",{"title":499,"path":500,"stem":501},"Registering Models","/admin-site/registering-models","12.admin-site/03.registering-models",{"title":503,"path":504,"stem":505},"Customizing Admin Display","/admin-site/customizing-admin-display","12.admin-site/04.customizing-admin-display",{"title":507,"path":508,"stem":509},"Admin Actions","/admin-site/admin-actions","12.admin-site/05.admin-actions",{"title":511,"path":512,"stem":513},"Admin Security Best Practices","/admin-site/admin-security-best-practices","12.admin-site/06.admin-security-best-practices",{"title":515,"path":516,"stem":517,"children":518},"Middleware","/middleware","13.middleware/01.index",[519,520,524,528,532,536],{"title":515,"path":516,"stem":517},{"title":521,"path":522,"stem":523},"Middleware Overview","/middleware/middleware-overview","13.middleware/02.middleware-overview",{"title":525,"path":526,"stem":527},"Built-in Middleware","/middleware/built-in-middleware","13.middleware/03.built-in-middleware",{"title":529,"path":530,"stem":531},"Creating Custom Middleware","/middleware/creating-custom-middleware","13.middleware/04.creating-custom-middleware",{"title":533,"path":534,"stem":535},"Middleware Ordering","/middleware/middleware-ordering","13.middleware/05.middleware-ordering",{"title":537,"path":538,"stem":539},"Performance and Debugging","/middleware/performance-and-debugging","13.middleware/06.performance-and-debugging",{"title":541,"path":542,"stem":543,"children":544},"Security","/security","14.security/01.index",[545,546,550,554,558,562,566,570,574],{"title":541,"path":542,"stem":543},{"title":547,"path":548,"stem":549},"Django Security Philosophy","/security/django-security-philosophy","14.security/02.django-security-philosophy",{"title":551,"path":552,"stem":553},"Cross Site Request Forgery","/security/cross-site-request-forgery","14.security/03.cross-site-request-forgery",{"title":555,"path":556,"stem":557},"Cross Site Scripting","/security/cross-site-scripting","14.security/04.cross-site-scripting",{"title":559,"path":560,"stem":561},"SQL Injection Protection","/security/sql-injection-protection","14.security/05.sql-injection-protection",{"title":563,"path":564,"stem":565},"Clickjacking Protection","/security/clickjacking-protection","14.security/06.clickjacking-protection",{"title":567,"path":568,"stem":569},"HTTPS Setup and HSTS","/security/https-setup-and-hsts","14.security/07.https-setup-and-hsts",{"title":571,"path":572,"stem":573},"Password Storage and Cryptography","/security/password-storage-and-cryptography","14.security/08.password-storage-and-cryptography",{"title":575,"path":576,"stem":577},"Secure Deployment Checklist","/security/secure-deployment-checklist","14.security/09.secure-deployment-checklist",{"title":579,"path":580,"stem":581,"children":582},"Testing","/testing","15.testing/01.index",[583,584,588,592,596,600,604,608,612,616,620],{"title":579,"path":580,"stem":581},{"title":585,"path":586,"stem":587},"Introduction to Django Testing","/testing/introduction-to-django-testing","15.testing/02.introduction-to-django-testing",{"title":589,"path":590,"stem":591},"Writing and Running Tests","/testing/writing-and-running-tests","15.testing/03.writing-and-running-tests",{"title":593,"path":594,"stem":595},"Test Tools","/testing/test-tools","15.testing/04.test-tools",{"title":597,"path":598,"stem":599},"Testing Models","/testing/testing-models","15.testing/05.testing-models",{"title":601,"path":602,"stem":603},"Testing Views","/testing/testing-views","15.testing/06.testing-views",{"title":605,"path":606,"stem":607},"Testing Forms","/testing/testing-forms","15.testing/07.testing-forms",{"title":609,"path":610,"stem":611},"Testing Templates","/testing/testing-templates","15.testing/08.testing-templates",{"title":613,"path":614,"stem":615},"Testing Authentication","/testing/testing-authentication","15.testing/09.testing-authentication",{"title":617,"path":618,"stem":619},"Advanced Testing Topics","/testing/advanced-testing-topics","15.testing/10.advanced-testing-topics",{"title":621,"path":622,"stem":623},"Performance Testing","/testing/performance-testing","15.testing/11.performance-testing",{"title":625,"path":626,"stem":627,"children":628},"Static Assets and Frontend Integration","/static-assets-and-frontend-integration","16.static-assets-and-frontend-integration/01.index",[629,630,634,638,642,646],{"title":625,"path":626,"stem":627},{"title":631,"path":632,"stem":633},"Working with Static Files","/static-assets-and-frontend-integration/working-with-static-files","16.static-assets-and-frontend-integration/02.working-with-static-files",{"title":635,"path":636,"stem":637},"Integrating CSS and JavaScript","/static-assets-and-frontend-integration/integrating-css-and-javascript","16.static-assets-and-frontend-integration/03.integrating-css-and-javascript",{"title":639,"path":640,"stem":641},"Using Build Tools like Vite or Webpack","/static-assets-and-frontend-integration/using-build-tools-like-vite-or-webpack","16.static-assets-and-frontend-integration/04.using-build-tools-like-vite-or-webpack",{"title":643,"path":644,"stem":645},"Using React or Vue with Django","/static-assets-and-frontend-integration/using-react-or-vue-with-django","16.static-assets-and-frontend-integration/05.using-react-or-vue-with-django",{"title":647,"path":648,"stem":649},"Managing CORS","/static-assets-and-frontend-integration/managing-cors","16.static-assets-and-frontend-integration/06.managing-cors",{"title":651,"path":652,"stem":653,"children":654},"Internationalization and Localization","/internationalization-and-localization","17.internationalization-and-localization/01.index",[655,656,660,664,668],{"title":651,"path":652,"stem":653},{"title":657,"path":658,"stem":659},"Enabling Translation","/internationalization-and-localization/enabling-translation","17.internationalization-and-localization/02.enabling-translation",{"title":661,"path":662,"stem":663},"Translating Text in Code and Templates","/internationalization-and-localization/translating-text-in-code-and-templates","17.internationalization-and-localization/03.translating-text-in-code-and-templates",{"title":665,"path":666,"stem":667},"Timezone Support","/internationalization-and-localization/timezone-support","17.internationalization-and-localization/04.timezone-support",{"title":669,"path":670,"stem":671},"Locale Middleware","/internationalization-and-localization/locale-middleware","17.internationalization-and-localization/05.locale-middleware",{"title":673,"path":674,"stem":675,"children":676},"Caching","/caching","18.caching/01.index",[677,678,682,686,690,694,698],{"title":673,"path":674,"stem":675},{"title":679,"path":680,"stem":681},"Introduction to Caching","/caching/introduction-to-caching","18.caching/02.introduction-to-caching",{"title":683,"path":684,"stem":685},"Cache Backends","/caching/cache-backends","18.caching/03.cache-backends",{"title":687,"path":688,"stem":689},"Per View Caching","/caching/per-view-caching","18.caching/04.per-view-caching",{"title":691,"path":692,"stem":693},"Low Level Cache API","/caching/low-level-cache-api","18.caching/05.low-level-cache-api",{"title":695,"path":696,"stem":697},"Template Fragment Caching","/caching/template-fragment-caching","18.caching/06.template-fragment-caching",{"title":699,"path":700,"stem":701},"Deployment Level Caching Patterns","/caching/deployment-level-caching-patterns","18.caching/07.deployment-level-caching-patterns",{"title":703,"path":704,"stem":705,"children":706},"Asynchronous Django","/asynchronous-django","19.asynchronous-django/01.index",[707,708,712,716,720,724,728,732],{"title":703,"path":704,"stem":705},{"title":709,"path":710,"stem":711},"Introduction to ASGI","/asynchronous-django/introduction-to-asgi","19.asynchronous-django/02.introduction-to-asgi",{"title":713,"path":714,"stem":715},"Async Views","/asynchronous-django/async-views","19.asynchronous-django/03.async-views",{"title":717,"path":718,"stem":719},"Async ORM Status","/asynchronous-django/async-orm-status","19.asynchronous-django/04.async-orm-status",{"title":721,"path":722,"stem":723},"WebSockets with Channels","/asynchronous-django/websockets-with-channels","19.asynchronous-django/05.websockets-with-channels",{"title":725,"path":726,"stem":727},"Background Tasks with Celery or RQ","/asynchronous-django/background-tasks-with-celery-or-rq","19.asynchronous-django/06.background-tasks-with-celery-or-rq",{"title":729,"path":730,"stem":731},"Asynchronous Support","/asynchronous-django/asynchronous-support","19.asynchronous-django/07.asynchronous-support",{"title":733,"path":734,"stem":735},"Django's Tasks Framework","/asynchronous-django/django-tasks-framework","19.asynchronous-django/08.django-tasks-framework",{"title":737,"path":738,"stem":739,"children":740},"Deployment","/deployment","20.deployment/01.index",[741,742,746,750,754,758,762,766,770],{"title":737,"path":738,"stem":739},{"title":743,"path":744,"stem":745},"Preparing for Production","/deployment/preparing-for-production","20.deployment/02.preparing-for-production",{"title":747,"path":748,"stem":749},"Using WSGI and ASGI Servers","/deployment/using-wsgi-and-asgi-servers","20.deployment/03.using-wsgi-and-asgi-servers",{"title":751,"path":752,"stem":753},"Deploying on Linux Servers","/deployment/deploying-on-linux-servers","20.deployment/04.deploying-on-linux-servers",{"title":755,"path":756,"stem":757},"Using Docker","/deployment/using-docker","20.deployment/05.using-docker",{"title":759,"path":760,"stem":761},"Cloud Deployment Guides","/deployment/cloud-deployment-guides","20.deployment/06.cloud-deployment-guides",{"title":763,"path":764,"stem":765},"Scaling and Load Balancing","/deployment/scaling-and-load-balancing","20.deployment/07.scaling-and-load-balancing",{"title":767,"path":768,"stem":769},"Monitoring and Logging","/deployment/monitoring-and-logging","20.deployment/08.monitoring-and-logging",{"title":771,"path":772,"stem":773},"Backup Strategies","/deployment/backup-strategies","20.deployment/09.backup-strategies",{"title":775,"path":776,"stem":777,"children":778},"Performance and Optimization","/performance-and-optimization","21.performance-and-optimization/01.index",[779,780,784,788,792,796],{"title":775,"path":776,"stem":777},{"title":781,"path":782,"stem":783},"Query Optimization","/performance-and-optimization/query-optimization","21.performance-and-optimization/02.query-optimization",{"title":785,"path":786,"stem":787},"Template Rendering Optimization","/performance-and-optimization/template-rendering-optimization","21.performance-and-optimization/03.template-rendering-optimization",{"title":789,"path":790,"stem":791},"Using Select Related and Prefetch Related","/performance-and-optimization/using-select-related-and-prefetch-related","21.performance-and-optimization/04.using-select-related-and-prefetch-related",{"title":793,"path":794,"stem":795},"Caching Strategies","/performance-and-optimization/caching-strategies","21.performance-and-optimization/05.caching-strategies",{"title":797,"path":798,"stem":799},"Profiling Django Apps","/performance-and-optimization/profiling-django-apps","21.performance-and-optimization/06.profiling-django-apps",{"title":801,"path":802,"stem":803,"children":804},"Advanced and Expert Topics","/advanced-and-expert-topics","22.advanced-and-expert-topics/01.index",[805,806,810,814,818,822,826,830,834,838,842,846],{"title":801,"path":802,"stem":803},{"title":807,"path":808,"stem":809},"System Architecture Patterns","/advanced-and-expert-topics/system-architecture-patterns","22.advanced-and-expert-topics/02.system-architecture-patterns",{"title":811,"path":812,"stem":813},"Domain Driven Design with Django","/advanced-and-expert-topics/domain-driven-design-with-django","22.advanced-and-expert-topics/03.domain-driven-design-with-django",{"title":815,"path":816,"stem":817},"Building Large Scale Django Projects","/advanced-and-expert-topics/building-large-scale-django-projects","22.advanced-and-expert-topics/04.building-large-scale-django-projects",{"title":819,"path":820,"stem":821},"Plugin Architectures for Django Apps","/advanced-and-expert-topics/plugin-architectures-for-django-apps","22.advanced-and-expert-topics/05.plugin-architectures-for-django-apps",{"title":823,"path":824,"stem":825},"Extending Django's Core","/advanced-and-expert-topics/extending-djangos-core","22.advanced-and-expert-topics/06.extending-djangos-core",{"title":827,"path":828,"stem":829},"Custom ORM Expressions","/advanced-and-expert-topics/custom-orm-expressions","22.advanced-and-expert-topics/07.custom-orm-expressions",{"title":831,"path":832,"stem":833},"Custom Management Commands","/advanced-and-expert-topics/custom-management-commands","22.advanced-and-expert-topics/08.custom-management-commands",{"title":835,"path":836,"stem":837},"Working with Signals","/advanced-and-expert-topics/working-with-signals","22.advanced-and-expert-topics/09.working-with-signals",{"title":839,"path":840,"stem":841},"Building Reusable Django Packages","/advanced-and-expert-topics/building-reusable-django-packages","22.advanced-and-expert-topics/10.building-reusable-django-packages",{"title":843,"path":844,"stem":845},"Integrating Microservices","/advanced-and-expert-topics/integrating-microservices","22.advanced-and-expert-topics/11.integrating-microservices",{"title":847,"path":848,"stem":849},"Advanced Security Hardening","/advanced-and-expert-topics/advanced-security-hardening","22.advanced-and-expert-topics/12.advanced-security-hardening",{"title":851,"path":852,"stem":853,"children":854},"Logging in Django","/logging-in-django","23.logging-in-django/01.index",[855],{"title":851,"path":852,"stem":853},{"title":857,"path":858,"stem":859,"children":860},"FAQ and Troubleshooting","/faq-and-troubleshooting","24.faq-and-troubleshooting/01.index",[861],{"title":857,"path":858,"stem":859},{"title":863,"path":864,"stem":865,"children":866},"External Packages and Ecosystem","/external-packages-and-ecosystem","25.external-packages-and-ecosystem/01.index",[867],{"title":863,"path":864,"stem":865},{"title":869,"path":870,"stem":871,"children":872},"Django Internals and Contributing","/django-internals-and-contributing","26.django-internals-and-contributing/01.index",[873],{"title":869,"path":870,"stem":871},{"title":875,"path":876,"stem":877,"children":878},"Microservices with Django","/microservices-with-django","27.microservices-with-django/01.index",[879,880,884,888,892,896,900,904,908,912,916,920,924],{"title":875,"path":876,"stem":877},{"title":881,"path":882,"stem":883},"What Is a Microservice?","/microservices-with-django/what-is-a-microservice","27.microservices-with-django/02.what-is-a-microservice",{"title":885,"path":886,"stem":887},"Introducing the Django Microservices Architecture","/microservices-with-django/django-microservices-architecture","27.microservices-with-django/03.django-microservices-architecture",{"title":889,"path":890,"stem":891},"Setting Up the Development and Runtime Environment","/microservices-with-django/development-environment","27.microservices-with-django/04.development-environment",{"title":893,"path":894,"stem":895},"Cloud-native Data Processing with MongoDB","/microservices-with-django/cloud-native-data-processing","27.microservices-with-django/05.cloud-native-data-processing",{"title":897,"path":898,"stem":899},"Creating RESTful APIs for Microservices","/microservices-with-django/restful-apis","27.microservices-with-django/06.restful-apis",{"title":901,"path":902,"stem":903},"Orchestrating Microservices with Celery and RabbitMQ","/microservices-with-django/orchestrating-celery-rabbitmq","27.microservices-with-django/07.orchestrating-celery-rabbitmq",{"title":905,"path":906,"stem":907},"Testing Microservices","/microservices-with-django/testing-microservices","27.microservices-with-django/08.testing-microservices",{"title":909,"path":910,"stem":911},"Deploying Microservices","/microservices-with-django/deploying-microservices","27.microservices-with-django/09.deploying-microservices",{"title":913,"path":914,"stem":915},"Securing Microservices","/microservices-with-django/securing-microservices","27.microservices-with-django/10.securing-microservices",{"title":917,"path":918,"stem":919},"Improving Microservices Performance with Caching","/microservices-with-django/performance-caching","27.microservices-with-django/11.performance-caching",{"title":921,"path":922,"stem":923},"Best Practices","/microservices-with-django/best-practices","27.microservices-with-django/12.best-practices",{"title":925,"path":926,"stem":927},"Transforming a Monolithic Web App into a Microservice version","/microservices-with-django/monolith-to-microservices","27.microservices-with-django/13.monolith-to-microservices",{"title":929,"path":930,"stem":931,"children":932},"Releases","/releases","releases",[933,936,940,944,948,952,956,960,964,968,972,976,980,984,988,992,996,1000,1004,1008,1012],{"title":934,"path":930,"stem":935},"Django Releases","releases/index",{"title":937,"path":938,"stem":939},"Django 5.1.10 release notes","/releases/5.1.10","releases/5.1.10",{"title":941,"path":942,"stem":943},"Django 5.1.11 release notes","/releases/5.1.11","releases/5.1.11",{"title":945,"path":946,"stem":947},"Django 5.1.12 release notes","/releases/5.1.12","releases/5.1.12",{"title":949,"path":950,"stem":951},"Django 5.1.13 release notes","/releases/5.1.13","releases/5.1.13",{"title":953,"path":954,"stem":955},"Django 5.1.14 release notes","/releases/5.1.14","releases/5.1.14",{"title":957,"path":958,"stem":959},"Django 5.1.15 release notes","/releases/5.1.15","releases/5.1.15",{"title":961,"path":962,"stem":963},"Django 5.2 release notes","/releases/5.2","releases/5.2",{"title":965,"path":966,"stem":967},"Django 5.2.1 release notes","/releases/5.2.1","releases/5.2.1",{"title":969,"path":970,"stem":971},"Django 5.2.10 release notes","/releases/5.2.10","releases/5.2.10",{"title":973,"path":974,"stem":975},"Django 5.2.2 release notes","/releases/5.2.2","releases/5.2.2",{"title":977,"path":978,"stem":979},"Django 5.2.3 release notes","/releases/5.2.3","releases/5.2.3",{"title":981,"path":982,"stem":983},"Django 5.2.4 release notes","/releases/5.2.4","releases/5.2.4",{"title":985,"path":986,"stem":987},"Django 5.2.5 release notes","/releases/5.2.5","releases/5.2.5",{"title":989,"path":990,"stem":991},"Django 5.2.6 release notes","/releases/5.2.6","releases/5.2.6",{"title":993,"path":994,"stem":995},"Django 5.2.7 release notes","/releases/5.2.7","releases/5.2.7",{"title":997,"path":998,"stem":999},"Django 5.2.8 release notes","/releases/5.2.8","releases/5.2.8",{"title":1001,"path":1002,"stem":1003},"Django 5.2.9 release notes","/releases/5.2.9","releases/5.2.9",{"title":1005,"path":1006,"stem":1007},"Django 6.0 release notes","/releases/6.0","releases/6.0",{"title":1009,"path":1010,"stem":1011},"Django 6.0.1 release notes","/releases/6.0.1","releases/6.0.1",{"title":1013,"path":1014,"stem":1015},"Django 6.1 release notes - UNDER DEVELOPMENT","/releases/6.1","releases/6.1",{"id":1017,"title":166,"body":1018,"description":1028,"extension":2640,"links":2641,"meta":2642,"navigation":1316,"path":167,"seo":2643,"stem":168,"__hash__":2644},"docs/05.class-based-views/01.index.md",{"type":1019,"value":1020,"toc":2603},"minimark",[1021,1025,1029,1034,1039,1045,1085,1090,1107,1111,1446,1450,1454,1459,1479,1484,1515,1520,1538,1543,1575,1579,1673,1677,1681,1692,1696,1709,1713,1724,1728,1732,1746,1750,1764,1768,1782,1786,1800,1804,1808,1835,1839,2135,2139,2163,2167,2170,2188,2191,2195,2199,2285,2289,2445,2449,2544,2548,2552,2563,2567,2578,2582,2593,2596,2599],[1022,1023,166],"h1",{"id":1024},"class-based-views",[1026,1027,1028],"p",{},"Class-based views (CBVs) provide a powerful, object-oriented approach to handling HTTP requests in Django. They offer reusability, inheritance, and built-in functionality that can significantly reduce code duplication while maintaining flexibility for complex requirements.",[1030,1031,1033],"h2",{"id":1032},"class-based-views-overview","Class-Based Views Overview",[1035,1036,1038],"h3",{"id":1037},"why-use-class-based-views","Why Use Class-Based Views?",[1026,1040,1041],{},[1042,1043,1044],"strong",{},"Advantages:",[1046,1047,1048,1055,1061,1067,1073,1079],"ul",{},[1049,1050,1051,1054],"li",{},[1042,1052,1053],{},"Code Reusability"," - Inherit and extend common functionality",[1049,1056,1057,1060],{},[1042,1058,1059],{},"DRY Principle"," - Reduce repetitive code patterns",[1049,1062,1063,1066],{},[1042,1064,1065],{},"Built-in Features"," - Pagination, form handling, CRUD operations",[1049,1068,1069,1072],{},[1042,1070,1071],{},"Mixins Support"," - Compose functionality from multiple sources",[1049,1074,1075,1078],{},[1042,1076,1077],{},"Method Dispatch"," - Automatic HTTP method routing",[1049,1080,1081,1084],{},[1042,1082,1083],{},"Extensibility"," - Easy to customize and override behavior",[1026,1086,1087],{},[1042,1088,1089],{},"When to Use CBVs:",[1046,1091,1092,1095,1098,1101,1104],{},[1049,1093,1094],{},"Standard CRUD operations",[1049,1096,1097],{},"Form handling workflows",[1049,1099,1100],{},"List/detail view patterns",[1049,1102,1103],{},"Complex view hierarchies",[1049,1105,1106],{},"API endpoints with multiple HTTP methods",[1035,1108,1110],{"id":1109},"cbv-vs-function-based-views","CBV vs Function-Based Views",[1112,1113,1118],"pre",{"className":1114,"code":1115,"language":1116,"meta":1117,"style":1117},"language-python shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# Function-based view\ndef post_list(request):\n    posts = Post.objects.filter(status='published')\n    paginator = Paginator(posts, 10)\n    page = paginator.get_page(request.GET.get('page'))\n    return render(request, 'blog/post_list.html', {'posts': page})\n\n# Class-based view equivalent\nclass PostListView(ListView):\n    model = Post\n    template_name = 'blog/post_list.html'\n    context_object_name = 'posts'\n    paginate_by = 10\n    \n    def get_queryset(self):\n        return Post.objects.filter(status='published')\n","python","",[1119,1120,1121,1130,1152,1199,1224,1267,1311,1318,1324,1342,1353,1368,1382,1393,1399,1416],"code",{"__ignoreMap":1117},[1122,1123,1126],"span",{"class":1124,"line":1125},"line",1,[1122,1127,1129],{"class":1128},"s9Tkl","# Function-based view\n",[1122,1131,1133,1137,1141,1145,1149],{"class":1124,"line":1132},2,[1122,1134,1136],{"class":1135},"s5Kfy","def",[1122,1138,1140],{"class":1139},"sljsM"," post_list",[1122,1142,1144],{"class":1143},"soVBu","(",[1122,1146,1148],{"class":1147},"sCyAa","request",[1122,1150,1151],{"class":1143},"):\n",[1122,1153,1155,1159,1162,1165,1168,1172,1174,1178,1180,1184,1186,1190,1194,1196],{"class":1124,"line":1154},3,[1122,1156,1158],{"class":1157},"sftqT","    posts ",[1122,1160,1161],{"class":1143},"=",[1122,1163,1164],{"class":1157}," Post",[1122,1166,1167],{"class":1143},".",[1122,1169,1171],{"class":1170},"sBPpx","objects",[1122,1173,1167],{"class":1143},[1122,1175,1177],{"class":1176},"siWMO","filter",[1122,1179,1144],{"class":1143},[1122,1181,1183],{"class":1182},"sqOPj","status",[1122,1185,1161],{"class":1143},[1122,1187,1189],{"class":1188},"sbYkP","'",[1122,1191,1193],{"class":1192},"sTbE_","published",[1122,1195,1189],{"class":1188},[1122,1197,1198],{"class":1143},")\n",[1122,1200,1202,1205,1207,1210,1212,1215,1218,1222],{"class":1124,"line":1201},4,[1122,1203,1204],{"class":1157},"    paginator ",[1122,1206,1161],{"class":1143},[1122,1208,1209],{"class":1176}," Paginator",[1122,1211,1144],{"class":1143},[1122,1213,1214],{"class":1176},"posts",[1122,1216,1217],{"class":1143},",",[1122,1219,1221],{"class":1220},"s7CZa"," 10",[1122,1223,1198],{"class":1143},[1122,1225,1227,1230,1232,1235,1237,1240,1242,1244,1246,1250,1252,1255,1257,1259,1262,1264],{"class":1124,"line":1226},5,[1122,1228,1229],{"class":1157},"    page ",[1122,1231,1161],{"class":1143},[1122,1233,1234],{"class":1157}," paginator",[1122,1236,1167],{"class":1143},[1122,1238,1239],{"class":1176},"get_page",[1122,1241,1144],{"class":1143},[1122,1243,1148],{"class":1176},[1122,1245,1167],{"class":1143},[1122,1247,1249],{"class":1248},"sFGJz","GET",[1122,1251,1167],{"class":1143},[1122,1253,1254],{"class":1176},"get",[1122,1256,1144],{"class":1143},[1122,1258,1189],{"class":1188},[1122,1260,1261],{"class":1192},"page",[1122,1263,1189],{"class":1188},[1122,1265,1266],{"class":1143},"))\n",[1122,1268,1270,1274,1277,1279,1281,1283,1286,1289,1291,1293,1296,1298,1300,1302,1305,1308],{"class":1124,"line":1269},6,[1122,1271,1273],{"class":1272},"siDh9","    return",[1122,1275,1276],{"class":1176}," render",[1122,1278,1144],{"class":1143},[1122,1280,1148],{"class":1176},[1122,1282,1217],{"class":1143},[1122,1284,1285],{"class":1188}," '",[1122,1287,1288],{"class":1192},"blog/post_list.html",[1122,1290,1189],{"class":1188},[1122,1292,1217],{"class":1143},[1122,1294,1295],{"class":1143}," {",[1122,1297,1189],{"class":1188},[1122,1299,1214],{"class":1192},[1122,1301,1189],{"class":1188},[1122,1303,1304],{"class":1143},":",[1122,1306,1307],{"class":1176}," page",[1122,1309,1310],{"class":1143},"})\n",[1122,1312,1314],{"class":1124,"line":1313},7,[1122,1315,1317],{"emptyLinePlaceholder":1316},true,"\n",[1122,1319,1321],{"class":1124,"line":1320},8,[1122,1322,1323],{"class":1128},"# Class-based view equivalent\n",[1122,1325,1327,1330,1334,1336,1340],{"class":1124,"line":1326},9,[1122,1328,1329],{"class":1135},"class",[1122,1331,1333],{"class":1332},"sD-vU"," PostListView",[1122,1335,1144],{"class":1143},[1122,1337,1339],{"class":1338},"sYn-s","ListView",[1122,1341,1151],{"class":1143},[1122,1343,1345,1348,1350],{"class":1124,"line":1344},10,[1122,1346,1347],{"class":1157},"    model ",[1122,1349,1161],{"class":1143},[1122,1351,1352],{"class":1157}," Post\n",[1122,1354,1356,1359,1361,1363,1365],{"class":1124,"line":1355},11,[1122,1357,1358],{"class":1157},"    template_name ",[1122,1360,1161],{"class":1143},[1122,1362,1285],{"class":1188},[1122,1364,1288],{"class":1192},[1122,1366,1367],{"class":1188},"'\n",[1122,1369,1371,1374,1376,1378,1380],{"class":1124,"line":1370},12,[1122,1372,1373],{"class":1157},"    context_object_name ",[1122,1375,1161],{"class":1143},[1122,1377,1285],{"class":1188},[1122,1379,1214],{"class":1192},[1122,1381,1367],{"class":1188},[1122,1383,1385,1388,1390],{"class":1124,"line":1384},13,[1122,1386,1387],{"class":1157},"    paginate_by ",[1122,1389,1161],{"class":1143},[1122,1391,1392],{"class":1220}," 10\n",[1122,1394,1396],{"class":1124,"line":1395},14,[1122,1397,1398],{"class":1157},"    \n",[1122,1400,1402,1405,1408,1410,1414],{"class":1124,"line":1401},15,[1122,1403,1404],{"class":1135},"    def",[1122,1406,1407],{"class":1139}," get_queryset",[1122,1409,1144],{"class":1143},[1122,1411,1413],{"class":1412},"sRjD_","self",[1122,1415,1151],{"class":1143},[1122,1417,1419,1422,1424,1426,1428,1430,1432,1434,1436,1438,1440,1442,1444],{"class":1124,"line":1418},16,[1122,1420,1421],{"class":1272},"        return",[1122,1423,1164],{"class":1157},[1122,1425,1167],{"class":1143},[1122,1427,1171],{"class":1170},[1122,1429,1167],{"class":1143},[1122,1431,1177],{"class":1176},[1122,1433,1144],{"class":1143},[1122,1435,1183],{"class":1182},[1122,1437,1161],{"class":1143},[1122,1439,1189],{"class":1188},[1122,1441,1193],{"class":1192},[1122,1443,1189],{"class":1188},[1122,1445,1198],{"class":1143},[1030,1447,1449],{"id":1448},"cbv-architecture","CBV Architecture",[1035,1451,1453],{"id":1452},"core-components","Core Components",[1026,1455,1456],{},[1042,1457,1458],{},"Base View Classes",[1046,1460,1461,1467,1473],{},[1049,1462,1463,1466],{},[1119,1464,1465],{},"View"," - Foundation for all class-based views",[1049,1468,1469,1472],{},[1119,1470,1471],{},"TemplateView"," - Render templates with context",[1049,1474,1475,1478],{},[1119,1476,1477],{},"RedirectView"," - Handle redirects",[1026,1480,1481],{},[1042,1482,1483],{},"Generic Views",[1046,1485,1486,1491,1497,1503,1509],{},[1049,1487,1488,1490],{},[1119,1489,1339],{}," - Display lists of objects",[1049,1492,1493,1496],{},[1119,1494,1495],{},"DetailView"," - Display single object details",[1049,1498,1499,1502],{},[1119,1500,1501],{},"CreateView"," - Handle object creation",[1049,1504,1505,1508],{},[1119,1506,1507],{},"UpdateView"," - Handle object updates",[1049,1510,1511,1514],{},[1119,1512,1513],{},"DeleteView"," - Handle object deletion",[1026,1516,1517],{},[1042,1518,1519],{},"Form Views",[1046,1521,1522,1528,1533],{},[1049,1523,1524,1527],{},[1119,1525,1526],{},"FormView"," - Handle form display and processing",[1049,1529,1530,1532],{},[1119,1531,1501],{}," - Form-based object creation",[1049,1534,1535,1537],{},[1119,1536,1507],{}," - Form-based object updates",[1026,1539,1540],{},[1042,1541,1542],{},"Mixins",[1046,1544,1545,1551,1557,1563,1569],{},[1049,1546,1547,1550],{},[1119,1548,1549],{},"LoginRequiredMixin"," - Require authentication",[1049,1552,1553,1556],{},[1119,1554,1555],{},"PermissionRequiredMixin"," - Require specific permissions",[1049,1558,1559,1562],{},[1119,1560,1561],{},"UserPassesTestMixin"," - Custom user tests",[1049,1564,1565,1568],{},[1119,1566,1567],{},"SingleObjectMixin"," - Single object operations",[1049,1570,1571,1574],{},[1119,1572,1573],{},"MultipleObjectMixin"," - Multiple object operations",[1035,1576,1578],{"id":1577},"method-resolution-order-mro","Method Resolution Order (MRO)",[1112,1580,1582],{"className":1114,"code":1581,"language":1116,"meta":1117,"style":1117},"class PostCreateView(LoginRequiredMixin, CreateView):\n    model = Post\n    form_class = PostForm\n    template_name = 'blog/post_form.html'\n    success_url = reverse_lazy('blog:post_list')\n\n# MRO: PostCreateView -> LoginRequiredMixin -> CreateView -> \n#      SingleObjectTemplateResponseMixin -> BaseCreateView -> \n#      ModelFormMixin -> FormMixin -> SingleObjectMixin -> View\n",[1119,1583,1584,1602,1610,1620,1633,1654,1658,1663,1668],{"__ignoreMap":1117},[1122,1585,1586,1588,1591,1593,1595,1597,1600],{"class":1124,"line":1125},[1122,1587,1329],{"class":1135},[1122,1589,1590],{"class":1332}," PostCreateView",[1122,1592,1144],{"class":1143},[1122,1594,1549],{"class":1338},[1122,1596,1217],{"class":1143},[1122,1598,1599],{"class":1338}," CreateView",[1122,1601,1151],{"class":1143},[1122,1603,1604,1606,1608],{"class":1124,"line":1132},[1122,1605,1347],{"class":1157},[1122,1607,1161],{"class":1143},[1122,1609,1352],{"class":1157},[1122,1611,1612,1615,1617],{"class":1124,"line":1154},[1122,1613,1614],{"class":1157},"    form_class ",[1122,1616,1161],{"class":1143},[1122,1618,1619],{"class":1157}," PostForm\n",[1122,1621,1622,1624,1626,1628,1631],{"class":1124,"line":1201},[1122,1623,1358],{"class":1157},[1122,1625,1161],{"class":1143},[1122,1627,1285],{"class":1188},[1122,1629,1630],{"class":1192},"blog/post_form.html",[1122,1632,1367],{"class":1188},[1122,1634,1635,1638,1640,1643,1645,1647,1650,1652],{"class":1124,"line":1226},[1122,1636,1637],{"class":1157},"    success_url ",[1122,1639,1161],{"class":1143},[1122,1641,1642],{"class":1176}," reverse_lazy",[1122,1644,1144],{"class":1143},[1122,1646,1189],{"class":1188},[1122,1648,1649],{"class":1192},"blog:post_list",[1122,1651,1189],{"class":1188},[1122,1653,1198],{"class":1143},[1122,1655,1656],{"class":1124,"line":1269},[1122,1657,1317],{"emptyLinePlaceholder":1316},[1122,1659,1660],{"class":1124,"line":1313},[1122,1661,1662],{"class":1128},"# MRO: PostCreateView -> LoginRequiredMixin -> CreateView -> \n",[1122,1664,1665],{"class":1124,"line":1320},[1122,1666,1667],{"class":1128},"#      SingleObjectTemplateResponseMixin -> BaseCreateView -> \n",[1122,1669,1670],{"class":1124,"line":1326},[1122,1671,1672],{"class":1128},"#      ModelFormMixin -> FormMixin -> SingleObjectMixin -> View\n",[1030,1674,1676],{"id":1675},"what-youll-learn","What You'll Learn",[1035,1678,1680],{"id":1679},"foundation-concepts","Foundation Concepts",[1026,1682,1683,1685,1686,1688,1689,1691],{},[1042,1684,172],{}," - CBV fundamentals, method dispatch, and basic patterns\n",[1042,1687,176],{}," - View, TemplateView, RedirectView, and core functionality\n",[1042,1690,180],{}," - ListView, DetailView, and display-focused views",[1035,1693,1695],{"id":1694},"crud-operations","CRUD Operations",[1026,1697,1698,1700,1701,1704,1705,1708],{},[1042,1699,184],{}," - Complete Create, Read, Update, Delete workflows\n",[1042,1702,1703],{},"Handling Forms"," - Form processing, validation, and user input management\n",[1042,1706,1707],{},"URL Configuration"," - Routing patterns and parameter handling for CBVs",[1035,1710,1712],{"id":1711},"advanced-techniques","Advanced Techniques",[1026,1714,1715,1717,1718,1720,1721,1723],{},[1042,1716,192],{}," - Composition patterns, authentication, permissions, and custom mixins\n",[1042,1719,200],{}," - Customization strategies and extension patterns\n",[1042,1722,204],{}," - Modern async/await patterns for high-performance applications",[1030,1725,1727],{"id":1726},"real-world-applications","Real-World Applications",[1035,1729,1731],{"id":1730},"content-management-systems","Content Management Systems",[1046,1733,1734,1737,1740,1743],{},[1049,1735,1736],{},"Blog post management with full CRUD",[1049,1738,1739],{},"User-generated content workflows",[1049,1741,1742],{},"Media gallery systems",[1049,1744,1745],{},"Document management platforms",[1035,1747,1749],{"id":1748},"e-commerce-platforms","E-commerce Platforms",[1046,1751,1752,1755,1758,1761],{},[1049,1753,1754],{},"Product catalog browsing",[1049,1756,1757],{},"Shopping cart management",[1049,1759,1760],{},"Order processing workflows",[1049,1762,1763],{},"User account management",[1035,1765,1767],{"id":1766},"api-development","API Development",[1046,1769,1770,1773,1776,1779],{},[1049,1771,1772],{},"RESTful API endpoints",[1049,1774,1775],{},"Resource-based operations",[1049,1777,1778],{},"Authentication and permissions",[1049,1780,1781],{},"Data serialization and validation",[1035,1783,1785],{"id":1784},"administrative-interfaces","Administrative Interfaces",[1046,1787,1788,1791,1794,1797],{},[1049,1789,1790],{},"Dashboard views with metrics",[1049,1792,1793],{},"Bulk operations on objects",[1049,1795,1796],{},"User management systems",[1049,1798,1799],{},"Configuration interfaces",[1030,1801,1803],{"id":1802},"development-patterns","Development Patterns",[1035,1805,1807],{"id":1806},"view-composition-strategy","View Composition Strategy",[1809,1810,1811,1817,1823,1829],"ol",{},[1049,1812,1813,1816],{},[1042,1814,1815],{},"Start Simple"," - Use built-in generic views when possible",[1049,1818,1819,1822],{},[1042,1820,1821],{},"Add Mixins"," - Compose functionality through mixins",[1049,1824,1825,1828],{},[1042,1826,1827],{},"Override Methods"," - Customize behavior through method overrides",[1049,1830,1831,1834],{},[1042,1832,1833],{},"Custom Base Classes"," - Create reusable patterns for your application",[1035,1836,1838],{"id":1837},"common-patterns","Common Patterns",[1112,1840,1842],{"className":1114,"code":1841,"language":1116,"meta":1117,"style":1117},"# Standard CRUD pattern\nclass PostListView(ListView):\n    model = Post\n    paginate_by = 10\n\nclass PostDetailView(DetailView):\n    model = Post\n\nclass PostCreateView(LoginRequiredMixin, CreateView):\n    model = Post\n    form_class = PostForm\n\nclass PostUpdateView(LoginRequiredMixin, UserPassesTestMixin, UpdateView):\n    model = Post\n    form_class = PostForm\n    \n    def test_func(self):\n        return self.get_object().author == self.request.user\n\nclass PostDeleteView(LoginRequiredMixin, UserPassesTestMixin, DeleteView):\n    model = Post\n    success_url = reverse_lazy('blog:post_list')\n    \n    def test_func(self):\n        return self.get_object().author == self.request.user\n",[1119,1843,1844,1849,1861,1869,1877,1881,1894,1902,1906,1922,1930,1938,1942,1965,1973,1981,1985,1999,2034,2039,2062,2071,2090,2095,2108],{"__ignoreMap":1117},[1122,1845,1846],{"class":1124,"line":1125},[1122,1847,1848],{"class":1128},"# Standard CRUD pattern\n",[1122,1850,1851,1853,1855,1857,1859],{"class":1124,"line":1132},[1122,1852,1329],{"class":1135},[1122,1854,1333],{"class":1332},[1122,1856,1144],{"class":1143},[1122,1858,1339],{"class":1338},[1122,1860,1151],{"class":1143},[1122,1862,1863,1865,1867],{"class":1124,"line":1154},[1122,1864,1347],{"class":1157},[1122,1866,1161],{"class":1143},[1122,1868,1352],{"class":1157},[1122,1870,1871,1873,1875],{"class":1124,"line":1201},[1122,1872,1387],{"class":1157},[1122,1874,1161],{"class":1143},[1122,1876,1392],{"class":1220},[1122,1878,1879],{"class":1124,"line":1226},[1122,1880,1317],{"emptyLinePlaceholder":1316},[1122,1882,1883,1885,1888,1890,1892],{"class":1124,"line":1269},[1122,1884,1329],{"class":1135},[1122,1886,1887],{"class":1332}," PostDetailView",[1122,1889,1144],{"class":1143},[1122,1891,1495],{"class":1338},[1122,1893,1151],{"class":1143},[1122,1895,1896,1898,1900],{"class":1124,"line":1313},[1122,1897,1347],{"class":1157},[1122,1899,1161],{"class":1143},[1122,1901,1352],{"class":1157},[1122,1903,1904],{"class":1124,"line":1320},[1122,1905,1317],{"emptyLinePlaceholder":1316},[1122,1907,1908,1910,1912,1914,1916,1918,1920],{"class":1124,"line":1326},[1122,1909,1329],{"class":1135},[1122,1911,1590],{"class":1332},[1122,1913,1144],{"class":1143},[1122,1915,1549],{"class":1338},[1122,1917,1217],{"class":1143},[1122,1919,1599],{"class":1338},[1122,1921,1151],{"class":1143},[1122,1923,1924,1926,1928],{"class":1124,"line":1344},[1122,1925,1347],{"class":1157},[1122,1927,1161],{"class":1143},[1122,1929,1352],{"class":1157},[1122,1931,1932,1934,1936],{"class":1124,"line":1355},[1122,1933,1614],{"class":1157},[1122,1935,1161],{"class":1143},[1122,1937,1619],{"class":1157},[1122,1939,1940],{"class":1124,"line":1370},[1122,1941,1317],{"emptyLinePlaceholder":1316},[1122,1943,1944,1946,1949,1951,1953,1955,1958,1960,1963],{"class":1124,"line":1384},[1122,1945,1329],{"class":1135},[1122,1947,1948],{"class":1332}," PostUpdateView",[1122,1950,1144],{"class":1143},[1122,1952,1549],{"class":1338},[1122,1954,1217],{"class":1143},[1122,1956,1957],{"class":1338}," UserPassesTestMixin",[1122,1959,1217],{"class":1143},[1122,1961,1962],{"class":1338}," UpdateView",[1122,1964,1151],{"class":1143},[1122,1966,1967,1969,1971],{"class":1124,"line":1395},[1122,1968,1347],{"class":1157},[1122,1970,1161],{"class":1143},[1122,1972,1352],{"class":1157},[1122,1974,1975,1977,1979],{"class":1124,"line":1401},[1122,1976,1614],{"class":1157},[1122,1978,1161],{"class":1143},[1122,1980,1619],{"class":1157},[1122,1982,1983],{"class":1124,"line":1418},[1122,1984,1398],{"class":1157},[1122,1986,1988,1990,1993,1995,1997],{"class":1124,"line":1987},17,[1122,1989,1404],{"class":1135},[1122,1991,1992],{"class":1139}," test_func",[1122,1994,1144],{"class":1143},[1122,1996,1413],{"class":1412},[1122,1998,1151],{"class":1143},[1122,2000,2002,2004,2008,2010,2013,2016,2019,2023,2025,2027,2029,2031],{"class":1124,"line":2001},18,[1122,2003,1421],{"class":1272},[1122,2005,2007],{"class":2006},"se3Ec"," self",[1122,2009,1167],{"class":1143},[1122,2011,2012],{"class":1176},"get_object",[1122,2014,2015],{"class":1143},"().",[1122,2017,2018],{"class":1170},"author",[1122,2020,2022],{"class":2021},"sVsLi"," ==",[1122,2024,2007],{"class":2006},[1122,2026,1167],{"class":1143},[1122,2028,1148],{"class":1170},[1122,2030,1167],{"class":1143},[1122,2032,2033],{"class":1170},"user\n",[1122,2035,2037],{"class":1124,"line":2036},19,[1122,2038,1317],{"emptyLinePlaceholder":1316},[1122,2040,2042,2044,2047,2049,2051,2053,2055,2057,2060],{"class":1124,"line":2041},20,[1122,2043,1329],{"class":1135},[1122,2045,2046],{"class":1332}," PostDeleteView",[1122,2048,1144],{"class":1143},[1122,2050,1549],{"class":1338},[1122,2052,1217],{"class":1143},[1122,2054,1957],{"class":1338},[1122,2056,1217],{"class":1143},[1122,2058,2059],{"class":1338}," DeleteView",[1122,2061,1151],{"class":1143},[1122,2063,2065,2067,2069],{"class":1124,"line":2064},21,[1122,2066,1347],{"class":1157},[1122,2068,1161],{"class":1143},[1122,2070,1352],{"class":1157},[1122,2072,2074,2076,2078,2080,2082,2084,2086,2088],{"class":1124,"line":2073},22,[1122,2075,1637],{"class":1157},[1122,2077,1161],{"class":1143},[1122,2079,1642],{"class":1176},[1122,2081,1144],{"class":1143},[1122,2083,1189],{"class":1188},[1122,2085,1649],{"class":1192},[1122,2087,1189],{"class":1188},[1122,2089,1198],{"class":1143},[1122,2091,2093],{"class":1124,"line":2092},23,[1122,2094,1398],{"class":1157},[1122,2096,2098,2100,2102,2104,2106],{"class":1124,"line":2097},24,[1122,2099,1404],{"class":1135},[1122,2101,1992],{"class":1139},[1122,2103,1144],{"class":1143},[1122,2105,1413],{"class":1412},[1122,2107,1151],{"class":1143},[1122,2109,2111,2113,2115,2117,2119,2121,2123,2125,2127,2129,2131,2133],{"class":1124,"line":2110},25,[1122,2112,1421],{"class":1272},[1122,2114,2007],{"class":2006},[1122,2116,1167],{"class":1143},[1122,2118,2012],{"class":1176},[1122,2120,2015],{"class":1143},[1122,2122,2018],{"class":1170},[1122,2124,2022],{"class":2021},[1122,2126,2007],{"class":2006},[1122,2128,1167],{"class":1143},[1122,2130,1148],{"class":1170},[1122,2132,1167],{"class":1143},[1122,2134,2033],{"class":1170},[1035,2136,2138],{"id":2137},"performance-considerations","Performance Considerations",[1809,2140,2141,2147,2152,2157],{},[1049,2142,2143,2146],{},[1042,2144,2145],{},"Queryset Optimization"," - Use select_related() and prefetch_related()",[1049,2148,2149,2151],{},[1042,2150,793],{}," - Method-level and view-level caching",[1049,2153,2154,2156],{},[1042,2155,208],{}," - Efficient handling of large datasets",[1049,2158,2159,2162],{},[1042,2160,2161],{},"Database Queries"," - Minimize N+1 query problems",[1030,2164,2166],{"id":2165},"chapter-structure","Chapter Structure",[1026,2168,2169],{},"This section builds your class-based view expertise systematically:",[1026,2171,2172,2175,2176,2179,2180,2183,2184,2187],{},[1042,2173,2174],{},"Foundation"," - CBV concepts, base classes, and generic view patterns\n",[1042,2177,2178],{},"Implementation"," - CRUD operations, form handling, and URL configuration\n",[1042,2181,2182],{},"Composition"," - Mixins, inheritance, and reusable patterns\n",[1042,2185,2186],{},"Advanced Topics"," - Customization, performance, and async patterns",[1026,2189,2190],{},"Each topic includes practical examples, real-world use cases, and production-ready patterns that you can implement immediately in your Django projects.",[1030,2192,2194],{"id":2193},"cbv-best-practices-preview","CBV Best Practices Preview",[1035,2196,2198],{"id":2197},"naming-conventions","Naming Conventions",[1112,2200,2202],{"className":1114,"code":2201,"language":1116,"meta":1117,"style":1117},"# Follow Django conventions\nclass PostListView(ListView):          # List views\nclass PostDetailView(DetailView):      # Detail views  \nclass PostCreateView(CreateView):      # Create views\nclass PostUpdateView(UpdateView):      # Update views\nclass PostDeleteView(DeleteView):      # Delete views\n",[1119,2203,2204,2209,2225,2240,2255,2270],{"__ignoreMap":1117},[1122,2205,2206],{"class":1124,"line":1125},[1122,2207,2208],{"class":1128},"# Follow Django conventions\n",[1122,2210,2211,2213,2215,2217,2219,2222],{"class":1124,"line":1132},[1122,2212,1329],{"class":1135},[1122,2214,1333],{"class":1332},[1122,2216,1144],{"class":1143},[1122,2218,1339],{"class":1338},[1122,2220,2221],{"class":1143},"):",[1122,2223,2224],{"class":1128},"          # List views\n",[1122,2226,2227,2229,2231,2233,2235,2237],{"class":1124,"line":1154},[1122,2228,1329],{"class":1135},[1122,2230,1887],{"class":1332},[1122,2232,1144],{"class":1143},[1122,2234,1495],{"class":1338},[1122,2236,2221],{"class":1143},[1122,2238,2239],{"class":1128},"      # Detail views  \n",[1122,2241,2242,2244,2246,2248,2250,2252],{"class":1124,"line":1201},[1122,2243,1329],{"class":1135},[1122,2245,1590],{"class":1332},[1122,2247,1144],{"class":1143},[1122,2249,1501],{"class":1338},[1122,2251,2221],{"class":1143},[1122,2253,2254],{"class":1128},"      # Create views\n",[1122,2256,2257,2259,2261,2263,2265,2267],{"class":1124,"line":1226},[1122,2258,1329],{"class":1135},[1122,2260,1948],{"class":1332},[1122,2262,1144],{"class":1143},[1122,2264,1507],{"class":1338},[1122,2266,2221],{"class":1143},[1122,2268,2269],{"class":1128},"      # Update views\n",[1122,2271,2272,2274,2276,2278,2280,2282],{"class":1124,"line":1269},[1122,2273,1329],{"class":1135},[1122,2275,2046],{"class":1332},[1122,2277,1144],{"class":1143},[1122,2279,1513],{"class":1338},[1122,2281,2221],{"class":1143},[1122,2283,2284],{"class":1128},"      # Delete views\n",[1035,2286,2288],{"id":2287},"method-override-patterns","Method Override Patterns",[1112,2290,2292],{"className":1114,"code":2291,"language":1116,"meta":1117,"style":1117},"class CustomListView(ListView):\n    def get_queryset(self):\n        # Custom queryset logic\n        return super().get_queryset().filter(active=True)\n    \n    def get_context_data(self, **kwargs):\n        # Add extra context\n        context = super().get_context_data(**kwargs)\n        context['extra_data'] = self.get_extra_data()\n        return context\n",[1119,2293,2294,2307,2319,2324,2354,2358,2379,2384,2407,2438],{"__ignoreMap":1117},[1122,2295,2296,2298,2301,2303,2305],{"class":1124,"line":1125},[1122,2297,1329],{"class":1135},[1122,2299,2300],{"class":1332}," CustomListView",[1122,2302,1144],{"class":1143},[1122,2304,1339],{"class":1338},[1122,2306,1151],{"class":1143},[1122,2308,2309,2311,2313,2315,2317],{"class":1124,"line":1132},[1122,2310,1404],{"class":1135},[1122,2312,1407],{"class":1139},[1122,2314,1144],{"class":1143},[1122,2316,1413],{"class":1412},[1122,2318,1151],{"class":1143},[1122,2320,2321],{"class":1124,"line":1154},[1122,2322,2323],{"class":1128},"        # Custom queryset logic\n",[1122,2325,2326,2328,2332,2334,2337,2339,2341,2343,2346,2348,2352],{"class":1124,"line":1201},[1122,2327,1421],{"class":1272},[1122,2329,2331],{"class":2330},"sa2tF"," super",[1122,2333,2015],{"class":1143},[1122,2335,2336],{"class":1176},"get_queryset",[1122,2338,2015],{"class":1143},[1122,2340,1177],{"class":1176},[1122,2342,1144],{"class":1143},[1122,2344,2345],{"class":1182},"active",[1122,2347,1161],{"class":1143},[1122,2349,2351],{"class":2350},"s8XtY","True",[1122,2353,1198],{"class":1143},[1122,2355,2356],{"class":1124,"line":1226},[1122,2357,1398],{"class":1157},[1122,2359,2360,2362,2365,2367,2369,2371,2374,2377],{"class":1124,"line":1269},[1122,2361,1404],{"class":1135},[1122,2363,2364],{"class":1139}," get_context_data",[1122,2366,1144],{"class":1143},[1122,2368,1413],{"class":1412},[1122,2370,1217],{"class":1143},[1122,2372,2373],{"class":2021}," **",[1122,2375,2376],{"class":1147},"kwargs",[1122,2378,1151],{"class":1143},[1122,2380,2381],{"class":1124,"line":1313},[1122,2382,2383],{"class":1128},"        # Add extra context\n",[1122,2385,2386,2389,2391,2393,2395,2398,2400,2403,2405],{"class":1124,"line":1320},[1122,2387,2388],{"class":1157},"        context ",[1122,2390,1161],{"class":1143},[1122,2392,2331],{"class":2330},[1122,2394,2015],{"class":1143},[1122,2396,2397],{"class":1176},"get_context_data",[1122,2399,1144],{"class":1143},[1122,2401,2402],{"class":2021},"**",[1122,2404,2376],{"class":1176},[1122,2406,1198],{"class":1143},[1122,2408,2409,2412,2415,2417,2420,2422,2425,2428,2430,2432,2435],{"class":1124,"line":1326},[1122,2410,2411],{"class":1157},"        context",[1122,2413,2414],{"class":1143},"[",[1122,2416,1189],{"class":1188},[1122,2418,2419],{"class":1192},"extra_data",[1122,2421,1189],{"class":1188},[1122,2423,2424],{"class":1143},"]",[1122,2426,2427],{"class":1143}," =",[1122,2429,2007],{"class":2006},[1122,2431,1167],{"class":1143},[1122,2433,2434],{"class":1176},"get_extra_data",[1122,2436,2437],{"class":1143},"()\n",[1122,2439,2440,2442],{"class":1124,"line":1344},[1122,2441,1421],{"class":1272},[1122,2443,2444],{"class":1157}," context\n",[1035,2446,2448],{"id":2447},"mixin-composition","Mixin Composition",[1112,2450,2452],{"className":1114,"code":2451,"language":1116,"meta":1117,"style":1117},"class SecurePostView(LoginRequiredMixin, UserPassesTestMixin, UpdateView):\n    model = Post\n    \n    def test_func(self):\n        return self.get_object().author == self.request.user or self.request.user.is_staff\n",[1119,2453,2454,2475,2483,2487,2499],{"__ignoreMap":1117},[1122,2455,2456,2458,2461,2463,2465,2467,2469,2471,2473],{"class":1124,"line":1125},[1122,2457,1329],{"class":1135},[1122,2459,2460],{"class":1332}," SecurePostView",[1122,2462,1144],{"class":1143},[1122,2464,1549],{"class":1338},[1122,2466,1217],{"class":1143},[1122,2468,1957],{"class":1338},[1122,2470,1217],{"class":1143},[1122,2472,1962],{"class":1338},[1122,2474,1151],{"class":1143},[1122,2476,2477,2479,2481],{"class":1124,"line":1132},[1122,2478,1347],{"class":1157},[1122,2480,1161],{"class":1143},[1122,2482,1352],{"class":1157},[1122,2484,2485],{"class":1124,"line":1154},[1122,2486,1398],{"class":1157},[1122,2488,2489,2491,2493,2495,2497],{"class":1124,"line":1201},[1122,2490,1404],{"class":1135},[1122,2492,1992],{"class":1139},[1122,2494,1144],{"class":1143},[1122,2496,1413],{"class":1412},[1122,2498,1151],{"class":1143},[1122,2500,2501,2503,2505,2507,2509,2511,2513,2515,2517,2519,2521,2523,2526,2529,2531,2533,2535,2537,2539,2541],{"class":1124,"line":1226},[1122,2502,1421],{"class":1272},[1122,2504,2007],{"class":2006},[1122,2506,1167],{"class":1143},[1122,2508,2012],{"class":1176},[1122,2510,2015],{"class":1143},[1122,2512,2018],{"class":1170},[1122,2514,2022],{"class":2021},[1122,2516,2007],{"class":2006},[1122,2518,1167],{"class":1143},[1122,2520,1148],{"class":1170},[1122,2522,1167],{"class":1143},[1122,2524,2525],{"class":1170},"user",[1122,2527,2528],{"class":2021}," or",[1122,2530,2007],{"class":2006},[1122,2532,1167],{"class":1143},[1122,2534,1148],{"class":1170},[1122,2536,1167],{"class":1143},[1122,2538,2525],{"class":1170},[1122,2540,1167],{"class":1143},[1122,2542,2543],{"class":1170},"is_staff\n",[1030,2545,2547],{"id":2546},"common-pitfalls-and-solutions","Common Pitfalls and Solutions",[1035,2549,2551],{"id":2550},"method-resolution-order-issues","Method Resolution Order Issues",[1046,2553,2554,2557,2560],{},[1049,2555,2556],{},"Understand mixin ordering",[1049,2558,2559],{},"Use super() correctly",[1049,2561,2562],{},"Test inheritance chains",[1035,2564,2566],{"id":2565},"performance-problems","Performance Problems",[1046,2568,2569,2572,2575],{},[1049,2570,2571],{},"Optimize querysets in get_queryset()",[1049,2573,2574],{},"Use select_related() for foreign keys",[1049,2576,2577],{},"Implement proper caching",[1035,2579,2581],{"id":2580},"security-considerations","Security Considerations",[1046,2583,2584,2587,2590],{},[1049,2585,2586],{},"Always validate permissions",[1049,2588,2589],{},"Use CSRF protection",[1049,2591,2592],{},"Sanitize user input",[1026,2594,2595],{},"Class-based views represent Django's mature approach to view development. They provide powerful abstractions while maintaining the flexibility to handle complex requirements. Mastering CBVs enables you to build maintainable, scalable Django applications with significantly less code duplication.",[1026,2597,2598],{},"Understanding the inheritance hierarchy, method dispatch, and composition patterns is key to leveraging CBVs effectively. This chapter will guide you through all aspects of class-based views, from basic usage to advanced customization techniques.",[2600,2601,2602],"style",{},"html pre.shiki code .s9Tkl, html code.shiki .s9Tkl{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#A0ADA0;--shiki-default-font-style:inherit;--shiki-dark:#758575DD;--shiki-dark-font-style:inherit}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .soVBu, html code.shiki .soVBu{--shiki-light:#39ADB5;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sCyAa, html code.shiki .sCyAa{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#393A34;--shiki-default-font-style:inherit;--shiki-dark:#DBD7CAEE;--shiki-dark-font-style:inherit}html pre.shiki code .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sBPpx, html code.shiki .sBPpx{--shiki-light:#E53935;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sqOPj, html code.shiki .sqOPj{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#B07D48;--shiki-default-font-style:inherit;--shiki-dark:#BD976A;--shiki-dark-font-style:inherit}html pre.shiki code .sbYkP, html code.shiki .sbYkP{--shiki-light:#39ADB5;--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .sTbE_, html code.shiki .sTbE_{--shiki-light:#91B859;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .sFGJz, html code.shiki .sFGJz{--shiki-light:#E53935;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .siDh9, html code.shiki .siDh9{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#1E754F;--shiki-default-font-style:inherit;--shiki-dark:#4D9375;--shiki-dark-font-style:inherit}html pre.shiki code .sD-vU, html code.shiki .sD-vU{--shiki-light:#E2931D;--shiki-default:#2E8F82;--shiki-dark:#5DA994}html pre.shiki code .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sRjD_, html code.shiki .sRjD_{--shiki-light:#E53935;--shiki-light-font-style:italic;--shiki-default:#393A34;--shiki-default-font-style:inherit;--shiki-dark:#DBD7CAEE;--shiki-dark-font-style:inherit}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .se3Ec, html code.shiki .se3Ec{--shiki-light:#90A4AE;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sa2tF, html code.shiki .sa2tF{--shiki-light:#E2931D;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .s8XtY, html code.shiki .s8XtY{--shiki-light:#39ADB5;--shiki-default:#1E754F;--shiki-dark:#4D9375}",{"title":1117,"searchDepth":1125,"depth":1132,"links":2604},[2605,2609,2613,2618,2624,2629,2630,2635],{"id":1032,"depth":1132,"text":1033,"children":2606},[2607,2608],{"id":1037,"depth":1154,"text":1038},{"id":1109,"depth":1154,"text":1110},{"id":1448,"depth":1132,"text":1449,"children":2610},[2611,2612],{"id":1452,"depth":1154,"text":1453},{"id":1577,"depth":1154,"text":1578},{"id":1675,"depth":1132,"text":1676,"children":2614},[2615,2616,2617],{"id":1679,"depth":1154,"text":1680},{"id":1694,"depth":1154,"text":1695},{"id":1711,"depth":1154,"text":1712},{"id":1726,"depth":1132,"text":1727,"children":2619},[2620,2621,2622,2623],{"id":1730,"depth":1154,"text":1731},{"id":1748,"depth":1154,"text":1749},{"id":1766,"depth":1154,"text":1767},{"id":1784,"depth":1154,"text":1785},{"id":1802,"depth":1132,"text":1803,"children":2625},[2626,2627,2628],{"id":1806,"depth":1154,"text":1807},{"id":1837,"depth":1154,"text":1838},{"id":2137,"depth":1154,"text":2138},{"id":2165,"depth":1132,"text":2166},{"id":2193,"depth":1132,"text":2194,"children":2631},[2632,2633,2634],{"id":2197,"depth":1154,"text":2198},{"id":2287,"depth":1154,"text":2288},{"id":2447,"depth":1154,"text":2448},{"id":2546,"depth":1132,"text":2547,"children":2636},[2637,2638,2639],{"id":2550,"depth":1154,"text":2551},{"id":2565,"depth":1154,"text":2566},{"id":2580,"depth":1154,"text":2581},"md",null,{},{"title":166,"description":1028},"DmkABEJ7WFjCZyqcNU-ChXjfMxtDSnoCoBQ0X01uVlA",[2646,2648],{"title":162,"path":163,"stem":164,"description":2647,"children":-1},"Django provides several shortcut functions that simplify common view patterns and reduce boilerplate code. These functions handle frequent operations like rendering templates, retrieving objects, and managing redirects efficiently.",{"title":172,"path":173,"stem":174,"description":2649,"children":-1},"Class-based views (CBVs) provide an object-oriented approach to handling HTTP requests in Django. They leverage Python's class inheritance to create reusable, composable view components that reduce code duplication and improve maintainability.",1772474910167]