[{"data":1,"prerenderedAt":8573},["ShallowReactive",2],{"navigation":3,"/deployment":1016,"/deployment-surround":8568},[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":737,"body":1018,"description":1028,"extension":8563,"links":8564,"meta":8565,"navigation":1104,"path":738,"seo":8566,"stem":739,"__hash__":8567},"docs/20.deployment/01.index.md",{"type":1019,"value":1020,"toc":8508},"minimark",[1021,1025,1029,1034,1037,1042,1068,1072,1083,1087,1091,1149,1153,1198,1202,1247,1250,1295,1299,1303,1306,1737,1741,1744,1748,1751,1755,1759,1765,1769,1775,1779,1783,2206,2210,2633,2637,2641,3594,3598,4104,4107,4110,4367,4371,4752,4756,4760,5049,5053,5512,5516,5520,6834,6838,6841,6847,6853,6859,6865,6871,6876,6881,6887,6891,6895,6898,6901,6904,6908,6911,6915,6918,6922,6926,7140,7144,7956,7960,7964,8494,8498,8501,8504],[1022,1023,737],"h1",{"id":1024},"deployment",[1026,1027,1028],"p",{},"Deploying Django applications to production requires careful planning, proper configuration, and robust infrastructure. This comprehensive guide covers everything from preparing your application for production to implementing scalable deployment architectures, monitoring systems, and backup strategies. Whether you're deploying a simple web application or a complex microservices architecture, this section provides production-ready patterns and best practices.",[1030,1031,1033],"h2",{"id":1032},"production-deployment-fundamentals","Production Deployment Fundamentals",[1026,1035,1036],{},"Moving from development to production involves significant changes in configuration, security, performance optimization, and infrastructure management. Production deployments must handle real user traffic, ensure high availability, maintain data integrity, and provide monitoring and recovery capabilities.",[1038,1039,1041],"h3",{"id":1040},"key-production-requirements","Key Production Requirements",[1026,1043,1044,1047,1048,1051,1052,1055,1056,1059,1060,1063,1064,1067],{},[1045,1046,541],"strong",{},": Protect against common vulnerabilities and secure sensitive data\n",[1045,1049,1050],{},"Performance",": Handle expected traffic loads with optimal response times\n",[1045,1053,1054],{},"Reliability",": Maintain high uptime with proper error handling and recovery\n",[1045,1057,1058],{},"Scalability",": Support growth in users, data, and feature complexity\n",[1045,1061,1062],{},"Monitoring",": Track application health, performance, and user experience\n",[1045,1065,1066],{},"Maintainability",": Enable easy updates, rollbacks, and troubleshooting",[1038,1069,1071],{"id":1070},"deployment-architecture-overview","Deployment Architecture Overview",[1073,1074,1079],"pre",{"className":1075,"code":1077,"language":1078},[1076],"language-text","┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Load Balancer │───▶│   Web Servers   │───▶│    Database     │\n│   (Nginx/HAProxy)│    │ (Gunicorn/uWSGI)│    │ (PostgreSQL)    │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n         │                       │                       │\n         ▼                       ▼                       ▼\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Static Files  │    │   Application   │    │   File Storage  │\n│   (CDN/S3)      │    │   Servers       │    │   (S3/NFS)      │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n         │                       │                       │\n         ▼                       ▼                       ▼\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Monitoring    │    │   Caching       │    │   Background     │\n│   (Prometheus)  │    │   (Redis)       │    │   Tasks (Celery) │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n","text",[1080,1081,1077],"code",{"__ignoreMap":1082},"",[1030,1084,1086],{"id":1085},"production-readiness-checklist","Production Readiness Checklist",[1038,1088,1090],{"id":1089},"security-configuration","Security Configuration",[1092,1093,1096,1107,1113,1119,1125,1131,1137,1143],"ul",{"className":1094},[1095],"contains-task-list",[1097,1098,1101,1106],"li",{"className":1099},[1100],"task-list-item",[1102,1103],"input",{"disabled":1104,"type":1105},true,"checkbox"," DEBUG = False in production settings",[1097,1108,1110,1112],{"className":1109},[1100],[1102,1111],{"disabled":1104,"type":1105}," Secure SECRET_KEY management",[1097,1114,1116,1118],{"className":1115},[1100],[1102,1117],{"disabled":1104,"type":1105}," HTTPS enforcement with proper SSL certificates",[1097,1120,1122,1124],{"className":1121},[1100],[1102,1123],{"disabled":1104,"type":1105}," CSRF and XSS protection enabled",[1097,1126,1128,1130],{"className":1127},[1100],[1102,1129],{"disabled":1104,"type":1105}," Secure headers configuration",[1097,1132,1134,1136],{"className":1133},[1100],[1102,1135],{"disabled":1104,"type":1105}," Database connection security",[1097,1138,1140,1142],{"className":1139},[1100],[1102,1141],{"disabled":1104,"type":1105}," Static file security headers",[1097,1144,1146,1148],{"className":1145},[1100],[1102,1147],{"disabled":1104,"type":1105}," User authentication and authorization review",[1038,1150,1152],{"id":1151},"performance-optimization","Performance Optimization",[1092,1154,1156,1162,1168,1174,1180,1186,1192],{"className":1155},[1095],[1097,1157,1159,1161],{"className":1158},[1100],[1102,1160],{"disabled":1104,"type":1105}," Database query optimization and indexing",[1097,1163,1165,1167],{"className":1164},[1100],[1102,1166],{"disabled":1104,"type":1105}," Static file compression and CDN configuration",[1097,1169,1171,1173],{"className":1170},[1100],[1102,1172],{"disabled":1104,"type":1105}," Caching strategy implementation",[1097,1175,1177,1179],{"className":1176},[1100],[1102,1178],{"disabled":1104,"type":1105}," Connection pooling configuration",[1097,1181,1183,1185],{"className":1182},[1100],[1102,1184],{"disabled":1104,"type":1105}," Memory usage optimization",[1097,1187,1189,1191],{"className":1188},[1100],[1102,1190],{"disabled":1104,"type":1105}," Async/await patterns where beneficial",[1097,1193,1195,1197],{"className":1194},[1100],[1102,1196],{"disabled":1104,"type":1105}," Image optimization and lazy loading",[1038,1199,1201],{"id":1200},"infrastructure-setup","Infrastructure Setup",[1092,1203,1205,1211,1217,1223,1229,1235,1241],{"className":1204},[1095],[1097,1206,1208,1210],{"className":1207},[1100],[1102,1209],{"disabled":1104,"type":1105}," Production database configuration",[1097,1212,1214,1216],{"className":1213},[1100],[1102,1215],{"disabled":1104,"type":1105}," Web server configuration (Nginx/Apache)",[1097,1218,1220,1222],{"className":1219},[1100],[1102,1221],{"disabled":1104,"type":1105}," Application server setup (Gunicorn/uWSGI)",[1097,1224,1226,1228],{"className":1225},[1100],[1102,1227],{"disabled":1104,"type":1105}," Load balancer configuration",[1097,1230,1232,1234],{"className":1231},[1100],[1102,1233],{"disabled":1104,"type":1105}," SSL certificate installation",[1097,1236,1238,1240],{"className":1237},[1100],[1102,1239],{"disabled":1104,"type":1105}," Firewall and security group configuration",[1097,1242,1244,1246],{"className":1243},[1100],[1102,1245],{"disabled":1104,"type":1105}," Backup and recovery procedures",[1038,1248,767],{"id":1249},"monitoring-and-logging",[1092,1251,1253,1259,1265,1271,1277,1283,1289],{"className":1252},[1095],[1097,1254,1256,1258],{"className":1255},[1100],[1102,1257],{"disabled":1104,"type":1105}," Application performance monitoring",[1097,1260,1262,1264],{"className":1261},[1100],[1102,1263],{"disabled":1104,"type":1105}," Error tracking and alerting",[1097,1266,1268,1270],{"className":1267},[1100],[1102,1269],{"disabled":1104,"type":1105}," Log aggregation and analysis",[1097,1272,1274,1276],{"className":1273},[1100],[1102,1275],{"disabled":1104,"type":1105}," Health check endpoints",[1097,1278,1280,1282],{"className":1279},[1100],[1102,1281],{"disabled":1104,"type":1105}," Uptime monitoring",[1097,1284,1286,1288],{"className":1285},[1100],[1102,1287],{"disabled":1104,"type":1105}," Resource usage tracking",[1097,1290,1292,1294],{"className":1291},[1100],[1102,1293],{"disabled":1104,"type":1105}," User analytics and metrics",[1030,1296,1298],{"id":1297},"deployment-strategies","Deployment Strategies",[1038,1300,1302],{"id":1301},"blue-green-deployment","Blue-Green Deployment",[1026,1304,1305],{},"Maintain two identical production environments, switching traffic between them for zero-downtime deployments.",[1073,1307,1311],{"className":1308,"code":1309,"language":1310,"meta":1082,"style":1082},"language-python shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# Blue-Green deployment configuration\nDEPLOYMENT_ENVIRONMENTS = {\n    'blue': {\n        'servers': ['blue-1.example.com', 'blue-2.example.com'],\n        'database': 'blue_db',\n        'static_url': 'https://blue-static.example.com/',\n    },\n    'green': {\n        'servers': ['green-1.example.com', 'green-2.example.com'],\n        'database': 'green_db',\n        'static_url': 'https://green-static.example.com/',\n    }\n}\n\n# Load balancer configuration for traffic switching\nupstream blue_servers {\n    server blue-1.example.com:8000;\n    server blue-2.example.com:8000;\n}\n\nupstream green_servers {\n    server green-1.example.com:8000;\n    server green-2.example.com:8000;\n}\n\n# Switch between environments\nserver {\n    location / {\n        proxy_pass http://blue_servers;  # Switch to green_servers for deployment\n    }\n}\n","python",[1080,1312,1313,1322,1336,1355,1392,1414,1435,1441,1455,1486,1506,1526,1532,1538,1544,1550,1560,1592,1614,1619,1624,1632,1654,1675,1680,1685,1691,1699,1710,1727,1732],{"__ignoreMap":1082},[1314,1315,1318],"span",{"class":1316,"line":1317},"line",1,[1314,1319,1321],{"class":1320},"s9Tkl","# Blue-Green deployment configuration\n",[1314,1323,1325,1329,1333],{"class":1316,"line":1324},2,[1314,1326,1328],{"class":1327},"se3Ec","DEPLOYMENT_ENVIRONMENTS",[1314,1330,1332],{"class":1331},"soVBu"," =",[1314,1334,1335],{"class":1331}," {\n",[1314,1337,1339,1343,1347,1350,1353],{"class":1316,"line":1338},3,[1314,1340,1342],{"class":1341},"sbYkP","    '",[1314,1344,1346],{"class":1345},"sTbE_","blue",[1314,1348,1349],{"class":1341},"'",[1314,1351,1352],{"class":1331},":",[1314,1354,1335],{"class":1331},[1314,1356,1358,1361,1364,1366,1368,1371,1373,1376,1378,1381,1384,1387,1389],{"class":1316,"line":1357},4,[1314,1359,1360],{"class":1341},"        '",[1314,1362,1363],{"class":1345},"servers",[1314,1365,1349],{"class":1341},[1314,1367,1352],{"class":1331},[1314,1369,1370],{"class":1331}," [",[1314,1372,1349],{"class":1341},[1314,1374,1375],{"class":1345},"blue-1.example.com",[1314,1377,1349],{"class":1341},[1314,1379,1380],{"class":1331},",",[1314,1382,1383],{"class":1341}," '",[1314,1385,1386],{"class":1345},"blue-2.example.com",[1314,1388,1349],{"class":1341},[1314,1390,1391],{"class":1331},"],\n",[1314,1393,1395,1397,1400,1402,1404,1406,1409,1411],{"class":1316,"line":1394},5,[1314,1396,1360],{"class":1341},[1314,1398,1399],{"class":1345},"database",[1314,1401,1349],{"class":1341},[1314,1403,1352],{"class":1331},[1314,1405,1383],{"class":1341},[1314,1407,1408],{"class":1345},"blue_db",[1314,1410,1349],{"class":1341},[1314,1412,1413],{"class":1331},",\n",[1314,1415,1417,1419,1422,1424,1426,1428,1431,1433],{"class":1316,"line":1416},6,[1314,1418,1360],{"class":1341},[1314,1420,1421],{"class":1345},"static_url",[1314,1423,1349],{"class":1341},[1314,1425,1352],{"class":1331},[1314,1427,1383],{"class":1341},[1314,1429,1430],{"class":1345},"https://blue-static.example.com/",[1314,1432,1349],{"class":1341},[1314,1434,1413],{"class":1331},[1314,1436,1438],{"class":1316,"line":1437},7,[1314,1439,1440],{"class":1331},"    },\n",[1314,1442,1444,1446,1449,1451,1453],{"class":1316,"line":1443},8,[1314,1445,1342],{"class":1341},[1314,1447,1448],{"class":1345},"green",[1314,1450,1349],{"class":1341},[1314,1452,1352],{"class":1331},[1314,1454,1335],{"class":1331},[1314,1456,1458,1460,1462,1464,1466,1468,1470,1473,1475,1477,1479,1482,1484],{"class":1316,"line":1457},9,[1314,1459,1360],{"class":1341},[1314,1461,1363],{"class":1345},[1314,1463,1349],{"class":1341},[1314,1465,1352],{"class":1331},[1314,1467,1370],{"class":1331},[1314,1469,1349],{"class":1341},[1314,1471,1472],{"class":1345},"green-1.example.com",[1314,1474,1349],{"class":1341},[1314,1476,1380],{"class":1331},[1314,1478,1383],{"class":1341},[1314,1480,1481],{"class":1345},"green-2.example.com",[1314,1483,1349],{"class":1341},[1314,1485,1391],{"class":1331},[1314,1487,1489,1491,1493,1495,1497,1499,1502,1504],{"class":1316,"line":1488},10,[1314,1490,1360],{"class":1341},[1314,1492,1399],{"class":1345},[1314,1494,1349],{"class":1341},[1314,1496,1352],{"class":1331},[1314,1498,1383],{"class":1341},[1314,1500,1501],{"class":1345},"green_db",[1314,1503,1349],{"class":1341},[1314,1505,1413],{"class":1331},[1314,1507,1509,1511,1513,1515,1517,1519,1522,1524],{"class":1316,"line":1508},11,[1314,1510,1360],{"class":1341},[1314,1512,1421],{"class":1345},[1314,1514,1349],{"class":1341},[1314,1516,1352],{"class":1331},[1314,1518,1383],{"class":1341},[1314,1520,1521],{"class":1345},"https://green-static.example.com/",[1314,1523,1349],{"class":1341},[1314,1525,1413],{"class":1331},[1314,1527,1529],{"class":1316,"line":1528},12,[1314,1530,1531],{"class":1331},"    }\n",[1314,1533,1535],{"class":1316,"line":1534},13,[1314,1536,1537],{"class":1331},"}\n",[1314,1539,1541],{"class":1316,"line":1540},14,[1314,1542,1543],{"emptyLinePlaceholder":1104},"\n",[1314,1545,1547],{"class":1316,"line":1546},15,[1314,1548,1549],{"class":1320},"# Load balancer configuration for traffic switching\n",[1314,1551,1553,1557],{"class":1316,"line":1552},16,[1314,1554,1556],{"class":1555},"sftqT","upstream blue_servers ",[1314,1558,1559],{"class":1331},"{\n",[1314,1561,1563,1566,1570,1574,1577,1580,1584,1586,1589],{"class":1316,"line":1562},17,[1314,1564,1565],{"class":1555},"    server blue",[1314,1567,1569],{"class":1568},"sVsLi","-",[1314,1571,1573],{"class":1572},"s7CZa","1.",[1314,1575,1576],{"class":1555},"example",[1314,1578,1579],{"class":1331},".",[1314,1581,1583],{"class":1582},"sBPpx","com",[1314,1585,1352],{"class":1331},[1314,1587,1588],{"class":1572},"8000",[1314,1590,1591],{"class":1555},";\n",[1314,1593,1595,1597,1599,1602,1604,1606,1608,1610,1612],{"class":1316,"line":1594},18,[1314,1596,1565],{"class":1555},[1314,1598,1569],{"class":1568},[1314,1600,1601],{"class":1572},"2.",[1314,1603,1576],{"class":1555},[1314,1605,1579],{"class":1331},[1314,1607,1583],{"class":1582},[1314,1609,1352],{"class":1331},[1314,1611,1588],{"class":1572},[1314,1613,1591],{"class":1555},[1314,1615,1617],{"class":1316,"line":1616},19,[1314,1618,1537],{"class":1331},[1314,1620,1622],{"class":1316,"line":1621},20,[1314,1623,1543],{"emptyLinePlaceholder":1104},[1314,1625,1627,1630],{"class":1316,"line":1626},21,[1314,1628,1629],{"class":1555},"upstream green_servers ",[1314,1631,1559],{"class":1331},[1314,1633,1635,1638,1640,1642,1644,1646,1648,1650,1652],{"class":1316,"line":1634},22,[1314,1636,1637],{"class":1555},"    server green",[1314,1639,1569],{"class":1568},[1314,1641,1573],{"class":1572},[1314,1643,1576],{"class":1555},[1314,1645,1579],{"class":1331},[1314,1647,1583],{"class":1582},[1314,1649,1352],{"class":1331},[1314,1651,1588],{"class":1572},[1314,1653,1591],{"class":1555},[1314,1655,1657,1659,1661,1663,1665,1667,1669,1671,1673],{"class":1316,"line":1656},23,[1314,1658,1637],{"class":1555},[1314,1660,1569],{"class":1568},[1314,1662,1601],{"class":1572},[1314,1664,1576],{"class":1555},[1314,1666,1579],{"class":1331},[1314,1668,1583],{"class":1582},[1314,1670,1352],{"class":1331},[1314,1672,1588],{"class":1572},[1314,1674,1591],{"class":1555},[1314,1676,1678],{"class":1316,"line":1677},24,[1314,1679,1537],{"class":1331},[1314,1681,1683],{"class":1316,"line":1682},25,[1314,1684,1543],{"emptyLinePlaceholder":1104},[1314,1686,1688],{"class":1316,"line":1687},26,[1314,1689,1690],{"class":1320},"# Switch between environments\n",[1314,1692,1694,1697],{"class":1316,"line":1693},27,[1314,1695,1696],{"class":1555},"server ",[1314,1698,1559],{"class":1331},[1314,1700,1702,1705,1708],{"class":1316,"line":1701},28,[1314,1703,1704],{"class":1555},"    location ",[1314,1706,1707],{"class":1568},"/",[1314,1709,1335],{"class":1331},[1314,1711,1713,1716,1718,1721,1724],{"class":1316,"line":1712},29,[1314,1714,1715],{"class":1555},"        proxy_pass http",[1314,1717,1352],{"class":1331},[1314,1719,1720],{"class":1568},"//",[1314,1722,1723],{"class":1555},"blue_servers;  ",[1314,1725,1726],{"class":1320},"# Switch to green_servers for deployment\n",[1314,1728,1730],{"class":1316,"line":1729},30,[1314,1731,1531],{"class":1331},[1314,1733,1735],{"class":1316,"line":1734},31,[1314,1736,1537],{"class":1331},[1038,1738,1740],{"id":1739},"rolling-deployment","Rolling Deployment",[1026,1742,1743],{},"Gradually update servers one by one, maintaining service availability throughout the deployment process.",[1038,1745,1747],{"id":1746},"canary-deployment","Canary Deployment",[1026,1749,1750],{},"Deploy new versions to a small subset of users first, monitoring for issues before full rollout.",[1030,1752,1754],{"id":1753},"server-configuration-patterns","Server Configuration Patterns",[1038,1756,1758],{"id":1757},"multi-server-architecture","Multi-Server Architecture",[1073,1760,1763],{"className":1761,"code":1762,"language":1078},[1076],"Production Environment:\n├── Load Balancer (Nginx)\n├── Web Servers (3x Django + Gunicorn)\n├── Database Server (PostgreSQL with replication)\n├── Cache Server (Redis Cluster)\n├── File Storage (S3 or NFS)\n├── Background Workers (Celery)\n└── Monitoring Stack (Prometheus + Grafana)\n",[1080,1764,1762],{"__ignoreMap":1082},[1038,1766,1768],{"id":1767},"microservices-architecture","Microservices Architecture",[1073,1770,1773],{"className":1771,"code":1772,"language":1078},[1076],"Microservices Deployment:\n├── API Gateway (Kong/Ambassador)\n├── User Service (Django + PostgreSQL)\n├── Order Service (Django + PostgreSQL)\n├── Payment Service (Django + PostgreSQL)\n├── Notification Service (Django + Redis)\n├── File Service (Django + S3)\n└── Shared Services (Auth, Logging, Monitoring)\n",[1080,1774,1772],{"__ignoreMap":1082},[1030,1776,1778],{"id":1777},"container-orchestration","Container Orchestration",[1038,1780,1782],{"id":1781},"docker-swarm-deployment","Docker Swarm Deployment",[1073,1784,1788],{"className":1785,"code":1786,"language":1787,"meta":1082,"style":1082},"language-yaml shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# docker-compose.prod.yml\nversion: '3.8'\nservices:\n  web:\n    image: myapp:latest\n    deploy:\n      replicas: 3\n      update_config:\n        parallelism: 1\n        delay: 10s\n      restart_policy:\n        condition: on-failure\n    environment:\n      - DJANGO_SETTINGS_MODULE=myproject.settings.production\n    networks:\n      - webnet\n    depends_on:\n      - db\n      - redis\n\n  nginx:\n    image: nginx:alpine\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - ./nginx.conf:/etc/nginx/nginx.conf\n      - ./ssl:/etc/ssl\n    deploy:\n      replicas: 2\n    networks:\n      - webnet\n\n  db:\n    image: postgres:13\n    environment:\n      POSTGRES_DB: myapp\n      POSTGRES_USER: myapp\n      POSTGRES_PASSWORD: ${DB_PASSWORD}\n    volumes:\n      - postgres_data:/var/lib/postgresql/data\n    deploy:\n      replicas: 1\n      placement:\n        constraints: [node.role == manager]\n\nnetworks:\n  webnet:\n\nvolumes:\n  postgres_data:\n","yaml",[1080,1789,1790,1795,1811,1819,1826,1836,1843,1853,1860,1870,1880,1887,1897,1904,1912,1919,1926,1933,1940,1947,1951,1958,1967,1974,1987,1998,2005,2012,2019,2025,2034,2040,2047,2052,2060,2070,2077,2088,2098,2109,2116,2124,2131,2140,2148,2164,2169,2177,2185,2190,2198],{"__ignoreMap":1082},[1314,1791,1792],{"class":1316,"line":1317},[1314,1793,1794],{"class":1320},"# docker-compose.prod.yml\n",[1314,1796,1797,1801,1803,1805,1808],{"class":1316,"line":1324},[1314,1798,1800],{"class":1799},"suXOh","version",[1314,1802,1352],{"class":1331},[1314,1804,1383],{"class":1341},[1314,1806,1807],{"class":1345},"3.8",[1314,1809,1810],{"class":1341},"'\n",[1314,1812,1813,1816],{"class":1316,"line":1338},[1314,1814,1815],{"class":1799},"services",[1314,1817,1818],{"class":1331},":\n",[1314,1820,1821,1824],{"class":1316,"line":1357},[1314,1822,1823],{"class":1799},"  web",[1314,1825,1818],{"class":1331},[1314,1827,1828,1831,1833],{"class":1316,"line":1394},[1314,1829,1830],{"class":1799},"    image",[1314,1832,1352],{"class":1331},[1314,1834,1835],{"class":1345}," myapp:latest\n",[1314,1837,1838,1841],{"class":1316,"line":1416},[1314,1839,1840],{"class":1799},"    deploy",[1314,1842,1818],{"class":1331},[1314,1844,1845,1848,1850],{"class":1316,"line":1437},[1314,1846,1847],{"class":1799},"      replicas",[1314,1849,1352],{"class":1331},[1314,1851,1852],{"class":1572}," 3\n",[1314,1854,1855,1858],{"class":1316,"line":1443},[1314,1856,1857],{"class":1799},"      update_config",[1314,1859,1818],{"class":1331},[1314,1861,1862,1865,1867],{"class":1316,"line":1457},[1314,1863,1864],{"class":1799},"        parallelism",[1314,1866,1352],{"class":1331},[1314,1868,1869],{"class":1572}," 1\n",[1314,1871,1872,1875,1877],{"class":1316,"line":1488},[1314,1873,1874],{"class":1799},"        delay",[1314,1876,1352],{"class":1331},[1314,1878,1879],{"class":1345}," 10s\n",[1314,1881,1882,1885],{"class":1316,"line":1508},[1314,1883,1884],{"class":1799},"      restart_policy",[1314,1886,1818],{"class":1331},[1314,1888,1889,1892,1894],{"class":1316,"line":1528},[1314,1890,1891],{"class":1799},"        condition",[1314,1893,1352],{"class":1331},[1314,1895,1896],{"class":1345}," on-failure\n",[1314,1898,1899,1902],{"class":1316,"line":1534},[1314,1900,1901],{"class":1799},"    environment",[1314,1903,1818],{"class":1331},[1314,1905,1906,1909],{"class":1316,"line":1540},[1314,1907,1908],{"class":1331},"      -",[1314,1910,1911],{"class":1345}," DJANGO_SETTINGS_MODULE=myproject.settings.production\n",[1314,1913,1914,1917],{"class":1316,"line":1546},[1314,1915,1916],{"class":1799},"    networks",[1314,1918,1818],{"class":1331},[1314,1920,1921,1923],{"class":1316,"line":1552},[1314,1922,1908],{"class":1331},[1314,1924,1925],{"class":1345}," webnet\n",[1314,1927,1928,1931],{"class":1316,"line":1562},[1314,1929,1930],{"class":1799},"    depends_on",[1314,1932,1818],{"class":1331},[1314,1934,1935,1937],{"class":1316,"line":1594},[1314,1936,1908],{"class":1331},[1314,1938,1939],{"class":1345}," db\n",[1314,1941,1942,1944],{"class":1316,"line":1616},[1314,1943,1908],{"class":1331},[1314,1945,1946],{"class":1345}," redis\n",[1314,1948,1949],{"class":1316,"line":1621},[1314,1950,1543],{"emptyLinePlaceholder":1104},[1314,1952,1953,1956],{"class":1316,"line":1626},[1314,1954,1955],{"class":1799},"  nginx",[1314,1957,1818],{"class":1331},[1314,1959,1960,1962,1964],{"class":1316,"line":1634},[1314,1961,1830],{"class":1799},[1314,1963,1352],{"class":1331},[1314,1965,1966],{"class":1345}," nginx:alpine\n",[1314,1968,1969,1972],{"class":1316,"line":1656},[1314,1970,1971],{"class":1799},"    ports",[1314,1973,1818],{"class":1331},[1314,1975,1976,1978,1981,1984],{"class":1316,"line":1677},[1314,1977,1908],{"class":1331},[1314,1979,1980],{"class":1341}," \"",[1314,1982,1983],{"class":1345},"80:80",[1314,1985,1986],{"class":1341},"\"\n",[1314,1988,1989,1991,1993,1996],{"class":1316,"line":1682},[1314,1990,1908],{"class":1331},[1314,1992,1980],{"class":1341},[1314,1994,1995],{"class":1345},"443:443",[1314,1997,1986],{"class":1341},[1314,1999,2000,2003],{"class":1316,"line":1687},[1314,2001,2002],{"class":1799},"    volumes",[1314,2004,1818],{"class":1331},[1314,2006,2007,2009],{"class":1316,"line":1693},[1314,2008,1908],{"class":1331},[1314,2010,2011],{"class":1345}," ./nginx.conf:/etc/nginx/nginx.conf\n",[1314,2013,2014,2016],{"class":1316,"line":1701},[1314,2015,1908],{"class":1331},[1314,2017,2018],{"class":1345}," ./ssl:/etc/ssl\n",[1314,2020,2021,2023],{"class":1316,"line":1712},[1314,2022,1840],{"class":1799},[1314,2024,1818],{"class":1331},[1314,2026,2027,2029,2031],{"class":1316,"line":1729},[1314,2028,1847],{"class":1799},[1314,2030,1352],{"class":1331},[1314,2032,2033],{"class":1572}," 2\n",[1314,2035,2036,2038],{"class":1316,"line":1734},[1314,2037,1916],{"class":1799},[1314,2039,1818],{"class":1331},[1314,2041,2043,2045],{"class":1316,"line":2042},32,[1314,2044,1908],{"class":1331},[1314,2046,1925],{"class":1345},[1314,2048,2050],{"class":1316,"line":2049},33,[1314,2051,1543],{"emptyLinePlaceholder":1104},[1314,2053,2055,2058],{"class":1316,"line":2054},34,[1314,2056,2057],{"class":1799},"  db",[1314,2059,1818],{"class":1331},[1314,2061,2063,2065,2067],{"class":1316,"line":2062},35,[1314,2064,1830],{"class":1799},[1314,2066,1352],{"class":1331},[1314,2068,2069],{"class":1345}," postgres:13\n",[1314,2071,2073,2075],{"class":1316,"line":2072},36,[1314,2074,1901],{"class":1799},[1314,2076,1818],{"class":1331},[1314,2078,2080,2083,2085],{"class":1316,"line":2079},37,[1314,2081,2082],{"class":1799},"      POSTGRES_DB",[1314,2084,1352],{"class":1331},[1314,2086,2087],{"class":1345}," myapp\n",[1314,2089,2091,2094,2096],{"class":1316,"line":2090},38,[1314,2092,2093],{"class":1799},"      POSTGRES_USER",[1314,2095,1352],{"class":1331},[1314,2097,2087],{"class":1345},[1314,2099,2101,2104,2106],{"class":1316,"line":2100},39,[1314,2102,2103],{"class":1799},"      POSTGRES_PASSWORD",[1314,2105,1352],{"class":1331},[1314,2107,2108],{"class":1345}," ${DB_PASSWORD}\n",[1314,2110,2112,2114],{"class":1316,"line":2111},40,[1314,2113,2002],{"class":1799},[1314,2115,1818],{"class":1331},[1314,2117,2119,2121],{"class":1316,"line":2118},41,[1314,2120,1908],{"class":1331},[1314,2122,2123],{"class":1345}," postgres_data:/var/lib/postgresql/data\n",[1314,2125,2127,2129],{"class":1316,"line":2126},42,[1314,2128,1840],{"class":1799},[1314,2130,1818],{"class":1331},[1314,2132,2134,2136,2138],{"class":1316,"line":2133},43,[1314,2135,1847],{"class":1799},[1314,2137,1352],{"class":1331},[1314,2139,1869],{"class":1572},[1314,2141,2143,2146],{"class":1316,"line":2142},44,[1314,2144,2145],{"class":1799},"      placement",[1314,2147,1818],{"class":1331},[1314,2149,2151,2154,2156,2158,2161],{"class":1316,"line":2150},45,[1314,2152,2153],{"class":1799},"        constraints",[1314,2155,1352],{"class":1331},[1314,2157,1370],{"class":1331},[1314,2159,2160],{"class":1345},"node.role == manager",[1314,2162,2163],{"class":1331},"]\n",[1314,2165,2167],{"class":1316,"line":2166},46,[1314,2168,1543],{"emptyLinePlaceholder":1104},[1314,2170,2172,2175],{"class":1316,"line":2171},47,[1314,2173,2174],{"class":1799},"networks",[1314,2176,1818],{"class":1331},[1314,2178,2180,2183],{"class":1316,"line":2179},48,[1314,2181,2182],{"class":1799},"  webnet",[1314,2184,1818],{"class":1331},[1314,2186,2188],{"class":1316,"line":2187},49,[1314,2189,1543],{"emptyLinePlaceholder":1104},[1314,2191,2193,2196],{"class":1316,"line":2192},50,[1314,2194,2195],{"class":1799},"volumes",[1314,2197,1818],{"class":1331},[1314,2199,2201,2204],{"class":1316,"line":2200},51,[1314,2202,2203],{"class":1799},"  postgres_data",[1314,2205,1818],{"class":1331},[1038,2207,2209],{"id":2208},"kubernetes-deployment","Kubernetes Deployment",[1073,2211,2213],{"className":1785,"code":2212,"language":1787,"meta":1082,"style":1082},"# k8s-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: django-app\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: django-app\n  template:\n    metadata:\n      labels:\n        app: django-app\n    spec:\n      containers:\n      - name: django\n        image: myapp:latest\n        ports:\n        - containerPort: 8000\n        env:\n        - name: DJANGO_SETTINGS_MODULE\n          value: \"myproject.settings.production\"\n        - name: DATABASE_URL\n          valueFrom:\n            secretKeyRef:\n              name: db-secret\n              key: url\n        resources:\n          requests:\n            memory: \"256Mi\"\n            cpu: \"250m\"\n          limits:\n            memory: \"512Mi\"\n            cpu: \"500m\"\n        livenessProbe:\n          httpGet:\n            path: /health/\n            port: 8000\n          initialDelaySeconds: 30\n          periodSeconds: 10\n        readinessProbe:\n          httpGet:\n            path: /ready/\n            port: 8000\n          initialDelaySeconds: 5\n          periodSeconds: 5\n",[1080,2214,2215,2220,2230,2240,2247,2257,2264,2273,2280,2287,2296,2303,2310,2317,2326,2333,2340,2352,2361,2368,2381,2388,2399,2413,2424,2431,2438,2448,2458,2465,2472,2486,2500,2507,2520,2533,2540,2547,2557,2566,2576,2586,2593,2599,2608,2616,2625],{"__ignoreMap":1082},[1314,2216,2217],{"class":1316,"line":1317},[1314,2218,2219],{"class":1320},"# k8s-deployment.yaml\n",[1314,2221,2222,2225,2227],{"class":1316,"line":1324},[1314,2223,2224],{"class":1799},"apiVersion",[1314,2226,1352],{"class":1331},[1314,2228,2229],{"class":1345}," apps/v1\n",[1314,2231,2232,2235,2237],{"class":1316,"line":1338},[1314,2233,2234],{"class":1799},"kind",[1314,2236,1352],{"class":1331},[1314,2238,2239],{"class":1345}," Deployment\n",[1314,2241,2242,2245],{"class":1316,"line":1357},[1314,2243,2244],{"class":1799},"metadata",[1314,2246,1818],{"class":1331},[1314,2248,2249,2252,2254],{"class":1316,"line":1394},[1314,2250,2251],{"class":1799},"  name",[1314,2253,1352],{"class":1331},[1314,2255,2256],{"class":1345}," django-app\n",[1314,2258,2259,2262],{"class":1316,"line":1416},[1314,2260,2261],{"class":1799},"spec",[1314,2263,1818],{"class":1331},[1314,2265,2266,2269,2271],{"class":1316,"line":1437},[1314,2267,2268],{"class":1799},"  replicas",[1314,2270,1352],{"class":1331},[1314,2272,1852],{"class":1572},[1314,2274,2275,2278],{"class":1316,"line":1443},[1314,2276,2277],{"class":1799},"  selector",[1314,2279,1818],{"class":1331},[1314,2281,2282,2285],{"class":1316,"line":1457},[1314,2283,2284],{"class":1799},"    matchLabels",[1314,2286,1818],{"class":1331},[1314,2288,2289,2292,2294],{"class":1316,"line":1488},[1314,2290,2291],{"class":1799},"      app",[1314,2293,1352],{"class":1331},[1314,2295,2256],{"class":1345},[1314,2297,2298,2301],{"class":1316,"line":1508},[1314,2299,2300],{"class":1799},"  template",[1314,2302,1818],{"class":1331},[1314,2304,2305,2308],{"class":1316,"line":1528},[1314,2306,2307],{"class":1799},"    metadata",[1314,2309,1818],{"class":1331},[1314,2311,2312,2315],{"class":1316,"line":1534},[1314,2313,2314],{"class":1799},"      labels",[1314,2316,1818],{"class":1331},[1314,2318,2319,2322,2324],{"class":1316,"line":1540},[1314,2320,2321],{"class":1799},"        app",[1314,2323,1352],{"class":1331},[1314,2325,2256],{"class":1345},[1314,2327,2328,2331],{"class":1316,"line":1546},[1314,2329,2330],{"class":1799},"    spec",[1314,2332,1818],{"class":1331},[1314,2334,2335,2338],{"class":1316,"line":1552},[1314,2336,2337],{"class":1799},"      containers",[1314,2339,1818],{"class":1331},[1314,2341,2342,2344,2347,2349],{"class":1316,"line":1562},[1314,2343,1908],{"class":1331},[1314,2345,2346],{"class":1799}," name",[1314,2348,1352],{"class":1331},[1314,2350,2351],{"class":1345}," django\n",[1314,2353,2354,2357,2359],{"class":1316,"line":1594},[1314,2355,2356],{"class":1799},"        image",[1314,2358,1352],{"class":1331},[1314,2360,1835],{"class":1345},[1314,2362,2363,2366],{"class":1316,"line":1616},[1314,2364,2365],{"class":1799},"        ports",[1314,2367,1818],{"class":1331},[1314,2369,2370,2373,2376,2378],{"class":1316,"line":1621},[1314,2371,2372],{"class":1331},"        -",[1314,2374,2375],{"class":1799}," containerPort",[1314,2377,1352],{"class":1331},[1314,2379,2380],{"class":1572}," 8000\n",[1314,2382,2383,2386],{"class":1316,"line":1626},[1314,2384,2385],{"class":1799},"        env",[1314,2387,1818],{"class":1331},[1314,2389,2390,2392,2394,2396],{"class":1316,"line":1634},[1314,2391,2372],{"class":1331},[1314,2393,2346],{"class":1799},[1314,2395,1352],{"class":1331},[1314,2397,2398],{"class":1345}," DJANGO_SETTINGS_MODULE\n",[1314,2400,2401,2404,2406,2408,2411],{"class":1316,"line":1656},[1314,2402,2403],{"class":1799},"          value",[1314,2405,1352],{"class":1331},[1314,2407,1980],{"class":1341},[1314,2409,2410],{"class":1345},"myproject.settings.production",[1314,2412,1986],{"class":1341},[1314,2414,2415,2417,2419,2421],{"class":1316,"line":1677},[1314,2416,2372],{"class":1331},[1314,2418,2346],{"class":1799},[1314,2420,1352],{"class":1331},[1314,2422,2423],{"class":1345}," DATABASE_URL\n",[1314,2425,2426,2429],{"class":1316,"line":1682},[1314,2427,2428],{"class":1799},"          valueFrom",[1314,2430,1818],{"class":1331},[1314,2432,2433,2436],{"class":1316,"line":1687},[1314,2434,2435],{"class":1799},"            secretKeyRef",[1314,2437,1818],{"class":1331},[1314,2439,2440,2443,2445],{"class":1316,"line":1693},[1314,2441,2442],{"class":1799},"              name",[1314,2444,1352],{"class":1331},[1314,2446,2447],{"class":1345}," db-secret\n",[1314,2449,2450,2453,2455],{"class":1316,"line":1701},[1314,2451,2452],{"class":1799},"              key",[1314,2454,1352],{"class":1331},[1314,2456,2457],{"class":1345}," url\n",[1314,2459,2460,2463],{"class":1316,"line":1712},[1314,2461,2462],{"class":1799},"        resources",[1314,2464,1818],{"class":1331},[1314,2466,2467,2470],{"class":1316,"line":1729},[1314,2468,2469],{"class":1799},"          requests",[1314,2471,1818],{"class":1331},[1314,2473,2474,2477,2479,2481,2484],{"class":1316,"line":1734},[1314,2475,2476],{"class":1799},"            memory",[1314,2478,1352],{"class":1331},[1314,2480,1980],{"class":1341},[1314,2482,2483],{"class":1345},"256Mi",[1314,2485,1986],{"class":1341},[1314,2487,2488,2491,2493,2495,2498],{"class":1316,"line":2042},[1314,2489,2490],{"class":1799},"            cpu",[1314,2492,1352],{"class":1331},[1314,2494,1980],{"class":1341},[1314,2496,2497],{"class":1345},"250m",[1314,2499,1986],{"class":1341},[1314,2501,2502,2505],{"class":1316,"line":2049},[1314,2503,2504],{"class":1799},"          limits",[1314,2506,1818],{"class":1331},[1314,2508,2509,2511,2513,2515,2518],{"class":1316,"line":2054},[1314,2510,2476],{"class":1799},[1314,2512,1352],{"class":1331},[1314,2514,1980],{"class":1341},[1314,2516,2517],{"class":1345},"512Mi",[1314,2519,1986],{"class":1341},[1314,2521,2522,2524,2526,2528,2531],{"class":1316,"line":2062},[1314,2523,2490],{"class":1799},[1314,2525,1352],{"class":1331},[1314,2527,1980],{"class":1341},[1314,2529,2530],{"class":1345},"500m",[1314,2532,1986],{"class":1341},[1314,2534,2535,2538],{"class":1316,"line":2072},[1314,2536,2537],{"class":1799},"        livenessProbe",[1314,2539,1818],{"class":1331},[1314,2541,2542,2545],{"class":1316,"line":2079},[1314,2543,2544],{"class":1799},"          httpGet",[1314,2546,1818],{"class":1331},[1314,2548,2549,2552,2554],{"class":1316,"line":2090},[1314,2550,2551],{"class":1799},"            path",[1314,2553,1352],{"class":1331},[1314,2555,2556],{"class":1345}," /health/\n",[1314,2558,2559,2562,2564],{"class":1316,"line":2100},[1314,2560,2561],{"class":1799},"            port",[1314,2563,1352],{"class":1331},[1314,2565,2380],{"class":1572},[1314,2567,2568,2571,2573],{"class":1316,"line":2111},[1314,2569,2570],{"class":1799},"          initialDelaySeconds",[1314,2572,1352],{"class":1331},[1314,2574,2575],{"class":1572}," 30\n",[1314,2577,2578,2581,2583],{"class":1316,"line":2118},[1314,2579,2580],{"class":1799},"          periodSeconds",[1314,2582,1352],{"class":1331},[1314,2584,2585],{"class":1572}," 10\n",[1314,2587,2588,2591],{"class":1316,"line":2126},[1314,2589,2590],{"class":1799},"        readinessProbe",[1314,2592,1818],{"class":1331},[1314,2594,2595,2597],{"class":1316,"line":2133},[1314,2596,2544],{"class":1799},[1314,2598,1818],{"class":1331},[1314,2600,2601,2603,2605],{"class":1316,"line":2142},[1314,2602,2551],{"class":1799},[1314,2604,1352],{"class":1331},[1314,2606,2607],{"class":1345}," /ready/\n",[1314,2609,2610,2612,2614],{"class":1316,"line":2150},[1314,2611,2561],{"class":1799},[1314,2613,1352],{"class":1331},[1314,2615,2380],{"class":1572},[1314,2617,2618,2620,2622],{"class":1316,"line":2166},[1314,2619,2570],{"class":1799},[1314,2621,1352],{"class":1331},[1314,2623,2624],{"class":1572}," 5\n",[1314,2626,2627,2629,2631],{"class":1316,"line":2171},[1314,2628,2580],{"class":1799},[1314,2630,1352],{"class":1331},[1314,2632,2624],{"class":1572},[1030,2634,2636],{"id":2635},"cloud-platform-integration","Cloud Platform Integration",[1038,2638,2640],{"id":2639},"aws-deployment-architecture","AWS Deployment Architecture",[1073,2642,2644],{"className":1308,"code":2643,"language":1310,"meta":1082,"style":1082},"# AWS-specific production settings\nimport boto3\n\n# S3 Configuration\nAWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')\nAWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')\nAWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')\nAWS_S3_REGION_NAME = os.environ.get('AWS_S3_REGION_NAME', 'us-east-1')\nAWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com'\n\n# Static and Media Files\nSTATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'\nDEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'\nSTATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/static/'\nMEDIA_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/media/'\n\n# RDS Database Configuration\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': os.environ.get('RDS_DB_NAME'),\n        'USER': os.environ.get('RDS_USERNAME'),\n        'PASSWORD': os.environ.get('RDS_PASSWORD'),\n        'HOST': os.environ.get('RDS_HOSTNAME'),\n        'PORT': os.environ.get('RDS_PORT', '5432'),\n        'OPTIONS': {\n            'sslmode': 'require',\n        },\n    }\n}\n\n# ElastiCache Redis Configuration\nCACHES = {\n    'default': {\n        'BACKEND': 'django_redis.cache.RedisCache',\n        'LOCATION': os.environ.get('ELASTICACHE_ENDPOINT'),\n        'OPTIONS': {\n            'CLIENT_CLASS': 'django_redis.client.DefaultClient',\n            'CONNECTION_POOL_KWARGS': {\n                'ssl_cert_reqs': None,\n            },\n        }\n    }\n}\n\n# CloudWatch Logging\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'handlers': {\n        'cloudwatch': {\n            'level': 'INFO',\n            'class': 'watchtower.CloudWatchLogsHandler',\n            'log_group': 'django-app',\n            'stream_name': 'production',\n        },\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['cloudwatch'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n    },\n}\n",[1080,2645,2646,2651,2660,2664,2669,2702,2729,2756,2792,2817,2821,2826,2840,2853,2874,2894,2898,2903,2912,2925,2945,2978,3010,3042,3074,3115,3128,3149,3154,3158,3162,3166,3171,3180,3192,3212,3244,3256,3276,3289,3307,3312,3317,3321,3325,3329,3334,3343,3358,3374,3387,3400,3421,3442,3463,3484,3489,3494,3508,3522,3543,3562,3579,3584,3589],{"__ignoreMap":1082},[1314,2647,2648],{"class":1316,"line":1317},[1314,2649,2650],{"class":1320},"# AWS-specific production settings\n",[1314,2652,2653,2657],{"class":1316,"line":1324},[1314,2654,2656],{"class":2655},"siDh9","import",[1314,2658,2659],{"class":1555}," boto3\n",[1314,2661,2662],{"class":1316,"line":1338},[1314,2663,1543],{"emptyLinePlaceholder":1104},[1314,2665,2666],{"class":1316,"line":1357},[1314,2667,2668],{"class":1320},"# S3 Configuration\n",[1314,2670,2671,2674,2676,2679,2681,2684,2686,2690,2693,2695,2697,2699],{"class":1316,"line":1394},[1314,2672,2673],{"class":1327},"AWS_ACCESS_KEY_ID",[1314,2675,1332],{"class":1331},[1314,2677,2678],{"class":1555}," os",[1314,2680,1579],{"class":1331},[1314,2682,2683],{"class":1582},"environ",[1314,2685,1579],{"class":1331},[1314,2687,2689],{"class":2688},"siWMO","get",[1314,2691,2692],{"class":1331},"(",[1314,2694,1349],{"class":1341},[1314,2696,2673],{"class":1345},[1314,2698,1349],{"class":1341},[1314,2700,2701],{"class":1331},")\n",[1314,2703,2704,2707,2709,2711,2713,2715,2717,2719,2721,2723,2725,2727],{"class":1316,"line":1416},[1314,2705,2706],{"class":1327},"AWS_SECRET_ACCESS_KEY",[1314,2708,1332],{"class":1331},[1314,2710,2678],{"class":1555},[1314,2712,1579],{"class":1331},[1314,2714,2683],{"class":1582},[1314,2716,1579],{"class":1331},[1314,2718,2689],{"class":2688},[1314,2720,2692],{"class":1331},[1314,2722,1349],{"class":1341},[1314,2724,2706],{"class":1345},[1314,2726,1349],{"class":1341},[1314,2728,2701],{"class":1331},[1314,2730,2731,2734,2736,2738,2740,2742,2744,2746,2748,2750,2752,2754],{"class":1316,"line":1437},[1314,2732,2733],{"class":1327},"AWS_STORAGE_BUCKET_NAME",[1314,2735,1332],{"class":1331},[1314,2737,2678],{"class":1555},[1314,2739,1579],{"class":1331},[1314,2741,2683],{"class":1582},[1314,2743,1579],{"class":1331},[1314,2745,2689],{"class":2688},[1314,2747,2692],{"class":1331},[1314,2749,1349],{"class":1341},[1314,2751,2733],{"class":1345},[1314,2753,1349],{"class":1341},[1314,2755,2701],{"class":1331},[1314,2757,2758,2761,2763,2765,2767,2769,2771,2773,2775,2777,2779,2781,2783,2785,2788,2790],{"class":1316,"line":1443},[1314,2759,2760],{"class":1327},"AWS_S3_REGION_NAME",[1314,2762,1332],{"class":1331},[1314,2764,2678],{"class":1555},[1314,2766,1579],{"class":1331},[1314,2768,2683],{"class":1582},[1314,2770,1579],{"class":1331},[1314,2772,2689],{"class":2688},[1314,2774,2692],{"class":1331},[1314,2776,1349],{"class":1341},[1314,2778,2760],{"class":1345},[1314,2780,1349],{"class":1341},[1314,2782,1380],{"class":1331},[1314,2784,1383],{"class":1341},[1314,2786,2787],{"class":1345},"us-east-1",[1314,2789,1349],{"class":1341},[1314,2791,2701],{"class":1331},[1314,2793,2794,2797,2799,2803,2805,2809,2811,2814],{"class":1316,"line":1457},[1314,2795,2796],{"class":1327},"AWS_S3_CUSTOM_DOMAIN",[1314,2798,1332],{"class":1331},[1314,2800,2802],{"class":2801},"s5Kfy"," f",[1314,2804,1349],{"class":1345},[1314,2806,2808],{"class":2807},"s3h35","{",[1314,2810,2733],{"class":1327},[1314,2812,2813],{"class":2807},"}",[1314,2815,2816],{"class":1345},".s3.amazonaws.com'\n",[1314,2818,2819],{"class":1316,"line":1488},[1314,2820,1543],{"emptyLinePlaceholder":1104},[1314,2822,2823],{"class":1316,"line":1508},[1314,2824,2825],{"class":1320},"# Static and Media Files\n",[1314,2827,2828,2831,2833,2835,2838],{"class":1316,"line":1528},[1314,2829,2830],{"class":1327},"STATICFILES_STORAGE",[1314,2832,1332],{"class":1331},[1314,2834,1383],{"class":1341},[1314,2836,2837],{"class":1345},"storages.backends.s3boto3.S3Boto3Storage",[1314,2839,1810],{"class":1341},[1314,2841,2842,2845,2847,2849,2851],{"class":1316,"line":1534},[1314,2843,2844],{"class":1327},"DEFAULT_FILE_STORAGE",[1314,2846,1332],{"class":1331},[1314,2848,1383],{"class":1341},[1314,2850,2837],{"class":1345},[1314,2852,1810],{"class":1341},[1314,2854,2855,2858,2860,2862,2865,2867,2869,2871],{"class":1316,"line":1540},[1314,2856,2857],{"class":1327},"STATIC_URL",[1314,2859,1332],{"class":1331},[1314,2861,2802],{"class":2801},[1314,2863,2864],{"class":1345},"'https://",[1314,2866,2808],{"class":2807},[1314,2868,2796],{"class":1327},[1314,2870,2813],{"class":2807},[1314,2872,2873],{"class":1345},"/static/'\n",[1314,2875,2876,2879,2881,2883,2885,2887,2889,2891],{"class":1316,"line":1546},[1314,2877,2878],{"class":1327},"MEDIA_URL",[1314,2880,1332],{"class":1331},[1314,2882,2802],{"class":2801},[1314,2884,2864],{"class":1345},[1314,2886,2808],{"class":2807},[1314,2888,2796],{"class":1327},[1314,2890,2813],{"class":2807},[1314,2892,2893],{"class":1345},"/media/'\n",[1314,2895,2896],{"class":1316,"line":1552},[1314,2897,1543],{"emptyLinePlaceholder":1104},[1314,2899,2900],{"class":1316,"line":1562},[1314,2901,2902],{"class":1320},"# RDS Database Configuration\n",[1314,2904,2905,2908,2910],{"class":1316,"line":1594},[1314,2906,2907],{"class":1327},"DATABASES",[1314,2909,1332],{"class":1331},[1314,2911,1335],{"class":1331},[1314,2913,2914,2916,2919,2921,2923],{"class":1316,"line":1616},[1314,2915,1342],{"class":1341},[1314,2917,2918],{"class":1345},"default",[1314,2920,1349],{"class":1341},[1314,2922,1352],{"class":1331},[1314,2924,1335],{"class":1331},[1314,2926,2927,2929,2932,2934,2936,2938,2941,2943],{"class":1316,"line":1621},[1314,2928,1360],{"class":1341},[1314,2930,2931],{"class":1345},"ENGINE",[1314,2933,1349],{"class":1341},[1314,2935,1352],{"class":1331},[1314,2937,1383],{"class":1341},[1314,2939,2940],{"class":1345},"django.db.backends.postgresql",[1314,2942,1349],{"class":1341},[1314,2944,1413],{"class":1331},[1314,2946,2947,2949,2952,2954,2956,2958,2960,2962,2964,2966,2968,2970,2973,2975],{"class":1316,"line":1626},[1314,2948,1360],{"class":1341},[1314,2950,2951],{"class":1345},"NAME",[1314,2953,1349],{"class":1341},[1314,2955,1352],{"class":1331},[1314,2957,2678],{"class":1555},[1314,2959,1579],{"class":1331},[1314,2961,2683],{"class":1582},[1314,2963,1579],{"class":1331},[1314,2965,2689],{"class":2688},[1314,2967,2692],{"class":1331},[1314,2969,1349],{"class":1341},[1314,2971,2972],{"class":1345},"RDS_DB_NAME",[1314,2974,1349],{"class":1341},[1314,2976,2977],{"class":1331},"),\n",[1314,2979,2980,2982,2985,2987,2989,2991,2993,2995,2997,2999,3001,3003,3006,3008],{"class":1316,"line":1634},[1314,2981,1360],{"class":1341},[1314,2983,2984],{"class":1345},"USER",[1314,2986,1349],{"class":1341},[1314,2988,1352],{"class":1331},[1314,2990,2678],{"class":1555},[1314,2992,1579],{"class":1331},[1314,2994,2683],{"class":1582},[1314,2996,1579],{"class":1331},[1314,2998,2689],{"class":2688},[1314,3000,2692],{"class":1331},[1314,3002,1349],{"class":1341},[1314,3004,3005],{"class":1345},"RDS_USERNAME",[1314,3007,1349],{"class":1341},[1314,3009,2977],{"class":1331},[1314,3011,3012,3014,3017,3019,3021,3023,3025,3027,3029,3031,3033,3035,3038,3040],{"class":1316,"line":1656},[1314,3013,1360],{"class":1341},[1314,3015,3016],{"class":1345},"PASSWORD",[1314,3018,1349],{"class":1341},[1314,3020,1352],{"class":1331},[1314,3022,2678],{"class":1555},[1314,3024,1579],{"class":1331},[1314,3026,2683],{"class":1582},[1314,3028,1579],{"class":1331},[1314,3030,2689],{"class":2688},[1314,3032,2692],{"class":1331},[1314,3034,1349],{"class":1341},[1314,3036,3037],{"class":1345},"RDS_PASSWORD",[1314,3039,1349],{"class":1341},[1314,3041,2977],{"class":1331},[1314,3043,3044,3046,3049,3051,3053,3055,3057,3059,3061,3063,3065,3067,3070,3072],{"class":1316,"line":1677},[1314,3045,1360],{"class":1341},[1314,3047,3048],{"class":1345},"HOST",[1314,3050,1349],{"class":1341},[1314,3052,1352],{"class":1331},[1314,3054,2678],{"class":1555},[1314,3056,1579],{"class":1331},[1314,3058,2683],{"class":1582},[1314,3060,1579],{"class":1331},[1314,3062,2689],{"class":2688},[1314,3064,2692],{"class":1331},[1314,3066,1349],{"class":1341},[1314,3068,3069],{"class":1345},"RDS_HOSTNAME",[1314,3071,1349],{"class":1341},[1314,3073,2977],{"class":1331},[1314,3075,3076,3078,3081,3083,3085,3087,3089,3091,3093,3095,3097,3099,3102,3104,3106,3108,3111,3113],{"class":1316,"line":1682},[1314,3077,1360],{"class":1341},[1314,3079,3080],{"class":1345},"PORT",[1314,3082,1349],{"class":1341},[1314,3084,1352],{"class":1331},[1314,3086,2678],{"class":1555},[1314,3088,1579],{"class":1331},[1314,3090,2683],{"class":1582},[1314,3092,1579],{"class":1331},[1314,3094,2689],{"class":2688},[1314,3096,2692],{"class":1331},[1314,3098,1349],{"class":1341},[1314,3100,3101],{"class":1345},"RDS_PORT",[1314,3103,1349],{"class":1341},[1314,3105,1380],{"class":1331},[1314,3107,1383],{"class":1341},[1314,3109,3110],{"class":1345},"5432",[1314,3112,1349],{"class":1341},[1314,3114,2977],{"class":1331},[1314,3116,3117,3119,3122,3124,3126],{"class":1316,"line":1687},[1314,3118,1360],{"class":1341},[1314,3120,3121],{"class":1345},"OPTIONS",[1314,3123,1349],{"class":1341},[1314,3125,1352],{"class":1331},[1314,3127,1335],{"class":1331},[1314,3129,3130,3133,3136,3138,3140,3142,3145,3147],{"class":1316,"line":1693},[1314,3131,3132],{"class":1341},"            '",[1314,3134,3135],{"class":1345},"sslmode",[1314,3137,1349],{"class":1341},[1314,3139,1352],{"class":1331},[1314,3141,1383],{"class":1341},[1314,3143,3144],{"class":1345},"require",[1314,3146,1349],{"class":1341},[1314,3148,1413],{"class":1331},[1314,3150,3151],{"class":1316,"line":1701},[1314,3152,3153],{"class":1331},"        },\n",[1314,3155,3156],{"class":1316,"line":1712},[1314,3157,1531],{"class":1331},[1314,3159,3160],{"class":1316,"line":1729},[1314,3161,1537],{"class":1331},[1314,3163,3164],{"class":1316,"line":1734},[1314,3165,1543],{"emptyLinePlaceholder":1104},[1314,3167,3168],{"class":1316,"line":2042},[1314,3169,3170],{"class":1320},"# ElastiCache Redis Configuration\n",[1314,3172,3173,3176,3178],{"class":1316,"line":2049},[1314,3174,3175],{"class":1327},"CACHES",[1314,3177,1332],{"class":1331},[1314,3179,1335],{"class":1331},[1314,3181,3182,3184,3186,3188,3190],{"class":1316,"line":2054},[1314,3183,1342],{"class":1341},[1314,3185,2918],{"class":1345},[1314,3187,1349],{"class":1341},[1314,3189,1352],{"class":1331},[1314,3191,1335],{"class":1331},[1314,3193,3194,3196,3199,3201,3203,3205,3208,3210],{"class":1316,"line":2062},[1314,3195,1360],{"class":1341},[1314,3197,3198],{"class":1345},"BACKEND",[1314,3200,1349],{"class":1341},[1314,3202,1352],{"class":1331},[1314,3204,1383],{"class":1341},[1314,3206,3207],{"class":1345},"django_redis.cache.RedisCache",[1314,3209,1349],{"class":1341},[1314,3211,1413],{"class":1331},[1314,3213,3214,3216,3219,3221,3223,3225,3227,3229,3231,3233,3235,3237,3240,3242],{"class":1316,"line":2072},[1314,3215,1360],{"class":1341},[1314,3217,3218],{"class":1345},"LOCATION",[1314,3220,1349],{"class":1341},[1314,3222,1352],{"class":1331},[1314,3224,2678],{"class":1555},[1314,3226,1579],{"class":1331},[1314,3228,2683],{"class":1582},[1314,3230,1579],{"class":1331},[1314,3232,2689],{"class":2688},[1314,3234,2692],{"class":1331},[1314,3236,1349],{"class":1341},[1314,3238,3239],{"class":1345},"ELASTICACHE_ENDPOINT",[1314,3241,1349],{"class":1341},[1314,3243,2977],{"class":1331},[1314,3245,3246,3248,3250,3252,3254],{"class":1316,"line":2079},[1314,3247,1360],{"class":1341},[1314,3249,3121],{"class":1345},[1314,3251,1349],{"class":1341},[1314,3253,1352],{"class":1331},[1314,3255,1335],{"class":1331},[1314,3257,3258,3260,3263,3265,3267,3269,3272,3274],{"class":1316,"line":2090},[1314,3259,3132],{"class":1341},[1314,3261,3262],{"class":1345},"CLIENT_CLASS",[1314,3264,1349],{"class":1341},[1314,3266,1352],{"class":1331},[1314,3268,1383],{"class":1341},[1314,3270,3271],{"class":1345},"django_redis.client.DefaultClient",[1314,3273,1349],{"class":1341},[1314,3275,1413],{"class":1331},[1314,3277,3278,3280,3283,3285,3287],{"class":1316,"line":2100},[1314,3279,3132],{"class":1341},[1314,3281,3282],{"class":1345},"CONNECTION_POOL_KWARGS",[1314,3284,1349],{"class":1341},[1314,3286,1352],{"class":1331},[1314,3288,1335],{"class":1331},[1314,3290,3291,3294,3297,3299,3301,3305],{"class":1316,"line":2111},[1314,3292,3293],{"class":1341},"                '",[1314,3295,3296],{"class":1345},"ssl_cert_reqs",[1314,3298,1349],{"class":1341},[1314,3300,1352],{"class":1331},[1314,3302,3304],{"class":3303},"s8XtY"," None",[1314,3306,1413],{"class":1331},[1314,3308,3309],{"class":1316,"line":2118},[1314,3310,3311],{"class":1331},"            },\n",[1314,3313,3314],{"class":1316,"line":2126},[1314,3315,3316],{"class":1331},"        }\n",[1314,3318,3319],{"class":1316,"line":2133},[1314,3320,1531],{"class":1331},[1314,3322,3323],{"class":1316,"line":2142},[1314,3324,1537],{"class":1331},[1314,3326,3327],{"class":1316,"line":2150},[1314,3328,1543],{"emptyLinePlaceholder":1104},[1314,3330,3331],{"class":1316,"line":2166},[1314,3332,3333],{"class":1320},"# CloudWatch Logging\n",[1314,3335,3336,3339,3341],{"class":1316,"line":2171},[1314,3337,3338],{"class":1327},"LOGGING",[1314,3340,1332],{"class":1331},[1314,3342,1335],{"class":1331},[1314,3344,3345,3347,3349,3351,3353,3356],{"class":1316,"line":2179},[1314,3346,1342],{"class":1341},[1314,3348,1800],{"class":1345},[1314,3350,1349],{"class":1341},[1314,3352,1352],{"class":1331},[1314,3354,3355],{"class":1572}," 1",[1314,3357,1413],{"class":1331},[1314,3359,3360,3362,3365,3367,3369,3372],{"class":1316,"line":2187},[1314,3361,1342],{"class":1341},[1314,3363,3364],{"class":1345},"disable_existing_loggers",[1314,3366,1349],{"class":1341},[1314,3368,1352],{"class":1331},[1314,3370,3371],{"class":3303}," False",[1314,3373,1413],{"class":1331},[1314,3375,3376,3378,3381,3383,3385],{"class":1316,"line":2192},[1314,3377,1342],{"class":1341},[1314,3379,3380],{"class":1345},"handlers",[1314,3382,1349],{"class":1341},[1314,3384,1352],{"class":1331},[1314,3386,1335],{"class":1331},[1314,3388,3389,3391,3394,3396,3398],{"class":1316,"line":2200},[1314,3390,1360],{"class":1341},[1314,3392,3393],{"class":1345},"cloudwatch",[1314,3395,1349],{"class":1341},[1314,3397,1352],{"class":1331},[1314,3399,1335],{"class":1331},[1314,3401,3403,3405,3408,3410,3412,3414,3417,3419],{"class":1316,"line":3402},52,[1314,3404,3132],{"class":1341},[1314,3406,3407],{"class":1345},"level",[1314,3409,1349],{"class":1341},[1314,3411,1352],{"class":1331},[1314,3413,1383],{"class":1341},[1314,3415,3416],{"class":1345},"INFO",[1314,3418,1349],{"class":1341},[1314,3420,1413],{"class":1331},[1314,3422,3424,3426,3429,3431,3433,3435,3438,3440],{"class":1316,"line":3423},53,[1314,3425,3132],{"class":1341},[1314,3427,3428],{"class":1345},"class",[1314,3430,1349],{"class":1341},[1314,3432,1352],{"class":1331},[1314,3434,1383],{"class":1341},[1314,3436,3437],{"class":1345},"watchtower.CloudWatchLogsHandler",[1314,3439,1349],{"class":1341},[1314,3441,1413],{"class":1331},[1314,3443,3445,3447,3450,3452,3454,3456,3459,3461],{"class":1316,"line":3444},54,[1314,3446,3132],{"class":1341},[1314,3448,3449],{"class":1345},"log_group",[1314,3451,1349],{"class":1341},[1314,3453,1352],{"class":1331},[1314,3455,1383],{"class":1341},[1314,3457,3458],{"class":1345},"django-app",[1314,3460,1349],{"class":1341},[1314,3462,1413],{"class":1331},[1314,3464,3466,3468,3471,3473,3475,3477,3480,3482],{"class":1316,"line":3465},55,[1314,3467,3132],{"class":1341},[1314,3469,3470],{"class":1345},"stream_name",[1314,3472,1349],{"class":1341},[1314,3474,1352],{"class":1331},[1314,3476,1383],{"class":1341},[1314,3478,3479],{"class":1345},"production",[1314,3481,1349],{"class":1341},[1314,3483,1413],{"class":1331},[1314,3485,3487],{"class":1316,"line":3486},56,[1314,3488,3153],{"class":1331},[1314,3490,3492],{"class":1316,"line":3491},57,[1314,3493,1440],{"class":1331},[1314,3495,3497,3499,3502,3504,3506],{"class":1316,"line":3496},58,[1314,3498,1342],{"class":1341},[1314,3500,3501],{"class":1345},"loggers",[1314,3503,1349],{"class":1341},[1314,3505,1352],{"class":1331},[1314,3507,1335],{"class":1331},[1314,3509,3511,3513,3516,3518,3520],{"class":1316,"line":3510},59,[1314,3512,1360],{"class":1341},[1314,3514,3515],{"class":1345},"django",[1314,3517,1349],{"class":1341},[1314,3519,1352],{"class":1331},[1314,3521,1335],{"class":1331},[1314,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541],{"class":1316,"line":3524},60,[1314,3526,3132],{"class":1341},[1314,3528,3380],{"class":1345},[1314,3530,1349],{"class":1341},[1314,3532,1352],{"class":1331},[1314,3534,1370],{"class":1331},[1314,3536,1349],{"class":1341},[1314,3538,3393],{"class":1345},[1314,3540,1349],{"class":1341},[1314,3542,1391],{"class":1331},[1314,3544,3546,3548,3550,3552,3554,3556,3558,3560],{"class":1316,"line":3545},61,[1314,3547,3132],{"class":1341},[1314,3549,3407],{"class":1345},[1314,3551,1349],{"class":1341},[1314,3553,1352],{"class":1331},[1314,3555,1383],{"class":1341},[1314,3557,3416],{"class":1345},[1314,3559,1349],{"class":1341},[1314,3561,1413],{"class":1331},[1314,3563,3565,3567,3570,3572,3574,3577],{"class":1316,"line":3564},62,[1314,3566,3132],{"class":1341},[1314,3568,3569],{"class":1345},"propagate",[1314,3571,1349],{"class":1341},[1314,3573,1352],{"class":1331},[1314,3575,3576],{"class":3303}," True",[1314,3578,1413],{"class":1331},[1314,3580,3582],{"class":1316,"line":3581},63,[1314,3583,3153],{"class":1331},[1314,3585,3587],{"class":1316,"line":3586},64,[1314,3588,1440],{"class":1331},[1314,3590,3592],{"class":1316,"line":3591},65,[1314,3593,1537],{"class":1331},[1038,3595,3597],{"id":3596},"google-cloud-platform-integration","Google Cloud Platform Integration",[1073,3599,3601],{"className":1308,"code":3600,"language":1310,"meta":1082,"style":1082},"# GCP-specific production settings\nfrom google.cloud import storage\n\n# Google Cloud Storage\nGS_BUCKET_NAME = os.environ.get('GS_BUCKET_NAME')\nGS_PROJECT_ID = os.environ.get('GS_PROJECT_ID')\nGS_CREDENTIALS = os.environ.get('GOOGLE_APPLICATION_CREDENTIALS')\n\nSTATICFILES_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage'\nDEFAULT_FILE_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage'\nGS_DEFAULT_ACL = 'publicRead'\n\n# Cloud SQL Configuration\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': os.environ.get('CLOUD_SQL_DATABASE_NAME'),\n        'USER': os.environ.get('CLOUD_SQL_USERNAME'),\n        'PASSWORD': os.environ.get('CLOUD_SQL_PASSWORD'),\n        'HOST': f'/cloudsql/{os.environ.get(\"CLOUD_SQL_CONNECTION_NAME\")}',\n        'PORT': '',\n    }\n}\n\n# Memorystore Redis\nCACHES = {\n    'default': {\n        'BACKEND': 'django_redis.cache.RedisCache',\n        'LOCATION': f'redis://{os.environ.get(\"MEMORYSTORE_IP\")}:6379/1',\n        'OPTIONS': {\n            'CLIENT_CLASS': 'django_redis.client.DefaultClient',\n        }\n    }\n}\n",[1080,3602,3603,3608,3626,3630,3635,3662,3689,3717,3721,3734,3746,3760,3764,3769,3777,3789,3807,3838,3869,3900,3947,3962,3966,3970,3974,3979,3987,3999,4017,4062,4074,4092,4096,4100],{"__ignoreMap":1082},[1314,3604,3605],{"class":1316,"line":1317},[1314,3606,3607],{"class":1320},"# GCP-specific production settings\n",[1314,3609,3610,3613,3616,3618,3621,3623],{"class":1316,"line":1324},[1314,3611,3612],{"class":2655},"from",[1314,3614,3615],{"class":1555}," google",[1314,3617,1579],{"class":1331},[1314,3619,3620],{"class":1555},"cloud ",[1314,3622,2656],{"class":2655},[1314,3624,3625],{"class":1555}," storage\n",[1314,3627,3628],{"class":1316,"line":1338},[1314,3629,1543],{"emptyLinePlaceholder":1104},[1314,3631,3632],{"class":1316,"line":1357},[1314,3633,3634],{"class":1320},"# Google Cloud Storage\n",[1314,3636,3637,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660],{"class":1316,"line":1394},[1314,3638,3639],{"class":1327},"GS_BUCKET_NAME",[1314,3641,1332],{"class":1331},[1314,3643,2678],{"class":1555},[1314,3645,1579],{"class":1331},[1314,3647,2683],{"class":1582},[1314,3649,1579],{"class":1331},[1314,3651,2689],{"class":2688},[1314,3653,2692],{"class":1331},[1314,3655,1349],{"class":1341},[1314,3657,3639],{"class":1345},[1314,3659,1349],{"class":1341},[1314,3661,2701],{"class":1331},[1314,3663,3664,3667,3669,3671,3673,3675,3677,3679,3681,3683,3685,3687],{"class":1316,"line":1416},[1314,3665,3666],{"class":1327},"GS_PROJECT_ID",[1314,3668,1332],{"class":1331},[1314,3670,2678],{"class":1555},[1314,3672,1579],{"class":1331},[1314,3674,2683],{"class":1582},[1314,3676,1579],{"class":1331},[1314,3678,2689],{"class":2688},[1314,3680,2692],{"class":1331},[1314,3682,1349],{"class":1341},[1314,3684,3666],{"class":1345},[1314,3686,1349],{"class":1341},[1314,3688,2701],{"class":1331},[1314,3690,3691,3694,3696,3698,3700,3702,3704,3706,3708,3710,3713,3715],{"class":1316,"line":1437},[1314,3692,3693],{"class":1327},"GS_CREDENTIALS",[1314,3695,1332],{"class":1331},[1314,3697,2678],{"class":1555},[1314,3699,1579],{"class":1331},[1314,3701,2683],{"class":1582},[1314,3703,1579],{"class":1331},[1314,3705,2689],{"class":2688},[1314,3707,2692],{"class":1331},[1314,3709,1349],{"class":1341},[1314,3711,3712],{"class":1345},"GOOGLE_APPLICATION_CREDENTIALS",[1314,3714,1349],{"class":1341},[1314,3716,2701],{"class":1331},[1314,3718,3719],{"class":1316,"line":1443},[1314,3720,1543],{"emptyLinePlaceholder":1104},[1314,3722,3723,3725,3727,3729,3732],{"class":1316,"line":1457},[1314,3724,2830],{"class":1327},[1314,3726,1332],{"class":1331},[1314,3728,1383],{"class":1341},[1314,3730,3731],{"class":1345},"storages.backends.gcloud.GoogleCloudStorage",[1314,3733,1810],{"class":1341},[1314,3735,3736,3738,3740,3742,3744],{"class":1316,"line":1488},[1314,3737,2844],{"class":1327},[1314,3739,1332],{"class":1331},[1314,3741,1383],{"class":1341},[1314,3743,3731],{"class":1345},[1314,3745,1810],{"class":1341},[1314,3747,3748,3751,3753,3755,3758],{"class":1316,"line":1508},[1314,3749,3750],{"class":1327},"GS_DEFAULT_ACL",[1314,3752,1332],{"class":1331},[1314,3754,1383],{"class":1341},[1314,3756,3757],{"class":1345},"publicRead",[1314,3759,1810],{"class":1341},[1314,3761,3762],{"class":1316,"line":1528},[1314,3763,1543],{"emptyLinePlaceholder":1104},[1314,3765,3766],{"class":1316,"line":1534},[1314,3767,3768],{"class":1320},"# Cloud SQL Configuration\n",[1314,3770,3771,3773,3775],{"class":1316,"line":1540},[1314,3772,2907],{"class":1327},[1314,3774,1332],{"class":1331},[1314,3776,1335],{"class":1331},[1314,3778,3779,3781,3783,3785,3787],{"class":1316,"line":1546},[1314,3780,1342],{"class":1341},[1314,3782,2918],{"class":1345},[1314,3784,1349],{"class":1341},[1314,3786,1352],{"class":1331},[1314,3788,1335],{"class":1331},[1314,3790,3791,3793,3795,3797,3799,3801,3803,3805],{"class":1316,"line":1552},[1314,3792,1360],{"class":1341},[1314,3794,2931],{"class":1345},[1314,3796,1349],{"class":1341},[1314,3798,1352],{"class":1331},[1314,3800,1383],{"class":1341},[1314,3802,2940],{"class":1345},[1314,3804,1349],{"class":1341},[1314,3806,1413],{"class":1331},[1314,3808,3809,3811,3813,3815,3817,3819,3821,3823,3825,3827,3829,3831,3834,3836],{"class":1316,"line":1562},[1314,3810,1360],{"class":1341},[1314,3812,2951],{"class":1345},[1314,3814,1349],{"class":1341},[1314,3816,1352],{"class":1331},[1314,3818,2678],{"class":1555},[1314,3820,1579],{"class":1331},[1314,3822,2683],{"class":1582},[1314,3824,1579],{"class":1331},[1314,3826,2689],{"class":2688},[1314,3828,2692],{"class":1331},[1314,3830,1349],{"class":1341},[1314,3832,3833],{"class":1345},"CLOUD_SQL_DATABASE_NAME",[1314,3835,1349],{"class":1341},[1314,3837,2977],{"class":1331},[1314,3839,3840,3842,3844,3846,3848,3850,3852,3854,3856,3858,3860,3862,3865,3867],{"class":1316,"line":1594},[1314,3841,1360],{"class":1341},[1314,3843,2984],{"class":1345},[1314,3845,1349],{"class":1341},[1314,3847,1352],{"class":1331},[1314,3849,2678],{"class":1555},[1314,3851,1579],{"class":1331},[1314,3853,2683],{"class":1582},[1314,3855,1579],{"class":1331},[1314,3857,2689],{"class":2688},[1314,3859,2692],{"class":1331},[1314,3861,1349],{"class":1341},[1314,3863,3864],{"class":1345},"CLOUD_SQL_USERNAME",[1314,3866,1349],{"class":1341},[1314,3868,2977],{"class":1331},[1314,3870,3871,3873,3875,3877,3879,3881,3883,3885,3887,3889,3891,3893,3896,3898],{"class":1316,"line":1616},[1314,3872,1360],{"class":1341},[1314,3874,3016],{"class":1345},[1314,3876,1349],{"class":1341},[1314,3878,1352],{"class":1331},[1314,3880,2678],{"class":1555},[1314,3882,1579],{"class":1331},[1314,3884,2683],{"class":1582},[1314,3886,1579],{"class":1331},[1314,3888,2689],{"class":2688},[1314,3890,2692],{"class":1331},[1314,3892,1349],{"class":1341},[1314,3894,3895],{"class":1345},"CLOUD_SQL_PASSWORD",[1314,3897,1349],{"class":1341},[1314,3899,2977],{"class":1331},[1314,3901,3902,3904,3906,3908,3910,3912,3915,3917,3920,3922,3924,3926,3928,3930,3933,3936,3938,3941,3943,3945],{"class":1316,"line":1621},[1314,3903,1360],{"class":1341},[1314,3905,3048],{"class":1345},[1314,3907,1349],{"class":1341},[1314,3909,1352],{"class":1331},[1314,3911,2802],{"class":2801},[1314,3913,3914],{"class":1345},"'/cloudsql/",[1314,3916,2808],{"class":2807},[1314,3918,3919],{"class":1555},"os",[1314,3921,1579],{"class":1331},[1314,3923,2683],{"class":1582},[1314,3925,1579],{"class":1331},[1314,3927,2689],{"class":2688},[1314,3929,2692],{"class":1331},[1314,3931,3932],{"class":1341},"\"",[1314,3934,3935],{"class":1345},"CLOUD_SQL_CONNECTION_NAME",[1314,3937,3932],{"class":1341},[1314,3939,3940],{"class":1331},")",[1314,3942,2813],{"class":2807},[1314,3944,1349],{"class":1345},[1314,3946,1413],{"class":1331},[1314,3948,3949,3951,3953,3955,3957,3960],{"class":1316,"line":1626},[1314,3950,1360],{"class":1341},[1314,3952,3080],{"class":1345},[1314,3954,1349],{"class":1341},[1314,3956,1352],{"class":1331},[1314,3958,3959],{"class":1341}," ''",[1314,3961,1413],{"class":1331},[1314,3963,3964],{"class":1316,"line":1634},[1314,3965,1531],{"class":1331},[1314,3967,3968],{"class":1316,"line":1656},[1314,3969,1537],{"class":1331},[1314,3971,3972],{"class":1316,"line":1677},[1314,3973,1543],{"emptyLinePlaceholder":1104},[1314,3975,3976],{"class":1316,"line":1682},[1314,3977,3978],{"class":1320},"# Memorystore Redis\n",[1314,3980,3981,3983,3985],{"class":1316,"line":1687},[1314,3982,3175],{"class":1327},[1314,3984,1332],{"class":1331},[1314,3986,1335],{"class":1331},[1314,3988,3989,3991,3993,3995,3997],{"class":1316,"line":1693},[1314,3990,1342],{"class":1341},[1314,3992,2918],{"class":1345},[1314,3994,1349],{"class":1341},[1314,3996,1352],{"class":1331},[1314,3998,1335],{"class":1331},[1314,4000,4001,4003,4005,4007,4009,4011,4013,4015],{"class":1316,"line":1701},[1314,4002,1360],{"class":1341},[1314,4004,3198],{"class":1345},[1314,4006,1349],{"class":1341},[1314,4008,1352],{"class":1331},[1314,4010,1383],{"class":1341},[1314,4012,3207],{"class":1345},[1314,4014,1349],{"class":1341},[1314,4016,1413],{"class":1331},[1314,4018,4019,4021,4023,4025,4027,4029,4032,4034,4036,4038,4040,4042,4044,4046,4048,4051,4053,4055,4057,4060],{"class":1316,"line":1712},[1314,4020,1360],{"class":1341},[1314,4022,3218],{"class":1345},[1314,4024,1349],{"class":1341},[1314,4026,1352],{"class":1331},[1314,4028,2802],{"class":2801},[1314,4030,4031],{"class":1345},"'redis://",[1314,4033,2808],{"class":2807},[1314,4035,3919],{"class":1555},[1314,4037,1579],{"class":1331},[1314,4039,2683],{"class":1582},[1314,4041,1579],{"class":1331},[1314,4043,2689],{"class":2688},[1314,4045,2692],{"class":1331},[1314,4047,3932],{"class":1341},[1314,4049,4050],{"class":1345},"MEMORYSTORE_IP",[1314,4052,3932],{"class":1341},[1314,4054,3940],{"class":1331},[1314,4056,2813],{"class":2807},[1314,4058,4059],{"class":1345},":6379/1'",[1314,4061,1413],{"class":1331},[1314,4063,4064,4066,4068,4070,4072],{"class":1316,"line":1729},[1314,4065,1360],{"class":1341},[1314,4067,3121],{"class":1345},[1314,4069,1349],{"class":1341},[1314,4071,1352],{"class":1331},[1314,4073,1335],{"class":1331},[1314,4075,4076,4078,4080,4082,4084,4086,4088,4090],{"class":1316,"line":1734},[1314,4077,3132],{"class":1341},[1314,4079,3262],{"class":1345},[1314,4081,1349],{"class":1341},[1314,4083,1352],{"class":1331},[1314,4085,1383],{"class":1341},[1314,4087,3271],{"class":1345},[1314,4089,1349],{"class":1341},[1314,4091,1413],{"class":1331},[1314,4093,4094],{"class":1316,"line":2042},[1314,4095,3316],{"class":1331},[1314,4097,4098],{"class":1316,"line":2049},[1314,4099,1531],{"class":1331},[1314,4101,4102],{"class":1316,"line":2054},[1314,4103,1537],{"class":1331},[1030,4105,1152],{"id":4106},"performance-optimization-1",[1038,4108,320],{"id":4109},"database-optimization",[1073,4111,4113],{"className":1308,"code":4112,"language":1310,"meta":1082,"style":1082},"# Production database settings\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'OPTIONS': {\n            'MAX_CONNS': 20,\n            'MIN_CONNS': 5,\n            'CONN_MAX_AGE': 600,\n            'CONN_HEALTH_CHECKS': True,\n            'OPTIONS': {\n                'sslmode': 'require',\n                'application_name': 'django-app',\n            },\n        },\n    }\n}\n\n# Connection pooling with pgbouncer\nDATABASE_POOL_ARGS = {\n    'max_overflow': 10,\n    'pool_pre_ping': True,\n    'pool_recycle': 300,\n}\n",[1080,4114,4115,4120,4128,4140,4158,4170,4186,4202,4218,4233,4245,4263,4282,4286,4290,4294,4298,4302,4307,4316,4332,4347,4363],{"__ignoreMap":1082},[1314,4116,4117],{"class":1316,"line":1317},[1314,4118,4119],{"class":1320},"# Production database settings\n",[1314,4121,4122,4124,4126],{"class":1316,"line":1324},[1314,4123,2907],{"class":1327},[1314,4125,1332],{"class":1331},[1314,4127,1335],{"class":1331},[1314,4129,4130,4132,4134,4136,4138],{"class":1316,"line":1338},[1314,4131,1342],{"class":1341},[1314,4133,2918],{"class":1345},[1314,4135,1349],{"class":1341},[1314,4137,1352],{"class":1331},[1314,4139,1335],{"class":1331},[1314,4141,4142,4144,4146,4148,4150,4152,4154,4156],{"class":1316,"line":1357},[1314,4143,1360],{"class":1341},[1314,4145,2931],{"class":1345},[1314,4147,1349],{"class":1341},[1314,4149,1352],{"class":1331},[1314,4151,1383],{"class":1341},[1314,4153,2940],{"class":1345},[1314,4155,1349],{"class":1341},[1314,4157,1413],{"class":1331},[1314,4159,4160,4162,4164,4166,4168],{"class":1316,"line":1394},[1314,4161,1360],{"class":1341},[1314,4163,3121],{"class":1345},[1314,4165,1349],{"class":1341},[1314,4167,1352],{"class":1331},[1314,4169,1335],{"class":1331},[1314,4171,4172,4174,4177,4179,4181,4184],{"class":1316,"line":1416},[1314,4173,3132],{"class":1341},[1314,4175,4176],{"class":1345},"MAX_CONNS",[1314,4178,1349],{"class":1341},[1314,4180,1352],{"class":1331},[1314,4182,4183],{"class":1572}," 20",[1314,4185,1413],{"class":1331},[1314,4187,4188,4190,4193,4195,4197,4200],{"class":1316,"line":1437},[1314,4189,3132],{"class":1341},[1314,4191,4192],{"class":1345},"MIN_CONNS",[1314,4194,1349],{"class":1341},[1314,4196,1352],{"class":1331},[1314,4198,4199],{"class":1572}," 5",[1314,4201,1413],{"class":1331},[1314,4203,4204,4206,4209,4211,4213,4216],{"class":1316,"line":1443},[1314,4205,3132],{"class":1341},[1314,4207,4208],{"class":1345},"CONN_MAX_AGE",[1314,4210,1349],{"class":1341},[1314,4212,1352],{"class":1331},[1314,4214,4215],{"class":1572}," 600",[1314,4217,1413],{"class":1331},[1314,4219,4220,4222,4225,4227,4229,4231],{"class":1316,"line":1457},[1314,4221,3132],{"class":1341},[1314,4223,4224],{"class":1345},"CONN_HEALTH_CHECKS",[1314,4226,1349],{"class":1341},[1314,4228,1352],{"class":1331},[1314,4230,3576],{"class":3303},[1314,4232,1413],{"class":1331},[1314,4234,4235,4237,4239,4241,4243],{"class":1316,"line":1488},[1314,4236,3132],{"class":1341},[1314,4238,3121],{"class":1345},[1314,4240,1349],{"class":1341},[1314,4242,1352],{"class":1331},[1314,4244,1335],{"class":1331},[1314,4246,4247,4249,4251,4253,4255,4257,4259,4261],{"class":1316,"line":1508},[1314,4248,3293],{"class":1341},[1314,4250,3135],{"class":1345},[1314,4252,1349],{"class":1341},[1314,4254,1352],{"class":1331},[1314,4256,1383],{"class":1341},[1314,4258,3144],{"class":1345},[1314,4260,1349],{"class":1341},[1314,4262,1413],{"class":1331},[1314,4264,4265,4267,4270,4272,4274,4276,4278,4280],{"class":1316,"line":1528},[1314,4266,3293],{"class":1341},[1314,4268,4269],{"class":1345},"application_name",[1314,4271,1349],{"class":1341},[1314,4273,1352],{"class":1331},[1314,4275,1383],{"class":1341},[1314,4277,3458],{"class":1345},[1314,4279,1349],{"class":1341},[1314,4281,1413],{"class":1331},[1314,4283,4284],{"class":1316,"line":1534},[1314,4285,3311],{"class":1331},[1314,4287,4288],{"class":1316,"line":1540},[1314,4289,3153],{"class":1331},[1314,4291,4292],{"class":1316,"line":1546},[1314,4293,1531],{"class":1331},[1314,4295,4296],{"class":1316,"line":1552},[1314,4297,1537],{"class":1331},[1314,4299,4300],{"class":1316,"line":1562},[1314,4301,1543],{"emptyLinePlaceholder":1104},[1314,4303,4304],{"class":1316,"line":1594},[1314,4305,4306],{"class":1320},"# Connection pooling with pgbouncer\n",[1314,4308,4309,4312,4314],{"class":1316,"line":1616},[1314,4310,4311],{"class":1327},"DATABASE_POOL_ARGS",[1314,4313,1332],{"class":1331},[1314,4315,1335],{"class":1331},[1314,4317,4318,4320,4323,4325,4327,4330],{"class":1316,"line":1621},[1314,4319,1342],{"class":1341},[1314,4321,4322],{"class":1345},"max_overflow",[1314,4324,1349],{"class":1341},[1314,4326,1352],{"class":1331},[1314,4328,4329],{"class":1572}," 10",[1314,4331,1413],{"class":1331},[1314,4333,4334,4336,4339,4341,4343,4345],{"class":1316,"line":1626},[1314,4335,1342],{"class":1341},[1314,4337,4338],{"class":1345},"pool_pre_ping",[1314,4340,1349],{"class":1341},[1314,4342,1352],{"class":1331},[1314,4344,3576],{"class":3303},[1314,4346,1413],{"class":1331},[1314,4348,4349,4351,4354,4356,4358,4361],{"class":1316,"line":1634},[1314,4350,1342],{"class":1341},[1314,4352,4353],{"class":1345},"pool_recycle",[1314,4355,1349],{"class":1341},[1314,4357,1352],{"class":1331},[1314,4359,4360],{"class":1572}," 300",[1314,4362,1413],{"class":1331},[1314,4364,4365],{"class":1316,"line":1656},[1314,4366,1537],{"class":1331},[1038,4368,4370],{"id":4369},"caching-strategy","Caching Strategy",[1073,4372,4374],{"className":1308,"code":4373,"language":1310,"meta":1082,"style":1082},"# Multi-level caching configuration\nCACHES = {\n    'default': {\n        'BACKEND': 'django_redis.cache.RedisCache',\n        'LOCATION': 'redis://redis-cluster:6379/1',\n        'OPTIONS': {\n            'CLIENT_CLASS': 'django_redis.client.ShardClient',\n            'CONNECTION_POOL_KWARGS': {\n                'max_connections': 50,\n                'retry_on_timeout': True,\n            },\n        },\n        'KEY_PREFIX': 'myapp',\n        'VERSION': 1,\n    },\n    'sessions': {\n        'BACKEND': 'django_redis.cache.RedisCache',\n        'LOCATION': 'redis://redis-sessions:6379/2',\n        'OPTIONS': {\n            'CLIENT_CLASS': 'django_redis.client.DefaultClient',\n        },\n    },\n}\n\n# Cache middleware configuration\nMIDDLEWARE = [\n    'django.middleware.cache.UpdateCacheMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.cache.FetchFromCacheMiddleware',\n    # ... other middleware\n]\n\nCACHE_MIDDLEWARE_ALIAS = 'default'\nCACHE_MIDDLEWARE_SECONDS = 600\nCACHE_MIDDLEWARE_KEY_PREFIX = 'myapp'\n",[1080,4375,4376,4381,4389,4401,4419,4438,4450,4469,4481,4497,4512,4516,4520,4540,4555,4559,4572,4590,4609,4621,4639,4643,4647,4651,4655,4660,4670,4681,4692,4703,4708,4712,4716,4729,4739],{"__ignoreMap":1082},[1314,4377,4378],{"class":1316,"line":1317},[1314,4379,4380],{"class":1320},"# Multi-level caching configuration\n",[1314,4382,4383,4385,4387],{"class":1316,"line":1324},[1314,4384,3175],{"class":1327},[1314,4386,1332],{"class":1331},[1314,4388,1335],{"class":1331},[1314,4390,4391,4393,4395,4397,4399],{"class":1316,"line":1338},[1314,4392,1342],{"class":1341},[1314,4394,2918],{"class":1345},[1314,4396,1349],{"class":1341},[1314,4398,1352],{"class":1331},[1314,4400,1335],{"class":1331},[1314,4402,4403,4405,4407,4409,4411,4413,4415,4417],{"class":1316,"line":1357},[1314,4404,1360],{"class":1341},[1314,4406,3198],{"class":1345},[1314,4408,1349],{"class":1341},[1314,4410,1352],{"class":1331},[1314,4412,1383],{"class":1341},[1314,4414,3207],{"class":1345},[1314,4416,1349],{"class":1341},[1314,4418,1413],{"class":1331},[1314,4420,4421,4423,4425,4427,4429,4431,4434,4436],{"class":1316,"line":1394},[1314,4422,1360],{"class":1341},[1314,4424,3218],{"class":1345},[1314,4426,1349],{"class":1341},[1314,4428,1352],{"class":1331},[1314,4430,1383],{"class":1341},[1314,4432,4433],{"class":1345},"redis://redis-cluster:6379/1",[1314,4435,1349],{"class":1341},[1314,4437,1413],{"class":1331},[1314,4439,4440,4442,4444,4446,4448],{"class":1316,"line":1416},[1314,4441,1360],{"class":1341},[1314,4443,3121],{"class":1345},[1314,4445,1349],{"class":1341},[1314,4447,1352],{"class":1331},[1314,4449,1335],{"class":1331},[1314,4451,4452,4454,4456,4458,4460,4462,4465,4467],{"class":1316,"line":1437},[1314,4453,3132],{"class":1341},[1314,4455,3262],{"class":1345},[1314,4457,1349],{"class":1341},[1314,4459,1352],{"class":1331},[1314,4461,1383],{"class":1341},[1314,4463,4464],{"class":1345},"django_redis.client.ShardClient",[1314,4466,1349],{"class":1341},[1314,4468,1413],{"class":1331},[1314,4470,4471,4473,4475,4477,4479],{"class":1316,"line":1443},[1314,4472,3132],{"class":1341},[1314,4474,3282],{"class":1345},[1314,4476,1349],{"class":1341},[1314,4478,1352],{"class":1331},[1314,4480,1335],{"class":1331},[1314,4482,4483,4485,4488,4490,4492,4495],{"class":1316,"line":1457},[1314,4484,3293],{"class":1341},[1314,4486,4487],{"class":1345},"max_connections",[1314,4489,1349],{"class":1341},[1314,4491,1352],{"class":1331},[1314,4493,4494],{"class":1572}," 50",[1314,4496,1413],{"class":1331},[1314,4498,4499,4501,4504,4506,4508,4510],{"class":1316,"line":1488},[1314,4500,3293],{"class":1341},[1314,4502,4503],{"class":1345},"retry_on_timeout",[1314,4505,1349],{"class":1341},[1314,4507,1352],{"class":1331},[1314,4509,3576],{"class":3303},[1314,4511,1413],{"class":1331},[1314,4513,4514],{"class":1316,"line":1508},[1314,4515,3311],{"class":1331},[1314,4517,4518],{"class":1316,"line":1528},[1314,4519,3153],{"class":1331},[1314,4521,4522,4524,4527,4529,4531,4533,4536,4538],{"class":1316,"line":1534},[1314,4523,1360],{"class":1341},[1314,4525,4526],{"class":1345},"KEY_PREFIX",[1314,4528,1349],{"class":1341},[1314,4530,1352],{"class":1331},[1314,4532,1383],{"class":1341},[1314,4534,4535],{"class":1345},"myapp",[1314,4537,1349],{"class":1341},[1314,4539,1413],{"class":1331},[1314,4541,4542,4544,4547,4549,4551,4553],{"class":1316,"line":1540},[1314,4543,1360],{"class":1341},[1314,4545,4546],{"class":1345},"VERSION",[1314,4548,1349],{"class":1341},[1314,4550,1352],{"class":1331},[1314,4552,3355],{"class":1572},[1314,4554,1413],{"class":1331},[1314,4556,4557],{"class":1316,"line":1546},[1314,4558,1440],{"class":1331},[1314,4560,4561,4563,4566,4568,4570],{"class":1316,"line":1552},[1314,4562,1342],{"class":1341},[1314,4564,4565],{"class":1345},"sessions",[1314,4567,1349],{"class":1341},[1314,4569,1352],{"class":1331},[1314,4571,1335],{"class":1331},[1314,4573,4574,4576,4578,4580,4582,4584,4586,4588],{"class":1316,"line":1562},[1314,4575,1360],{"class":1341},[1314,4577,3198],{"class":1345},[1314,4579,1349],{"class":1341},[1314,4581,1352],{"class":1331},[1314,4583,1383],{"class":1341},[1314,4585,3207],{"class":1345},[1314,4587,1349],{"class":1341},[1314,4589,1413],{"class":1331},[1314,4591,4592,4594,4596,4598,4600,4602,4605,4607],{"class":1316,"line":1594},[1314,4593,1360],{"class":1341},[1314,4595,3218],{"class":1345},[1314,4597,1349],{"class":1341},[1314,4599,1352],{"class":1331},[1314,4601,1383],{"class":1341},[1314,4603,4604],{"class":1345},"redis://redis-sessions:6379/2",[1314,4606,1349],{"class":1341},[1314,4608,1413],{"class":1331},[1314,4610,4611,4613,4615,4617,4619],{"class":1316,"line":1616},[1314,4612,1360],{"class":1341},[1314,4614,3121],{"class":1345},[1314,4616,1349],{"class":1341},[1314,4618,1352],{"class":1331},[1314,4620,1335],{"class":1331},[1314,4622,4623,4625,4627,4629,4631,4633,4635,4637],{"class":1316,"line":1621},[1314,4624,3132],{"class":1341},[1314,4626,3262],{"class":1345},[1314,4628,1349],{"class":1341},[1314,4630,1352],{"class":1331},[1314,4632,1383],{"class":1341},[1314,4634,3271],{"class":1345},[1314,4636,1349],{"class":1341},[1314,4638,1413],{"class":1331},[1314,4640,4641],{"class":1316,"line":1626},[1314,4642,3153],{"class":1331},[1314,4644,4645],{"class":1316,"line":1634},[1314,4646,1440],{"class":1331},[1314,4648,4649],{"class":1316,"line":1656},[1314,4650,1537],{"class":1331},[1314,4652,4653],{"class":1316,"line":1677},[1314,4654,1543],{"emptyLinePlaceholder":1104},[1314,4656,4657],{"class":1316,"line":1682},[1314,4658,4659],{"class":1320},"# Cache middleware configuration\n",[1314,4661,4662,4665,4667],{"class":1316,"line":1687},[1314,4663,4664],{"class":1327},"MIDDLEWARE",[1314,4666,1332],{"class":1331},[1314,4668,4669],{"class":1331}," [\n",[1314,4671,4672,4674,4677,4679],{"class":1316,"line":1693},[1314,4673,1342],{"class":1341},[1314,4675,4676],{"class":1345},"django.middleware.cache.UpdateCacheMiddleware",[1314,4678,1349],{"class":1341},[1314,4680,1413],{"class":1331},[1314,4682,4683,4685,4688,4690],{"class":1316,"line":1701},[1314,4684,1342],{"class":1341},[1314,4686,4687],{"class":1345},"django.middleware.common.CommonMiddleware",[1314,4689,1349],{"class":1341},[1314,4691,1413],{"class":1331},[1314,4693,4694,4696,4699,4701],{"class":1316,"line":1712},[1314,4695,1342],{"class":1341},[1314,4697,4698],{"class":1345},"django.middleware.cache.FetchFromCacheMiddleware",[1314,4700,1349],{"class":1341},[1314,4702,1413],{"class":1331},[1314,4704,4705],{"class":1316,"line":1729},[1314,4706,4707],{"class":1320},"    # ... other middleware\n",[1314,4709,4710],{"class":1316,"line":1734},[1314,4711,2163],{"class":1331},[1314,4713,4714],{"class":1316,"line":2042},[1314,4715,1543],{"emptyLinePlaceholder":1104},[1314,4717,4718,4721,4723,4725,4727],{"class":1316,"line":2049},[1314,4719,4720],{"class":1327},"CACHE_MIDDLEWARE_ALIAS",[1314,4722,1332],{"class":1331},[1314,4724,1383],{"class":1341},[1314,4726,2918],{"class":1345},[1314,4728,1810],{"class":1341},[1314,4730,4731,4734,4736],{"class":1316,"line":2054},[1314,4732,4733],{"class":1327},"CACHE_MIDDLEWARE_SECONDS",[1314,4735,1332],{"class":1331},[1314,4737,4738],{"class":1572}," 600\n",[1314,4740,4741,4744,4746,4748,4750],{"class":1316,"line":2062},[1314,4742,4743],{"class":1327},"CACHE_MIDDLEWARE_KEY_PREFIX",[1314,4745,1332],{"class":1331},[1314,4747,1383],{"class":1341},[1314,4749,4535],{"class":1345},[1314,4751,1810],{"class":1341},[1030,4753,4755],{"id":4754},"security-hardening","Security Hardening",[1038,4757,4759],{"id":4758},"production-security-settings","Production Security Settings",[1073,4761,4763],{"className":1308,"code":4762,"language":1310,"meta":1082,"style":1082},"# Security configuration\nDEBUG = False\nALLOWED_HOSTS = ['yourdomain.com', 'www.yourdomain.com']\n\n# HTTPS Configuration\nSECURE_SSL_REDIRECT = True\nSECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\nSECURE_HSTS_SECONDS = 31536000\nSECURE_HSTS_INCLUDE_SUBDOMAINS = True\nSECURE_HSTS_PRELOAD = True\nSECURE_CONTENT_TYPE_NOSNIFF = True\nSECURE_BROWSER_XSS_FILTER = True\nX_FRAME_OPTIONS = 'DENY'\n\n# Session Security\nSESSION_COOKIE_SECURE = True\nSESSION_COOKIE_HTTPONLY = True\nSESSION_COOKIE_SAMESITE = 'Strict'\nCSRF_COOKIE_SECURE = True\nCSRF_COOKIE_HTTPONLY = True\n\n# Additional Security Headers\nSECURE_REFERRER_POLICY = 'strict-origin-when-cross-origin'\nPERMISSIONS_POLICY = {\n    'geolocation': [],\n    'microphone': [],\n    'camera': [],\n}\n",[1080,4764,4765,4770,4780,4807,4811,4816,4826,4854,4864,4873,4882,4891,4900,4914,4918,4923,4932,4941,4955,4964,4973,4977,4982,4996,5005,5019,5032,5045],{"__ignoreMap":1082},[1314,4766,4767],{"class":1316,"line":1317},[1314,4768,4769],{"class":1320},"# Security configuration\n",[1314,4771,4772,4775,4777],{"class":1316,"line":1324},[1314,4773,4774],{"class":1327},"DEBUG",[1314,4776,1332],{"class":1331},[1314,4778,4779],{"class":3303}," False\n",[1314,4781,4782,4785,4787,4789,4791,4794,4796,4798,4800,4803,4805],{"class":1316,"line":1338},[1314,4783,4784],{"class":1327},"ALLOWED_HOSTS",[1314,4786,1332],{"class":1331},[1314,4788,1370],{"class":1331},[1314,4790,1349],{"class":1341},[1314,4792,4793],{"class":1345},"yourdomain.com",[1314,4795,1349],{"class":1341},[1314,4797,1380],{"class":1331},[1314,4799,1383],{"class":1341},[1314,4801,4802],{"class":1345},"www.yourdomain.com",[1314,4804,1349],{"class":1341},[1314,4806,2163],{"class":1331},[1314,4808,4809],{"class":1316,"line":1357},[1314,4810,1543],{"emptyLinePlaceholder":1104},[1314,4812,4813],{"class":1316,"line":1394},[1314,4814,4815],{"class":1320},"# HTTPS Configuration\n",[1314,4817,4818,4821,4823],{"class":1316,"line":1416},[1314,4819,4820],{"class":1327},"SECURE_SSL_REDIRECT",[1314,4822,1332],{"class":1331},[1314,4824,4825],{"class":3303}," True\n",[1314,4827,4828,4831,4833,4836,4838,4841,4843,4845,4847,4850,4852],{"class":1316,"line":1437},[1314,4829,4830],{"class":1327},"SECURE_PROXY_SSL_HEADER",[1314,4832,1332],{"class":1331},[1314,4834,4835],{"class":1331}," (",[1314,4837,1349],{"class":1341},[1314,4839,4840],{"class":1345},"HTTP_X_FORWARDED_PROTO",[1314,4842,1349],{"class":1341},[1314,4844,1380],{"class":1331},[1314,4846,1383],{"class":1341},[1314,4848,4849],{"class":1345},"https",[1314,4851,1349],{"class":1341},[1314,4853,2701],{"class":1331},[1314,4855,4856,4859,4861],{"class":1316,"line":1443},[1314,4857,4858],{"class":1327},"SECURE_HSTS_SECONDS",[1314,4860,1332],{"class":1331},[1314,4862,4863],{"class":1572}," 31536000\n",[1314,4865,4866,4869,4871],{"class":1316,"line":1457},[1314,4867,4868],{"class":1327},"SECURE_HSTS_INCLUDE_SUBDOMAINS",[1314,4870,1332],{"class":1331},[1314,4872,4825],{"class":3303},[1314,4874,4875,4878,4880],{"class":1316,"line":1488},[1314,4876,4877],{"class":1327},"SECURE_HSTS_PRELOAD",[1314,4879,1332],{"class":1331},[1314,4881,4825],{"class":3303},[1314,4883,4884,4887,4889],{"class":1316,"line":1508},[1314,4885,4886],{"class":1327},"SECURE_CONTENT_TYPE_NOSNIFF",[1314,4888,1332],{"class":1331},[1314,4890,4825],{"class":3303},[1314,4892,4893,4896,4898],{"class":1316,"line":1528},[1314,4894,4895],{"class":1327},"SECURE_BROWSER_XSS_FILTER",[1314,4897,1332],{"class":1331},[1314,4899,4825],{"class":3303},[1314,4901,4902,4905,4907,4909,4912],{"class":1316,"line":1534},[1314,4903,4904],{"class":1327},"X_FRAME_OPTIONS",[1314,4906,1332],{"class":1331},[1314,4908,1383],{"class":1341},[1314,4910,4911],{"class":1345},"DENY",[1314,4913,1810],{"class":1341},[1314,4915,4916],{"class":1316,"line":1540},[1314,4917,1543],{"emptyLinePlaceholder":1104},[1314,4919,4920],{"class":1316,"line":1546},[1314,4921,4922],{"class":1320},"# Session Security\n",[1314,4924,4925,4928,4930],{"class":1316,"line":1552},[1314,4926,4927],{"class":1327},"SESSION_COOKIE_SECURE",[1314,4929,1332],{"class":1331},[1314,4931,4825],{"class":3303},[1314,4933,4934,4937,4939],{"class":1316,"line":1562},[1314,4935,4936],{"class":1327},"SESSION_COOKIE_HTTPONLY",[1314,4938,1332],{"class":1331},[1314,4940,4825],{"class":3303},[1314,4942,4943,4946,4948,4950,4953],{"class":1316,"line":1594},[1314,4944,4945],{"class":1327},"SESSION_COOKIE_SAMESITE",[1314,4947,1332],{"class":1331},[1314,4949,1383],{"class":1341},[1314,4951,4952],{"class":1345},"Strict",[1314,4954,1810],{"class":1341},[1314,4956,4957,4960,4962],{"class":1316,"line":1616},[1314,4958,4959],{"class":1327},"CSRF_COOKIE_SECURE",[1314,4961,1332],{"class":1331},[1314,4963,4825],{"class":3303},[1314,4965,4966,4969,4971],{"class":1316,"line":1621},[1314,4967,4968],{"class":1327},"CSRF_COOKIE_HTTPONLY",[1314,4970,1332],{"class":1331},[1314,4972,4825],{"class":3303},[1314,4974,4975],{"class":1316,"line":1626},[1314,4976,1543],{"emptyLinePlaceholder":1104},[1314,4978,4979],{"class":1316,"line":1634},[1314,4980,4981],{"class":1320},"# Additional Security Headers\n",[1314,4983,4984,4987,4989,4991,4994],{"class":1316,"line":1656},[1314,4985,4986],{"class":1327},"SECURE_REFERRER_POLICY",[1314,4988,1332],{"class":1331},[1314,4990,1383],{"class":1341},[1314,4992,4993],{"class":1345},"strict-origin-when-cross-origin",[1314,4995,1810],{"class":1341},[1314,4997,4998,5001,5003],{"class":1316,"line":1677},[1314,4999,5000],{"class":1327},"PERMISSIONS_POLICY",[1314,5002,1332],{"class":1331},[1314,5004,1335],{"class":1331},[1314,5006,5007,5009,5012,5014,5016],{"class":1316,"line":1682},[1314,5008,1342],{"class":1341},[1314,5010,5011],{"class":1345},"geolocation",[1314,5013,1349],{"class":1341},[1314,5015,1352],{"class":1331},[1314,5017,5018],{"class":1331}," [],\n",[1314,5020,5021,5023,5026,5028,5030],{"class":1316,"line":1687},[1314,5022,1342],{"class":1341},[1314,5024,5025],{"class":1345},"microphone",[1314,5027,1349],{"class":1341},[1314,5029,1352],{"class":1331},[1314,5031,5018],{"class":1331},[1314,5033,5034,5036,5039,5041,5043],{"class":1316,"line":1693},[1314,5035,1342],{"class":1341},[1314,5037,5038],{"class":1345},"camera",[1314,5040,1349],{"class":1341},[1314,5042,1352],{"class":1331},[1314,5044,5018],{"class":1331},[1314,5046,5047],{"class":1316,"line":1701},[1314,5048,1537],{"class":1331},[1038,5050,5052],{"id":5051},"environment-variable-management","Environment Variable Management",[1073,5054,5056],{"className":1308,"code":5055,"language":1310,"meta":1082,"style":1082},"# settings/production.py\nimport os\nfrom pathlib import Path\n\n# Secret key from environment\nSECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')\nif not SECRET_KEY:\n    raise ValueError('DJANGO_SECRET_KEY environment variable is required')\n\n# Database credentials\nDATABASE_URL = os.environ.get('DATABASE_URL')\nif not DATABASE_URL:\n    raise ValueError('DATABASE_URL environment variable is required')\n\n# Email configuration\nEMAIL_HOST = os.environ.get('EMAIL_HOST')\nEMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')\nEMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')\nEMAIL_PORT = int(os.environ.get('EMAIL_PORT', 587))\nEMAIL_USE_TLS = os.environ.get('EMAIL_USE_TLS', 'True').lower() == 'true'\n\n# Third-party service keys\nSTRIPE_PUBLIC_KEY = os.environ.get('STRIPE_PUBLIC_KEY')\nSTRIPE_SECRET_KEY = os.environ.get('STRIPE_SECRET_KEY')\nAWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')\nAWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')\n",[1080,5057,5058,5063,5070,5082,5086,5091,5119,5132,5152,5156,5161,5188,5199,5216,5220,5225,5252,5279,5306,5344,5397,5401,5406,5433,5460,5486],{"__ignoreMap":1082},[1314,5059,5060],{"class":1316,"line":1317},[1314,5061,5062],{"class":1320},"# settings/production.py\n",[1314,5064,5065,5067],{"class":1316,"line":1324},[1314,5066,2656],{"class":2655},[1314,5068,5069],{"class":1555}," os\n",[1314,5071,5072,5074,5077,5079],{"class":1316,"line":1338},[1314,5073,3612],{"class":2655},[1314,5075,5076],{"class":1555}," pathlib ",[1314,5078,2656],{"class":2655},[1314,5080,5081],{"class":1555}," Path\n",[1314,5083,5084],{"class":1316,"line":1357},[1314,5085,1543],{"emptyLinePlaceholder":1104},[1314,5087,5088],{"class":1316,"line":1394},[1314,5089,5090],{"class":1320},"# Secret key from environment\n",[1314,5092,5093,5096,5098,5100,5102,5104,5106,5108,5110,5112,5115,5117],{"class":1316,"line":1416},[1314,5094,5095],{"class":1327},"SECRET_KEY",[1314,5097,1332],{"class":1331},[1314,5099,2678],{"class":1555},[1314,5101,1579],{"class":1331},[1314,5103,2683],{"class":1582},[1314,5105,1579],{"class":1331},[1314,5107,2689],{"class":2688},[1314,5109,2692],{"class":1331},[1314,5111,1349],{"class":1341},[1314,5113,5114],{"class":1345},"DJANGO_SECRET_KEY",[1314,5116,1349],{"class":1341},[1314,5118,2701],{"class":1331},[1314,5120,5121,5124,5127,5130],{"class":1316,"line":1437},[1314,5122,5123],{"class":2655},"if",[1314,5125,5126],{"class":1568}," not",[1314,5128,5129],{"class":1327}," SECRET_KEY",[1314,5131,1818],{"class":1331},[1314,5133,5134,5137,5141,5143,5145,5148,5150],{"class":1316,"line":1443},[1314,5135,5136],{"class":2655},"    raise",[1314,5138,5140],{"class":5139},"sa2tF"," ValueError",[1314,5142,2692],{"class":1331},[1314,5144,1349],{"class":1341},[1314,5146,5147],{"class":1345},"DJANGO_SECRET_KEY environment variable is required",[1314,5149,1349],{"class":1341},[1314,5151,2701],{"class":1331},[1314,5153,5154],{"class":1316,"line":1457},[1314,5155,1543],{"emptyLinePlaceholder":1104},[1314,5157,5158],{"class":1316,"line":1488},[1314,5159,5160],{"class":1320},"# Database credentials\n",[1314,5162,5163,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186],{"class":1316,"line":1508},[1314,5164,5165],{"class":1327},"DATABASE_URL",[1314,5167,1332],{"class":1331},[1314,5169,2678],{"class":1555},[1314,5171,1579],{"class":1331},[1314,5173,2683],{"class":1582},[1314,5175,1579],{"class":1331},[1314,5177,2689],{"class":2688},[1314,5179,2692],{"class":1331},[1314,5181,1349],{"class":1341},[1314,5183,5165],{"class":1345},[1314,5185,1349],{"class":1341},[1314,5187,2701],{"class":1331},[1314,5189,5190,5192,5194,5197],{"class":1316,"line":1528},[1314,5191,5123],{"class":2655},[1314,5193,5126],{"class":1568},[1314,5195,5196],{"class":1327}," DATABASE_URL",[1314,5198,1818],{"class":1331},[1314,5200,5201,5203,5205,5207,5209,5212,5214],{"class":1316,"line":1534},[1314,5202,5136],{"class":2655},[1314,5204,5140],{"class":5139},[1314,5206,2692],{"class":1331},[1314,5208,1349],{"class":1341},[1314,5210,5211],{"class":1345},"DATABASE_URL environment variable is required",[1314,5213,1349],{"class":1341},[1314,5215,2701],{"class":1331},[1314,5217,5218],{"class":1316,"line":1540},[1314,5219,1543],{"emptyLinePlaceholder":1104},[1314,5221,5222],{"class":1316,"line":1546},[1314,5223,5224],{"class":1320},"# Email configuration\n",[1314,5226,5227,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250],{"class":1316,"line":1552},[1314,5228,5229],{"class":1327},"EMAIL_HOST",[1314,5231,1332],{"class":1331},[1314,5233,2678],{"class":1555},[1314,5235,1579],{"class":1331},[1314,5237,2683],{"class":1582},[1314,5239,1579],{"class":1331},[1314,5241,2689],{"class":2688},[1314,5243,2692],{"class":1331},[1314,5245,1349],{"class":1341},[1314,5247,5229],{"class":1345},[1314,5249,1349],{"class":1341},[1314,5251,2701],{"class":1331},[1314,5253,5254,5257,5259,5261,5263,5265,5267,5269,5271,5273,5275,5277],{"class":1316,"line":1562},[1314,5255,5256],{"class":1327},"EMAIL_HOST_USER",[1314,5258,1332],{"class":1331},[1314,5260,2678],{"class":1555},[1314,5262,1579],{"class":1331},[1314,5264,2683],{"class":1582},[1314,5266,1579],{"class":1331},[1314,5268,2689],{"class":2688},[1314,5270,2692],{"class":1331},[1314,5272,1349],{"class":1341},[1314,5274,5256],{"class":1345},[1314,5276,1349],{"class":1341},[1314,5278,2701],{"class":1331},[1314,5280,5281,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304],{"class":1316,"line":1594},[1314,5282,5283],{"class":1327},"EMAIL_HOST_PASSWORD",[1314,5285,1332],{"class":1331},[1314,5287,2678],{"class":1555},[1314,5289,1579],{"class":1331},[1314,5291,2683],{"class":1582},[1314,5293,1579],{"class":1331},[1314,5295,2689],{"class":2688},[1314,5297,2692],{"class":1331},[1314,5299,1349],{"class":1341},[1314,5301,5283],{"class":1345},[1314,5303,1349],{"class":1341},[1314,5305,2701],{"class":1331},[1314,5307,5308,5311,5313,5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5341],{"class":1316,"line":1616},[1314,5309,5310],{"class":1327},"EMAIL_PORT",[1314,5312,1332],{"class":1331},[1314,5314,5315],{"class":5139}," int",[1314,5317,2692],{"class":1331},[1314,5319,3919],{"class":2688},[1314,5321,1579],{"class":1331},[1314,5323,2683],{"class":1582},[1314,5325,1579],{"class":1331},[1314,5327,2689],{"class":2688},[1314,5329,2692],{"class":1331},[1314,5331,1349],{"class":1341},[1314,5333,5310],{"class":1345},[1314,5335,1349],{"class":1341},[1314,5337,1380],{"class":1331},[1314,5339,5340],{"class":1572}," 587",[1314,5342,5343],{"class":1331},"))\n",[1314,5345,5346,5349,5351,5353,5355,5357,5359,5361,5363,5365,5367,5369,5371,5373,5376,5378,5381,5384,5387,5390,5392,5395],{"class":1316,"line":1621},[1314,5347,5348],{"class":1327},"EMAIL_USE_TLS",[1314,5350,1332],{"class":1331},[1314,5352,2678],{"class":1555},[1314,5354,1579],{"class":1331},[1314,5356,2683],{"class":1582},[1314,5358,1579],{"class":1331},[1314,5360,2689],{"class":2688},[1314,5362,2692],{"class":1331},[1314,5364,1349],{"class":1341},[1314,5366,5348],{"class":1345},[1314,5368,1349],{"class":1341},[1314,5370,1380],{"class":1331},[1314,5372,1383],{"class":1341},[1314,5374,5375],{"class":1345},"True",[1314,5377,1349],{"class":1341},[1314,5379,5380],{"class":1331},").",[1314,5382,5383],{"class":2688},"lower",[1314,5385,5386],{"class":1331},"()",[1314,5388,5389],{"class":1568}," ==",[1314,5391,1383],{"class":1341},[1314,5393,5394],{"class":1345},"true",[1314,5396,1810],{"class":1341},[1314,5398,5399],{"class":1316,"line":1626},[1314,5400,1543],{"emptyLinePlaceholder":1104},[1314,5402,5403],{"class":1316,"line":1634},[1314,5404,5405],{"class":1320},"# Third-party service keys\n",[1314,5407,5408,5411,5413,5415,5417,5419,5421,5423,5425,5427,5429,5431],{"class":1316,"line":1656},[1314,5409,5410],{"class":1327},"STRIPE_PUBLIC_KEY",[1314,5412,1332],{"class":1331},[1314,5414,2678],{"class":1555},[1314,5416,1579],{"class":1331},[1314,5418,2683],{"class":1582},[1314,5420,1579],{"class":1331},[1314,5422,2689],{"class":2688},[1314,5424,2692],{"class":1331},[1314,5426,1349],{"class":1341},[1314,5428,5410],{"class":1345},[1314,5430,1349],{"class":1341},[1314,5432,2701],{"class":1331},[1314,5434,5435,5438,5440,5442,5444,5446,5448,5450,5452,5454,5456,5458],{"class":1316,"line":1677},[1314,5436,5437],{"class":1327},"STRIPE_SECRET_KEY",[1314,5439,1332],{"class":1331},[1314,5441,2678],{"class":1555},[1314,5443,1579],{"class":1331},[1314,5445,2683],{"class":1582},[1314,5447,1579],{"class":1331},[1314,5449,2689],{"class":2688},[1314,5451,2692],{"class":1331},[1314,5453,1349],{"class":1341},[1314,5455,5437],{"class":1345},[1314,5457,1349],{"class":1341},[1314,5459,2701],{"class":1331},[1314,5461,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484],{"class":1316,"line":1682},[1314,5463,2673],{"class":1327},[1314,5465,1332],{"class":1331},[1314,5467,2678],{"class":1555},[1314,5469,1579],{"class":1331},[1314,5471,2683],{"class":1582},[1314,5473,1579],{"class":1331},[1314,5475,2689],{"class":2688},[1314,5477,2692],{"class":1331},[1314,5479,1349],{"class":1341},[1314,5481,2673],{"class":1345},[1314,5483,1349],{"class":1341},[1314,5485,2701],{"class":1331},[1314,5487,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510],{"class":1316,"line":1687},[1314,5489,2706],{"class":1327},[1314,5491,1332],{"class":1331},[1314,5493,2678],{"class":1555},[1314,5495,1579],{"class":1331},[1314,5497,2683],{"class":1582},[1314,5499,1579],{"class":1331},[1314,5501,2689],{"class":2688},[1314,5503,2692],{"class":1331},[1314,5505,1349],{"class":1341},[1314,5507,2706],{"class":1345},[1314,5509,1349],{"class":1341},[1314,5511,2701],{"class":1331},[1030,5513,5515],{"id":5514},"monitoring-and-health-checks","Monitoring and Health Checks",[1038,5517,5519],{"id":5518},"application-health-endpoints","Application Health Endpoints",[1073,5521,5523],{"className":1308,"code":5522,"language":1310,"meta":1082,"style":1082},"# health/views.py\nimport psutil\nfrom django.http import JsonResponse\nfrom django.db import connection\nfrom django.core.cache import cache\nfrom django.conf import settings\n\ndef health_check(request):\n    \"\"\"Basic health check endpoint\"\"\"\n    try:\n        # Database connectivity\n        with connection.cursor() as cursor:\n            cursor.execute(\"SELECT 1\")\n        \n        # Cache connectivity\n        cache.set('health_check', 'ok', 30)\n        cache_status = cache.get('health_check') == 'ok'\n        \n        return JsonResponse({\n            'status': 'healthy',\n            'database': 'connected',\n            'cache': 'connected' if cache_status else 'disconnected',\n            'timestamp': timezone.now().isoformat(),\n        })\n        \n    except Exception as e:\n        return JsonResponse({\n            'status': 'unhealthy',\n            'error': str(e),\n            'timestamp': timezone.now().isoformat(),\n        }, status=503)\n\ndef readiness_check(request):\n    \"\"\"Readiness check for load balancers\"\"\"\n    try:\n        # Check if application is ready to serve traffic\n        checks = {\n            'database': check_database_connection(),\n            'cache': check_cache_connection(),\n            'migrations': check_migrations_applied(),\n            'static_files': check_static_files(),\n        }\n        \n        if all(checks.values()):\n            return JsonResponse({\n                'status': 'ready',\n                'checks': checks,\n                'timestamp': timezone.now().isoformat(),\n            })\n        else:\n            return JsonResponse({\n                'status': 'not_ready',\n                'checks': checks,\n                'timestamp': timezone.now().isoformat(),\n            }, status=503)\n            \n    except Exception as e:\n        return JsonResponse({\n            'status': 'error',\n            'error': str(e),\n            'timestamp': timezone.now().isoformat(),\n        }, status=503)\n\ndef metrics_endpoint(request):\n    \"\"\"Expose application metrics\"\"\"\n    try:\n        # System metrics\n        cpu_percent = psutil.cpu_percent()\n        memory = psutil.virtual_memory()\n        disk = psutil.disk_usage('/')\n        \n        # Application metrics\n        active_users = get_active_user_count()\n        request_count = get_request_count()\n        error_rate = get_error_rate()\n        \n        return JsonResponse({\n            'system': {\n                'cpu_percent': cpu_percent,\n                'memory_percent': memory.percent,\n                'disk_percent': (disk.used / disk.total) * 100,\n            },\n            'application': {\n                'active_users': active_users,\n                'request_count': request_count,\n                'error_rate': error_rate,\n            },\n            'timestamp': timezone.now().isoformat(),\n        })\n        \n    except Exception as e:\n        return JsonResponse({\n            'error': str(e),\n            'timestamp': timezone.now().isoformat(),\n        }, status=500)\n",[1080,5524,5525,5530,5537,5554,5570,5591,5607,5611,5629,5642,5649,5654,5677,5698,5703,5708,5743,5776,5780,5791,5811,5830,5865,5893,5898,5902,5917,5925,5944,5965,5987,6003,6007,6020,6029,6035,6040,6049,6064,6079,6095,6111,6115,6119,6141,6150,6169,6184,6206,6211,6218,6226,6245,6259,6281,6294,6299,6311,6319,6337,6355,6377,6389,6393,6406,6415,6422,6428,6447,6464,6489,6494,6500,6513,6526,6539,6544,6553,6567,6583,6605,6648,6653,6667,6684,6701,6718,6723,6746,6751,6756,6769,6778,6797,6820],{"__ignoreMap":1082},[1314,5526,5527],{"class":1316,"line":1317},[1314,5528,5529],{"class":1320},"# health/views.py\n",[1314,5531,5532,5534],{"class":1316,"line":1324},[1314,5533,2656],{"class":2655},[1314,5535,5536],{"class":1555}," psutil\n",[1314,5538,5539,5541,5544,5546,5549,5551],{"class":1316,"line":1338},[1314,5540,3612],{"class":2655},[1314,5542,5543],{"class":1555}," django",[1314,5545,1579],{"class":1331},[1314,5547,5548],{"class":1555},"http ",[1314,5550,2656],{"class":2655},[1314,5552,5553],{"class":1555}," JsonResponse\n",[1314,5555,5556,5558,5560,5562,5565,5567],{"class":1316,"line":1357},[1314,5557,3612],{"class":2655},[1314,5559,5543],{"class":1555},[1314,5561,1579],{"class":1331},[1314,5563,5564],{"class":1555},"db ",[1314,5566,2656],{"class":2655},[1314,5568,5569],{"class":1555}," connection\n",[1314,5571,5572,5574,5576,5578,5581,5583,5586,5588],{"class":1316,"line":1394},[1314,5573,3612],{"class":2655},[1314,5575,5543],{"class":1555},[1314,5577,1579],{"class":1331},[1314,5579,5580],{"class":1555},"core",[1314,5582,1579],{"class":1331},[1314,5584,5585],{"class":1555},"cache ",[1314,5587,2656],{"class":2655},[1314,5589,5590],{"class":1555}," cache\n",[1314,5592,5593,5595,5597,5599,5602,5604],{"class":1316,"line":1416},[1314,5594,3612],{"class":2655},[1314,5596,5543],{"class":1555},[1314,5598,1579],{"class":1331},[1314,5600,5601],{"class":1555},"conf ",[1314,5603,2656],{"class":2655},[1314,5605,5606],{"class":1555}," settings\n",[1314,5608,5609],{"class":1316,"line":1437},[1314,5610,1543],{"emptyLinePlaceholder":1104},[1314,5612,5613,5616,5620,5622,5626],{"class":1316,"line":1443},[1314,5614,5615],{"class":2801},"def",[1314,5617,5619],{"class":5618},"sljsM"," health_check",[1314,5621,2692],{"class":1331},[1314,5623,5625],{"class":5624},"sCyAa","request",[1314,5627,5628],{"class":1331},"):\n",[1314,5630,5631,5635,5639],{"class":1316,"line":1457},[1314,5632,5634],{"class":5633},"sm7ve","    \"\"\"",[1314,5636,5638],{"class":5637},"sVyVU","Basic health check endpoint",[1314,5640,5641],{"class":5633},"\"\"\"\n",[1314,5643,5644,5647],{"class":1316,"line":1488},[1314,5645,5646],{"class":2655},"    try",[1314,5648,1818],{"class":1331},[1314,5650,5651],{"class":1316,"line":1508},[1314,5652,5653],{"class":1320},"        # Database connectivity\n",[1314,5655,5656,5659,5662,5664,5667,5669,5672,5675],{"class":1316,"line":1528},[1314,5657,5658],{"class":2655},"        with",[1314,5660,5661],{"class":1555}," connection",[1314,5663,1579],{"class":1331},[1314,5665,5666],{"class":2688},"cursor",[1314,5668,5386],{"class":1331},[1314,5670,5671],{"class":2655}," as",[1314,5673,5674],{"class":1555}," cursor",[1314,5676,1818],{"class":1331},[1314,5678,5679,5682,5684,5687,5689,5691,5694,5696],{"class":1316,"line":1534},[1314,5680,5681],{"class":1555},"            cursor",[1314,5683,1579],{"class":1331},[1314,5685,5686],{"class":2688},"execute",[1314,5688,2692],{"class":1331},[1314,5690,3932],{"class":1341},[1314,5692,5693],{"class":1345},"SELECT 1",[1314,5695,3932],{"class":1341},[1314,5697,2701],{"class":1331},[1314,5699,5700],{"class":1316,"line":1540},[1314,5701,5702],{"class":1555},"        \n",[1314,5704,5705],{"class":1316,"line":1546},[1314,5706,5707],{"class":1320},"        # Cache connectivity\n",[1314,5709,5710,5713,5715,5718,5720,5722,5725,5727,5729,5731,5734,5736,5738,5741],{"class":1316,"line":1552},[1314,5711,5712],{"class":1555},"        cache",[1314,5714,1579],{"class":1331},[1314,5716,5717],{"class":2688},"set",[1314,5719,2692],{"class":1331},[1314,5721,1349],{"class":1341},[1314,5723,5724],{"class":1345},"health_check",[1314,5726,1349],{"class":1341},[1314,5728,1380],{"class":1331},[1314,5730,1383],{"class":1341},[1314,5732,5733],{"class":1345},"ok",[1314,5735,1349],{"class":1341},[1314,5737,1380],{"class":1331},[1314,5739,5740],{"class":1572}," 30",[1314,5742,2701],{"class":1331},[1314,5744,5745,5748,5751,5754,5756,5758,5760,5762,5764,5766,5768,5770,5772,5774],{"class":1316,"line":1562},[1314,5746,5747],{"class":1555},"        cache_status ",[1314,5749,5750],{"class":1331},"=",[1314,5752,5753],{"class":1555}," cache",[1314,5755,1579],{"class":1331},[1314,5757,2689],{"class":2688},[1314,5759,2692],{"class":1331},[1314,5761,1349],{"class":1341},[1314,5763,5724],{"class":1345},[1314,5765,1349],{"class":1341},[1314,5767,3940],{"class":1331},[1314,5769,5389],{"class":1568},[1314,5771,1383],{"class":1341},[1314,5773,5733],{"class":1345},[1314,5775,1810],{"class":1341},[1314,5777,5778],{"class":1316,"line":1594},[1314,5779,5702],{"class":1555},[1314,5781,5782,5785,5788],{"class":1316,"line":1616},[1314,5783,5784],{"class":2655},"        return",[1314,5786,5787],{"class":2688}," JsonResponse",[1314,5789,5790],{"class":1331},"({\n",[1314,5792,5793,5795,5798,5800,5802,5804,5807,5809],{"class":1316,"line":1621},[1314,5794,3132],{"class":1341},[1314,5796,5797],{"class":1345},"status",[1314,5799,1349],{"class":1341},[1314,5801,1352],{"class":1331},[1314,5803,1383],{"class":1341},[1314,5805,5806],{"class":1345},"healthy",[1314,5808,1349],{"class":1341},[1314,5810,1413],{"class":1331},[1314,5812,5813,5815,5817,5819,5821,5823,5826,5828],{"class":1316,"line":1626},[1314,5814,3132],{"class":1341},[1314,5816,1399],{"class":1345},[1314,5818,1349],{"class":1341},[1314,5820,1352],{"class":1331},[1314,5822,1383],{"class":1341},[1314,5824,5825],{"class":1345},"connected",[1314,5827,1349],{"class":1341},[1314,5829,1413],{"class":1331},[1314,5831,5832,5834,5837,5839,5841,5843,5845,5847,5850,5853,5856,5858,5861,5863],{"class":1316,"line":1634},[1314,5833,3132],{"class":1341},[1314,5835,5836],{"class":1345},"cache",[1314,5838,1349],{"class":1341},[1314,5840,1352],{"class":1331},[1314,5842,1383],{"class":1341},[1314,5844,5825],{"class":1345},[1314,5846,1349],{"class":1341},[1314,5848,5849],{"class":2655}," if",[1314,5851,5852],{"class":2688}," cache_status ",[1314,5854,5855],{"class":2655},"else",[1314,5857,1383],{"class":1341},[1314,5859,5860],{"class":1345},"disconnected",[1314,5862,1349],{"class":1341},[1314,5864,1413],{"class":1331},[1314,5866,5867,5869,5872,5874,5876,5879,5881,5884,5887,5890],{"class":1316,"line":1656},[1314,5868,3132],{"class":1341},[1314,5870,5871],{"class":1345},"timestamp",[1314,5873,1349],{"class":1341},[1314,5875,1352],{"class":1331},[1314,5877,5878],{"class":2688}," timezone",[1314,5880,1579],{"class":1331},[1314,5882,5883],{"class":2688},"now",[1314,5885,5886],{"class":1331},"().",[1314,5888,5889],{"class":2688},"isoformat",[1314,5891,5892],{"class":1331},"(),\n",[1314,5894,5895],{"class":1316,"line":1677},[1314,5896,5897],{"class":1331},"        })\n",[1314,5899,5900],{"class":1316,"line":1682},[1314,5901,5702],{"class":1555},[1314,5903,5904,5907,5910,5912,5915],{"class":1316,"line":1687},[1314,5905,5906],{"class":2655},"    except",[1314,5908,5909],{"class":5139}," Exception",[1314,5911,5671],{"class":2655},[1314,5913,5914],{"class":1555}," e",[1314,5916,1818],{"class":1331},[1314,5918,5919,5921,5923],{"class":1316,"line":1693},[1314,5920,5784],{"class":2655},[1314,5922,5787],{"class":2688},[1314,5924,5790],{"class":1331},[1314,5926,5927,5929,5931,5933,5935,5937,5940,5942],{"class":1316,"line":1701},[1314,5928,3132],{"class":1341},[1314,5930,5797],{"class":1345},[1314,5932,1349],{"class":1341},[1314,5934,1352],{"class":1331},[1314,5936,1383],{"class":1341},[1314,5938,5939],{"class":1345},"unhealthy",[1314,5941,1349],{"class":1341},[1314,5943,1413],{"class":1331},[1314,5945,5946,5948,5951,5953,5955,5958,5960,5963],{"class":1316,"line":1712},[1314,5947,3132],{"class":1341},[1314,5949,5950],{"class":1345},"error",[1314,5952,1349],{"class":1341},[1314,5954,1352],{"class":1331},[1314,5956,5957],{"class":5139}," str",[1314,5959,2692],{"class":1331},[1314,5961,5962],{"class":2688},"e",[1314,5964,2977],{"class":1331},[1314,5966,5967,5969,5971,5973,5975,5977,5979,5981,5983,5985],{"class":1316,"line":1729},[1314,5968,3132],{"class":1341},[1314,5970,5871],{"class":1345},[1314,5972,1349],{"class":1341},[1314,5974,1352],{"class":1331},[1314,5976,5878],{"class":2688},[1314,5978,1579],{"class":1331},[1314,5980,5883],{"class":2688},[1314,5982,5886],{"class":1331},[1314,5984,5889],{"class":2688},[1314,5986,5892],{"class":1331},[1314,5988,5989,5992,5996,5998,6001],{"class":1316,"line":1734},[1314,5990,5991],{"class":1331},"        },",[1314,5993,5995],{"class":5994},"sqOPj"," status",[1314,5997,5750],{"class":1331},[1314,5999,6000],{"class":1572},"503",[1314,6002,2701],{"class":1331},[1314,6004,6005],{"class":1316,"line":2042},[1314,6006,1543],{"emptyLinePlaceholder":1104},[1314,6008,6009,6011,6014,6016,6018],{"class":1316,"line":2049},[1314,6010,5615],{"class":2801},[1314,6012,6013],{"class":5618}," readiness_check",[1314,6015,2692],{"class":1331},[1314,6017,5625],{"class":5624},[1314,6019,5628],{"class":1331},[1314,6021,6022,6024,6027],{"class":1316,"line":2054},[1314,6023,5634],{"class":5633},[1314,6025,6026],{"class":5637},"Readiness check for load balancers",[1314,6028,5641],{"class":5633},[1314,6030,6031,6033],{"class":1316,"line":2062},[1314,6032,5646],{"class":2655},[1314,6034,1818],{"class":1331},[1314,6036,6037],{"class":1316,"line":2072},[1314,6038,6039],{"class":1320},"        # Check if application is ready to serve traffic\n",[1314,6041,6042,6045,6047],{"class":1316,"line":2079},[1314,6043,6044],{"class":1555},"        checks ",[1314,6046,5750],{"class":1331},[1314,6048,1335],{"class":1331},[1314,6050,6051,6053,6055,6057,6059,6062],{"class":1316,"line":2090},[1314,6052,3132],{"class":1341},[1314,6054,1399],{"class":1345},[1314,6056,1349],{"class":1341},[1314,6058,1352],{"class":1331},[1314,6060,6061],{"class":2688}," check_database_connection",[1314,6063,5892],{"class":1331},[1314,6065,6066,6068,6070,6072,6074,6077],{"class":1316,"line":2100},[1314,6067,3132],{"class":1341},[1314,6069,5836],{"class":1345},[1314,6071,1349],{"class":1341},[1314,6073,1352],{"class":1331},[1314,6075,6076],{"class":2688}," check_cache_connection",[1314,6078,5892],{"class":1331},[1314,6080,6081,6083,6086,6088,6090,6093],{"class":1316,"line":2111},[1314,6082,3132],{"class":1341},[1314,6084,6085],{"class":1345},"migrations",[1314,6087,1349],{"class":1341},[1314,6089,1352],{"class":1331},[1314,6091,6092],{"class":2688}," check_migrations_applied",[1314,6094,5892],{"class":1331},[1314,6096,6097,6099,6102,6104,6106,6109],{"class":1316,"line":2118},[1314,6098,3132],{"class":1341},[1314,6100,6101],{"class":1345},"static_files",[1314,6103,1349],{"class":1341},[1314,6105,1352],{"class":1331},[1314,6107,6108],{"class":2688}," check_static_files",[1314,6110,5892],{"class":1331},[1314,6112,6113],{"class":1316,"line":2126},[1314,6114,3316],{"class":1331},[1314,6116,6117],{"class":1316,"line":2133},[1314,6118,5702],{"class":1555},[1314,6120,6121,6124,6128,6130,6133,6135,6138],{"class":1316,"line":2142},[1314,6122,6123],{"class":2655},"        if",[1314,6125,6127],{"class":6126},"sJdAF"," all",[1314,6129,2692],{"class":1331},[1314,6131,6132],{"class":2688},"checks",[1314,6134,1579],{"class":1331},[1314,6136,6137],{"class":2688},"values",[1314,6139,6140],{"class":1331},"()):\n",[1314,6142,6143,6146,6148],{"class":1316,"line":2150},[1314,6144,6145],{"class":2655},"            return",[1314,6147,5787],{"class":2688},[1314,6149,5790],{"class":1331},[1314,6151,6152,6154,6156,6158,6160,6162,6165,6167],{"class":1316,"line":2166},[1314,6153,3293],{"class":1341},[1314,6155,5797],{"class":1345},[1314,6157,1349],{"class":1341},[1314,6159,1352],{"class":1331},[1314,6161,1383],{"class":1341},[1314,6163,6164],{"class":1345},"ready",[1314,6166,1349],{"class":1341},[1314,6168,1413],{"class":1331},[1314,6170,6171,6173,6175,6177,6179,6182],{"class":1316,"line":2171},[1314,6172,3293],{"class":1341},[1314,6174,6132],{"class":1345},[1314,6176,1349],{"class":1341},[1314,6178,1352],{"class":1331},[1314,6180,6181],{"class":2688}," checks",[1314,6183,1413],{"class":1331},[1314,6185,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204],{"class":1316,"line":2179},[1314,6187,3293],{"class":1341},[1314,6189,5871],{"class":1345},[1314,6191,1349],{"class":1341},[1314,6193,1352],{"class":1331},[1314,6195,5878],{"class":2688},[1314,6197,1579],{"class":1331},[1314,6199,5883],{"class":2688},[1314,6201,5886],{"class":1331},[1314,6203,5889],{"class":2688},[1314,6205,5892],{"class":1331},[1314,6207,6208],{"class":1316,"line":2187},[1314,6209,6210],{"class":1331},"            })\n",[1314,6212,6213,6216],{"class":1316,"line":2192},[1314,6214,6215],{"class":2655},"        else",[1314,6217,1818],{"class":1331},[1314,6219,6220,6222,6224],{"class":1316,"line":2200},[1314,6221,6145],{"class":2655},[1314,6223,5787],{"class":2688},[1314,6225,5790],{"class":1331},[1314,6227,6228,6230,6232,6234,6236,6238,6241,6243],{"class":1316,"line":3402},[1314,6229,3293],{"class":1341},[1314,6231,5797],{"class":1345},[1314,6233,1349],{"class":1341},[1314,6235,1352],{"class":1331},[1314,6237,1383],{"class":1341},[1314,6239,6240],{"class":1345},"not_ready",[1314,6242,1349],{"class":1341},[1314,6244,1413],{"class":1331},[1314,6246,6247,6249,6251,6253,6255,6257],{"class":1316,"line":3423},[1314,6248,3293],{"class":1341},[1314,6250,6132],{"class":1345},[1314,6252,1349],{"class":1341},[1314,6254,1352],{"class":1331},[1314,6256,6181],{"class":2688},[1314,6258,1413],{"class":1331},[1314,6260,6261,6263,6265,6267,6269,6271,6273,6275,6277,6279],{"class":1316,"line":3444},[1314,6262,3293],{"class":1341},[1314,6264,5871],{"class":1345},[1314,6266,1349],{"class":1341},[1314,6268,1352],{"class":1331},[1314,6270,5878],{"class":2688},[1314,6272,1579],{"class":1331},[1314,6274,5883],{"class":2688},[1314,6276,5886],{"class":1331},[1314,6278,5889],{"class":2688},[1314,6280,5892],{"class":1331},[1314,6282,6283,6286,6288,6290,6292],{"class":1316,"line":3465},[1314,6284,6285],{"class":1331},"            },",[1314,6287,5995],{"class":5994},[1314,6289,5750],{"class":1331},[1314,6291,6000],{"class":1572},[1314,6293,2701],{"class":1331},[1314,6295,6296],{"class":1316,"line":3486},[1314,6297,6298],{"class":1555},"            \n",[1314,6300,6301,6303,6305,6307,6309],{"class":1316,"line":3491},[1314,6302,5906],{"class":2655},[1314,6304,5909],{"class":5139},[1314,6306,5671],{"class":2655},[1314,6308,5914],{"class":1555},[1314,6310,1818],{"class":1331},[1314,6312,6313,6315,6317],{"class":1316,"line":3496},[1314,6314,5784],{"class":2655},[1314,6316,5787],{"class":2688},[1314,6318,5790],{"class":1331},[1314,6320,6321,6323,6325,6327,6329,6331,6333,6335],{"class":1316,"line":3510},[1314,6322,3132],{"class":1341},[1314,6324,5797],{"class":1345},[1314,6326,1349],{"class":1341},[1314,6328,1352],{"class":1331},[1314,6330,1383],{"class":1341},[1314,6332,5950],{"class":1345},[1314,6334,1349],{"class":1341},[1314,6336,1413],{"class":1331},[1314,6338,6339,6341,6343,6345,6347,6349,6351,6353],{"class":1316,"line":3524},[1314,6340,3132],{"class":1341},[1314,6342,5950],{"class":1345},[1314,6344,1349],{"class":1341},[1314,6346,1352],{"class":1331},[1314,6348,5957],{"class":5139},[1314,6350,2692],{"class":1331},[1314,6352,5962],{"class":2688},[1314,6354,2977],{"class":1331},[1314,6356,6357,6359,6361,6363,6365,6367,6369,6371,6373,6375],{"class":1316,"line":3545},[1314,6358,3132],{"class":1341},[1314,6360,5871],{"class":1345},[1314,6362,1349],{"class":1341},[1314,6364,1352],{"class":1331},[1314,6366,5878],{"class":2688},[1314,6368,1579],{"class":1331},[1314,6370,5883],{"class":2688},[1314,6372,5886],{"class":1331},[1314,6374,5889],{"class":2688},[1314,6376,5892],{"class":1331},[1314,6378,6379,6381,6383,6385,6387],{"class":1316,"line":3564},[1314,6380,5991],{"class":1331},[1314,6382,5995],{"class":5994},[1314,6384,5750],{"class":1331},[1314,6386,6000],{"class":1572},[1314,6388,2701],{"class":1331},[1314,6390,6391],{"class":1316,"line":3581},[1314,6392,1543],{"emptyLinePlaceholder":1104},[1314,6394,6395,6397,6400,6402,6404],{"class":1316,"line":3586},[1314,6396,5615],{"class":2801},[1314,6398,6399],{"class":5618}," metrics_endpoint",[1314,6401,2692],{"class":1331},[1314,6403,5625],{"class":5624},[1314,6405,5628],{"class":1331},[1314,6407,6408,6410,6413],{"class":1316,"line":3591},[1314,6409,5634],{"class":5633},[1314,6411,6412],{"class":5637},"Expose application metrics",[1314,6414,5641],{"class":5633},[1314,6416,6418,6420],{"class":1316,"line":6417},66,[1314,6419,5646],{"class":2655},[1314,6421,1818],{"class":1331},[1314,6423,6425],{"class":1316,"line":6424},67,[1314,6426,6427],{"class":1320},"        # System metrics\n",[1314,6429,6431,6434,6436,6439,6441,6444],{"class":1316,"line":6430},68,[1314,6432,6433],{"class":1555},"        cpu_percent ",[1314,6435,5750],{"class":1331},[1314,6437,6438],{"class":1555}," psutil",[1314,6440,1579],{"class":1331},[1314,6442,6443],{"class":2688},"cpu_percent",[1314,6445,6446],{"class":1331},"()\n",[1314,6448,6450,6453,6455,6457,6459,6462],{"class":1316,"line":6449},69,[1314,6451,6452],{"class":1555},"        memory ",[1314,6454,5750],{"class":1331},[1314,6456,6438],{"class":1555},[1314,6458,1579],{"class":1331},[1314,6460,6461],{"class":2688},"virtual_memory",[1314,6463,6446],{"class":1331},[1314,6465,6467,6470,6472,6474,6476,6479,6481,6483,6485,6487],{"class":1316,"line":6466},70,[1314,6468,6469],{"class":1555},"        disk ",[1314,6471,5750],{"class":1331},[1314,6473,6438],{"class":1555},[1314,6475,1579],{"class":1331},[1314,6477,6478],{"class":2688},"disk_usage",[1314,6480,2692],{"class":1331},[1314,6482,1349],{"class":1341},[1314,6484,1707],{"class":1345},[1314,6486,1349],{"class":1341},[1314,6488,2701],{"class":1331},[1314,6490,6492],{"class":1316,"line":6491},71,[1314,6493,5702],{"class":1555},[1314,6495,6497],{"class":1316,"line":6496},72,[1314,6498,6499],{"class":1320},"        # Application metrics\n",[1314,6501,6503,6506,6508,6511],{"class":1316,"line":6502},73,[1314,6504,6505],{"class":1555},"        active_users ",[1314,6507,5750],{"class":1331},[1314,6509,6510],{"class":2688}," get_active_user_count",[1314,6512,6446],{"class":1331},[1314,6514,6516,6519,6521,6524],{"class":1316,"line":6515},74,[1314,6517,6518],{"class":1555},"        request_count ",[1314,6520,5750],{"class":1331},[1314,6522,6523],{"class":2688}," get_request_count",[1314,6525,6446],{"class":1331},[1314,6527,6529,6532,6534,6537],{"class":1316,"line":6528},75,[1314,6530,6531],{"class":1555},"        error_rate ",[1314,6533,5750],{"class":1331},[1314,6535,6536],{"class":2688}," get_error_rate",[1314,6538,6446],{"class":1331},[1314,6540,6542],{"class":1316,"line":6541},76,[1314,6543,5702],{"class":1555},[1314,6545,6547,6549,6551],{"class":1316,"line":6546},77,[1314,6548,5784],{"class":2655},[1314,6550,5787],{"class":2688},[1314,6552,5790],{"class":1331},[1314,6554,6556,6558,6561,6563,6565],{"class":1316,"line":6555},78,[1314,6557,3132],{"class":1341},[1314,6559,6560],{"class":1345},"system",[1314,6562,1349],{"class":1341},[1314,6564,1352],{"class":1331},[1314,6566,1335],{"class":1331},[1314,6568,6570,6572,6574,6576,6578,6581],{"class":1316,"line":6569},79,[1314,6571,3293],{"class":1341},[1314,6573,6443],{"class":1345},[1314,6575,1349],{"class":1341},[1314,6577,1352],{"class":1331},[1314,6579,6580],{"class":2688}," cpu_percent",[1314,6582,1413],{"class":1331},[1314,6584,6586,6588,6591,6593,6595,6598,6600,6603],{"class":1316,"line":6585},80,[1314,6587,3293],{"class":1341},[1314,6589,6590],{"class":1345},"memory_percent",[1314,6592,1349],{"class":1341},[1314,6594,1352],{"class":1331},[1314,6596,6597],{"class":2688}," memory",[1314,6599,1579],{"class":1331},[1314,6601,6602],{"class":1582},"percent",[1314,6604,1413],{"class":1331},[1314,6606,6608,6610,6613,6615,6617,6619,6622,6624,6627,6630,6633,6635,6638,6640,6643,6646],{"class":1316,"line":6607},81,[1314,6609,3293],{"class":1341},[1314,6611,6612],{"class":1345},"disk_percent",[1314,6614,1349],{"class":1341},[1314,6616,1352],{"class":1331},[1314,6618,4835],{"class":1331},[1314,6620,6621],{"class":2688},"disk",[1314,6623,1579],{"class":1331},[1314,6625,6626],{"class":1582},"used",[1314,6628,6629],{"class":1568}," /",[1314,6631,6632],{"class":2688}," disk",[1314,6634,1579],{"class":1331},[1314,6636,6637],{"class":1582},"total",[1314,6639,3940],{"class":1331},[1314,6641,6642],{"class":1568}," *",[1314,6644,6645],{"class":1572}," 100",[1314,6647,1413],{"class":1331},[1314,6649,6651],{"class":1316,"line":6650},82,[1314,6652,3311],{"class":1331},[1314,6654,6656,6658,6661,6663,6665],{"class":1316,"line":6655},83,[1314,6657,3132],{"class":1341},[1314,6659,6660],{"class":1345},"application",[1314,6662,1349],{"class":1341},[1314,6664,1352],{"class":1331},[1314,6666,1335],{"class":1331},[1314,6668,6670,6672,6675,6677,6679,6682],{"class":1316,"line":6669},84,[1314,6671,3293],{"class":1341},[1314,6673,6674],{"class":1345},"active_users",[1314,6676,1349],{"class":1341},[1314,6678,1352],{"class":1331},[1314,6680,6681],{"class":2688}," active_users",[1314,6683,1413],{"class":1331},[1314,6685,6687,6689,6692,6694,6696,6699],{"class":1316,"line":6686},85,[1314,6688,3293],{"class":1341},[1314,6690,6691],{"class":1345},"request_count",[1314,6693,1349],{"class":1341},[1314,6695,1352],{"class":1331},[1314,6697,6698],{"class":2688}," request_count",[1314,6700,1413],{"class":1331},[1314,6702,6704,6706,6709,6711,6713,6716],{"class":1316,"line":6703},86,[1314,6705,3293],{"class":1341},[1314,6707,6708],{"class":1345},"error_rate",[1314,6710,1349],{"class":1341},[1314,6712,1352],{"class":1331},[1314,6714,6715],{"class":2688}," error_rate",[1314,6717,1413],{"class":1331},[1314,6719,6721],{"class":1316,"line":6720},87,[1314,6722,3311],{"class":1331},[1314,6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744],{"class":1316,"line":6725},88,[1314,6727,3132],{"class":1341},[1314,6729,5871],{"class":1345},[1314,6731,1349],{"class":1341},[1314,6733,1352],{"class":1331},[1314,6735,5878],{"class":2688},[1314,6737,1579],{"class":1331},[1314,6739,5883],{"class":2688},[1314,6741,5886],{"class":1331},[1314,6743,5889],{"class":2688},[1314,6745,5892],{"class":1331},[1314,6747,6749],{"class":1316,"line":6748},89,[1314,6750,5897],{"class":1331},[1314,6752,6754],{"class":1316,"line":6753},90,[1314,6755,5702],{"class":1555},[1314,6757,6759,6761,6763,6765,6767],{"class":1316,"line":6758},91,[1314,6760,5906],{"class":2655},[1314,6762,5909],{"class":5139},[1314,6764,5671],{"class":2655},[1314,6766,5914],{"class":1555},[1314,6768,1818],{"class":1331},[1314,6770,6772,6774,6776],{"class":1316,"line":6771},92,[1314,6773,5784],{"class":2655},[1314,6775,5787],{"class":2688},[1314,6777,5790],{"class":1331},[1314,6779,6781,6783,6785,6787,6789,6791,6793,6795],{"class":1316,"line":6780},93,[1314,6782,3132],{"class":1341},[1314,6784,5950],{"class":1345},[1314,6786,1349],{"class":1341},[1314,6788,1352],{"class":1331},[1314,6790,5957],{"class":5139},[1314,6792,2692],{"class":1331},[1314,6794,5962],{"class":2688},[1314,6796,2977],{"class":1331},[1314,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,6818],{"class":1316,"line":6799},94,[1314,6801,3132],{"class":1341},[1314,6803,5871],{"class":1345},[1314,6805,1349],{"class":1341},[1314,6807,1352],{"class":1331},[1314,6809,5878],{"class":2688},[1314,6811,1579],{"class":1331},[1314,6813,5883],{"class":2688},[1314,6815,5886],{"class":1331},[1314,6817,5889],{"class":2688},[1314,6819,5892],{"class":1331},[1314,6821,6823,6825,6827,6829,6832],{"class":1316,"line":6822},95,[1314,6824,5991],{"class":1331},[1314,6826,5995],{"class":5994},[1314,6828,5750],{"class":1331},[1314,6830,6831],{"class":1572},"500",[1314,6833,2701],{"class":1331},[1030,6835,6837],{"id":6836},"what-youll-learn","What You'll Learn",[1026,6839,6840],{},"This comprehensive deployment guide covers:",[1026,6842,6843,6846],{},[1045,6844,6845],{},"Production Preparation",": Configuring Django applications for production environments, including security hardening, performance optimization, and environment management.",[1026,6848,6849,6852],{},[1045,6850,6851],{},"Server Configuration",": Setting up and configuring WSGI and ASGI servers, including Gunicorn, uWSGI, Uvicorn, and Daphne for different deployment scenarios.",[1026,6854,6855,6858],{},[1045,6856,6857],{},"Linux Server Deployment",": Deploying Django applications on Linux servers with proper system configuration, service management, and security practices.",[1026,6860,6861,6864],{},[1045,6862,6863],{},"Containerization",": Using Docker for consistent deployments, including multi-stage builds, container orchestration, and production-ready Docker configurations.",[1026,6866,6867,6870],{},[1045,6868,6869],{},"Cloud Deployment",": Deploying to major cloud platforms (AWS, GCP, Azure) with platform-specific services and best practices.",[1026,6872,6873,6875],{},[1045,6874,763],{},": Implementing horizontal scaling, load balancing strategies, and auto-scaling configurations for high-traffic applications.",[1026,6877,6878,6880],{},[1045,6879,767],{},": Setting up comprehensive monitoring, logging, and alerting systems to maintain application health and performance.",[1026,6882,6883,6886],{},[1045,6884,6885],{},"Backup and Recovery",": Implementing robust backup strategies, disaster recovery procedures, and data protection measures.",[1030,6888,6890],{"id":6889},"deployment-patterns","Deployment Patterns",[1038,6892,6894],{"id":6893},"single-server-deployment","Single Server Deployment",[1026,6896,6897],{},"Perfect for small applications with moderate traffic requirements.",[1038,6899,1758],{"id":6900},"multi-server-architecture-1",[1026,6902,6903],{},"Scalable deployment with separate web, database, and cache servers.",[1038,6905,6907],{"id":6906},"microservices-deployment","Microservices Deployment",[1026,6909,6910],{},"Container-based microservices architecture with service mesh integration.",[1038,6912,6914],{"id":6913},"serverless-deployment","Serverless Deployment",[1026,6916,6917],{},"Serverless Django applications using AWS Lambda, Google Cloud Functions, or Azure Functions.",[1030,6919,6921],{"id":6920},"infrastructure-as-code","Infrastructure as Code",[1038,6923,6925],{"id":6924},"terraform-configuration","Terraform Configuration",[1073,6927,6931],{"className":6928,"code":6929,"language":6930,"meta":1082,"style":1082},"language-hcl shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# terraform/main.tf\nprovider \"aws\" {\n  region = var.aws_region\n}\n\nresource \"aws_instance\" \"web_server\" {\n  count           = var.web_server_count\n  ami             = var.ami_id\n  instance_type   = var.instance_type\n  key_name        = var.key_name\n  security_groups = [aws_security_group.web.name]\n  \n  user_data = file(\"${path.module}/user_data.sh\")\n  \n  tags = {\n    Name = \"django-web-${count.index + 1}\"\n    Environment = var.environment\n  }\n}\n\nresource \"aws_db_instance\" \"postgres\" {\n  identifier = \"django-db\"\n  engine     = \"postgres\"\n  engine_version = \"13.7\"\n  instance_class = var.db_instance_class\n  allocated_storage = var.db_allocated_storage\n  \n  db_name  = var.db_name\n  username = var.db_username\n  password = var.db_password\n  \n  vpc_security_group_ids = [aws_security_group.db.id]\n  backup_retention_period = 7\n  backup_window = \"03:00-04:00\"\n  maintenance_window = \"sun:04:00-sun:05:00\"\n  \n  skip_final_snapshot = false\n  final_snapshot_identifier = \"django-db-final-snapshot\"\n  \n  tags = {\n    Name = \"django-database\"\n    Environment = var.environment\n  }\n}\n","hcl",[1080,6932,6933,6938,6943,6948,6952,6956,6961,6966,6971,6976,6981,6986,6991,6996,7000,7005,7010,7015,7020,7024,7028,7033,7038,7043,7048,7053,7058,7062,7067,7072,7077,7081,7086,7091,7096,7101,7105,7110,7115,7119,7123,7128,7132,7136],{"__ignoreMap":1082},[1314,6934,6935],{"class":1316,"line":1317},[1314,6936,6937],{},"# terraform/main.tf\n",[1314,6939,6940],{"class":1316,"line":1324},[1314,6941,6942],{},"provider \"aws\" {\n",[1314,6944,6945],{"class":1316,"line":1338},[1314,6946,6947],{},"  region = var.aws_region\n",[1314,6949,6950],{"class":1316,"line":1357},[1314,6951,1537],{},[1314,6953,6954],{"class":1316,"line":1394},[1314,6955,1543],{"emptyLinePlaceholder":1104},[1314,6957,6958],{"class":1316,"line":1416},[1314,6959,6960],{},"resource \"aws_instance\" \"web_server\" {\n",[1314,6962,6963],{"class":1316,"line":1437},[1314,6964,6965],{},"  count           = var.web_server_count\n",[1314,6967,6968],{"class":1316,"line":1443},[1314,6969,6970],{},"  ami             = var.ami_id\n",[1314,6972,6973],{"class":1316,"line":1457},[1314,6974,6975],{},"  instance_type   = var.instance_type\n",[1314,6977,6978],{"class":1316,"line":1488},[1314,6979,6980],{},"  key_name        = var.key_name\n",[1314,6982,6983],{"class":1316,"line":1508},[1314,6984,6985],{},"  security_groups = [aws_security_group.web.name]\n",[1314,6987,6988],{"class":1316,"line":1528},[1314,6989,6990],{},"  \n",[1314,6992,6993],{"class":1316,"line":1534},[1314,6994,6995],{},"  user_data = file(\"${path.module}/user_data.sh\")\n",[1314,6997,6998],{"class":1316,"line":1540},[1314,6999,6990],{},[1314,7001,7002],{"class":1316,"line":1546},[1314,7003,7004],{},"  tags = {\n",[1314,7006,7007],{"class":1316,"line":1552},[1314,7008,7009],{},"    Name = \"django-web-${count.index + 1}\"\n",[1314,7011,7012],{"class":1316,"line":1562},[1314,7013,7014],{},"    Environment = var.environment\n",[1314,7016,7017],{"class":1316,"line":1594},[1314,7018,7019],{},"  }\n",[1314,7021,7022],{"class":1316,"line":1616},[1314,7023,1537],{},[1314,7025,7026],{"class":1316,"line":1621},[1314,7027,1543],{"emptyLinePlaceholder":1104},[1314,7029,7030],{"class":1316,"line":1626},[1314,7031,7032],{},"resource \"aws_db_instance\" \"postgres\" {\n",[1314,7034,7035],{"class":1316,"line":1634},[1314,7036,7037],{},"  identifier = \"django-db\"\n",[1314,7039,7040],{"class":1316,"line":1656},[1314,7041,7042],{},"  engine     = \"postgres\"\n",[1314,7044,7045],{"class":1316,"line":1677},[1314,7046,7047],{},"  engine_version = \"13.7\"\n",[1314,7049,7050],{"class":1316,"line":1682},[1314,7051,7052],{},"  instance_class = var.db_instance_class\n",[1314,7054,7055],{"class":1316,"line":1687},[1314,7056,7057],{},"  allocated_storage = var.db_allocated_storage\n",[1314,7059,7060],{"class":1316,"line":1693},[1314,7061,6990],{},[1314,7063,7064],{"class":1316,"line":1701},[1314,7065,7066],{},"  db_name  = var.db_name\n",[1314,7068,7069],{"class":1316,"line":1712},[1314,7070,7071],{},"  username = var.db_username\n",[1314,7073,7074],{"class":1316,"line":1729},[1314,7075,7076],{},"  password = var.db_password\n",[1314,7078,7079],{"class":1316,"line":1734},[1314,7080,6990],{},[1314,7082,7083],{"class":1316,"line":2042},[1314,7084,7085],{},"  vpc_security_group_ids = [aws_security_group.db.id]\n",[1314,7087,7088],{"class":1316,"line":2049},[1314,7089,7090],{},"  backup_retention_period = 7\n",[1314,7092,7093],{"class":1316,"line":2054},[1314,7094,7095],{},"  backup_window = \"03:00-04:00\"\n",[1314,7097,7098],{"class":1316,"line":2062},[1314,7099,7100],{},"  maintenance_window = \"sun:04:00-sun:05:00\"\n",[1314,7102,7103],{"class":1316,"line":2072},[1314,7104,6990],{},[1314,7106,7107],{"class":1316,"line":2079},[1314,7108,7109],{},"  skip_final_snapshot = false\n",[1314,7111,7112],{"class":1316,"line":2090},[1314,7113,7114],{},"  final_snapshot_identifier = \"django-db-final-snapshot\"\n",[1314,7116,7117],{"class":1316,"line":2100},[1314,7118,6990],{},[1314,7120,7121],{"class":1316,"line":2111},[1314,7122,7004],{},[1314,7124,7125],{"class":1316,"line":2118},[1314,7126,7127],{},"    Name = \"django-database\"\n",[1314,7129,7130],{"class":1316,"line":2126},[1314,7131,7014],{},[1314,7133,7134],{"class":1316,"line":2133},[1314,7135,7019],{},[1314,7137,7138],{"class":1316,"line":2142},[1314,7139,1537],{},[1038,7141,7143],{"id":7142},"ansible-playbooks","Ansible Playbooks",[1073,7145,7147],{"className":1785,"code":7146,"language":1787,"meta":1082,"style":1082},"# ansible/deploy.yml\n---\n- hosts: web_servers\n  become: yes\n  vars:\n    app_name: django_app\n    app_user: django\n    app_dir: /opt/{{ app_name }}\n    \n  tasks:\n    - name: Update system packages\n      apt:\n        update_cache: yes\n        upgrade: dist\n        \n    - name: Install required packages\n      apt:\n        name:\n          - python3\n          - python3-pip\n          - python3-venv\n          - nginx\n          - postgresql-client\n          - redis-tools\n        state: present\n        \n    - name: Create application user\n      user:\n        name: \"{{ app_user }}\"\n        system: yes\n        shell: /bin/bash\n        home: \"{{ app_dir }}\"\n        \n    - name: Create application directory\n      file:\n        path: \"{{ app_dir }}\"\n        state: directory\n        owner: \"{{ app_user }}\"\n        group: \"{{ app_user }}\"\n        mode: '0755'\n        \n    - name: Deploy application code\n      git:\n        repo: \"{{ git_repo }}\"\n        dest: \"{{ app_dir }}/src\"\n        version: \"{{ git_branch | default('main') }}\"\n      become_user: \"{{ app_user }}\"\n      notify: restart gunicorn\n      \n    - name: Install Python dependencies\n      pip:\n        requirements: \"{{ app_dir }}/src/requirements.txt\"\n        virtualenv: \"{{ app_dir }}/venv\"\n        virtualenv_python: python3\n      become_user: \"{{ app_user }}\"\n      \n    - name: Configure Gunicorn service\n      template:\n        src: gunicorn.service.j2\n        dest: /etc/systemd/system/{{ app_name }}.service\n      notify:\n        - reload systemd\n        - restart gunicorn\n        \n    - name: Configure Nginx\n      template:\n        src: nginx.conf.j2\n        dest: /etc/nginx/sites-available/{{ app_name }}\n      notify: restart nginx\n      \n    - name: Enable Nginx site\n      file:\n        src: /etc/nginx/sites-available/{{ app_name }}\n        dest: /etc/nginx/sites-enabled/{{ app_name }}\n        state: link\n      notify: restart nginx\n      \n  handlers:\n    - name: reload systemd\n      systemd:\n        daemon_reload: yes\n        \n    - name: restart gunicorn\n      systemd:\n        name: \"{{ app_name }}\"\n        state: restarted\n        enabled: yes\n        \n    - name: restart nginx\n      systemd:\n        name: nginx\n        state: restarted\n        enabled: yes\n",[1080,7148,7149,7154,7160,7172,7183,7190,7200,7209,7219,7224,7231,7243,7250,7259,7269,7273,7284,7290,7297,7305,7312,7319,7326,7333,7340,7350,7354,7365,7372,7385,7394,7404,7418,7422,7433,7440,7453,7462,7475,7488,7502,7506,7517,7524,7538,7552,7566,7579,7589,7594,7605,7612,7626,7640,7649,7661,7665,7676,7683,7693,7702,7708,7715,7721,7725,7736,7742,7751,7760,7769,7773,7784,7790,7798,7807,7816,7824,7828,7835,7845,7852,7861,7865,7875,7881,7894,7903,7912,7916,7926,7932,7940,7948],{"__ignoreMap":1082},[1314,7150,7151],{"class":1316,"line":1317},[1314,7152,7153],{"class":1320},"# ansible/deploy.yml\n",[1314,7155,7156],{"class":1316,"line":1324},[1314,7157,7159],{"class":7158},"sYn-s","---\n",[1314,7161,7162,7164,7167,7169],{"class":1316,"line":1338},[1314,7163,1569],{"class":1331},[1314,7165,7166],{"class":1799}," hosts",[1314,7168,1352],{"class":1331},[1314,7170,7171],{"class":1345}," web_servers\n",[1314,7173,7174,7177,7179],{"class":1316,"line":1357},[1314,7175,7176],{"class":1799},"  become",[1314,7178,1352],{"class":1331},[1314,7180,7182],{"class":7181},"sq3J1"," yes\n",[1314,7184,7185,7188],{"class":1316,"line":1394},[1314,7186,7187],{"class":1799},"  vars",[1314,7189,1818],{"class":1331},[1314,7191,7192,7195,7197],{"class":1316,"line":1416},[1314,7193,7194],{"class":1799},"    app_name",[1314,7196,1352],{"class":1331},[1314,7198,7199],{"class":1345}," django_app\n",[1314,7201,7202,7205,7207],{"class":1316,"line":1437},[1314,7203,7204],{"class":1799},"    app_user",[1314,7206,1352],{"class":1331},[1314,7208,2351],{"class":1345},[1314,7210,7211,7214,7216],{"class":1316,"line":1443},[1314,7212,7213],{"class":1799},"    app_dir",[1314,7215,1352],{"class":1331},[1314,7217,7218],{"class":1345}," /opt/{{ app_name }}\n",[1314,7220,7221],{"class":1316,"line":1457},[1314,7222,7223],{"class":1555},"    \n",[1314,7225,7226,7229],{"class":1316,"line":1488},[1314,7227,7228],{"class":1799},"  tasks",[1314,7230,1818],{"class":1331},[1314,7232,7233,7236,7238,7240],{"class":1316,"line":1508},[1314,7234,7235],{"class":1331},"    -",[1314,7237,2346],{"class":1799},[1314,7239,1352],{"class":1331},[1314,7241,7242],{"class":1345}," Update system packages\n",[1314,7244,7245,7248],{"class":1316,"line":1528},[1314,7246,7247],{"class":1799},"      apt",[1314,7249,1818],{"class":1331},[1314,7251,7252,7255,7257],{"class":1316,"line":1534},[1314,7253,7254],{"class":1799},"        update_cache",[1314,7256,1352],{"class":1331},[1314,7258,7182],{"class":7181},[1314,7260,7261,7264,7266],{"class":1316,"line":1540},[1314,7262,7263],{"class":1799},"        upgrade",[1314,7265,1352],{"class":1331},[1314,7267,7268],{"class":1345}," dist\n",[1314,7270,7271],{"class":1316,"line":1546},[1314,7272,5702],{"class":1555},[1314,7274,7275,7277,7279,7281],{"class":1316,"line":1552},[1314,7276,7235],{"class":1331},[1314,7278,2346],{"class":1799},[1314,7280,1352],{"class":1331},[1314,7282,7283],{"class":1345}," Install required packages\n",[1314,7285,7286,7288],{"class":1316,"line":1562},[1314,7287,7247],{"class":1799},[1314,7289,1818],{"class":1331},[1314,7291,7292,7295],{"class":1316,"line":1594},[1314,7293,7294],{"class":1799},"        name",[1314,7296,1818],{"class":1331},[1314,7298,7299,7302],{"class":1316,"line":1616},[1314,7300,7301],{"class":1331},"          -",[1314,7303,7304],{"class":1345}," python3\n",[1314,7306,7307,7309],{"class":1316,"line":1621},[1314,7308,7301],{"class":1331},[1314,7310,7311],{"class":1345}," python3-pip\n",[1314,7313,7314,7316],{"class":1316,"line":1626},[1314,7315,7301],{"class":1331},[1314,7317,7318],{"class":1345}," python3-venv\n",[1314,7320,7321,7323],{"class":1316,"line":1634},[1314,7322,7301],{"class":1331},[1314,7324,7325],{"class":1345}," nginx\n",[1314,7327,7328,7330],{"class":1316,"line":1656},[1314,7329,7301],{"class":1331},[1314,7331,7332],{"class":1345}," postgresql-client\n",[1314,7334,7335,7337],{"class":1316,"line":1677},[1314,7336,7301],{"class":1331},[1314,7338,7339],{"class":1345}," redis-tools\n",[1314,7341,7342,7345,7347],{"class":1316,"line":1682},[1314,7343,7344],{"class":1799},"        state",[1314,7346,1352],{"class":1331},[1314,7348,7349],{"class":1345}," present\n",[1314,7351,7352],{"class":1316,"line":1687},[1314,7353,5702],{"class":1555},[1314,7355,7356,7358,7360,7362],{"class":1316,"line":1693},[1314,7357,7235],{"class":1331},[1314,7359,2346],{"class":1799},[1314,7361,1352],{"class":1331},[1314,7363,7364],{"class":1345}," Create application user\n",[1314,7366,7367,7370],{"class":1316,"line":1701},[1314,7368,7369],{"class":1799},"      user",[1314,7371,1818],{"class":1331},[1314,7373,7374,7376,7378,7380,7383],{"class":1316,"line":1712},[1314,7375,7294],{"class":1799},[1314,7377,1352],{"class":1331},[1314,7379,1980],{"class":1341},[1314,7381,7382],{"class":1345},"{{ app_user }}",[1314,7384,1986],{"class":1341},[1314,7386,7387,7390,7392],{"class":1316,"line":1729},[1314,7388,7389],{"class":1799},"        system",[1314,7391,1352],{"class":1331},[1314,7393,7182],{"class":7181},[1314,7395,7396,7399,7401],{"class":1316,"line":1734},[1314,7397,7398],{"class":1799},"        shell",[1314,7400,1352],{"class":1331},[1314,7402,7403],{"class":1345}," /bin/bash\n",[1314,7405,7406,7409,7411,7413,7416],{"class":1316,"line":2042},[1314,7407,7408],{"class":1799},"        home",[1314,7410,1352],{"class":1331},[1314,7412,1980],{"class":1341},[1314,7414,7415],{"class":1345},"{{ app_dir }}",[1314,7417,1986],{"class":1341},[1314,7419,7420],{"class":1316,"line":2049},[1314,7421,5702],{"class":1555},[1314,7423,7424,7426,7428,7430],{"class":1316,"line":2054},[1314,7425,7235],{"class":1331},[1314,7427,2346],{"class":1799},[1314,7429,1352],{"class":1331},[1314,7431,7432],{"class":1345}," Create application directory\n",[1314,7434,7435,7438],{"class":1316,"line":2062},[1314,7436,7437],{"class":1799},"      file",[1314,7439,1818],{"class":1331},[1314,7441,7442,7445,7447,7449,7451],{"class":1316,"line":2072},[1314,7443,7444],{"class":1799},"        path",[1314,7446,1352],{"class":1331},[1314,7448,1980],{"class":1341},[1314,7450,7415],{"class":1345},[1314,7452,1986],{"class":1341},[1314,7454,7455,7457,7459],{"class":1316,"line":2079},[1314,7456,7344],{"class":1799},[1314,7458,1352],{"class":1331},[1314,7460,7461],{"class":1345}," directory\n",[1314,7463,7464,7467,7469,7471,7473],{"class":1316,"line":2090},[1314,7465,7466],{"class":1799},"        owner",[1314,7468,1352],{"class":1331},[1314,7470,1980],{"class":1341},[1314,7472,7382],{"class":1345},[1314,7474,1986],{"class":1341},[1314,7476,7477,7480,7482,7484,7486],{"class":1316,"line":2100},[1314,7478,7479],{"class":1799},"        group",[1314,7481,1352],{"class":1331},[1314,7483,1980],{"class":1341},[1314,7485,7382],{"class":1345},[1314,7487,1986],{"class":1341},[1314,7489,7490,7493,7495,7497,7500],{"class":1316,"line":2111},[1314,7491,7492],{"class":1799},"        mode",[1314,7494,1352],{"class":1331},[1314,7496,1383],{"class":1341},[1314,7498,7499],{"class":1345},"0755",[1314,7501,1810],{"class":1341},[1314,7503,7504],{"class":1316,"line":2118},[1314,7505,5702],{"class":1555},[1314,7507,7508,7510,7512,7514],{"class":1316,"line":2126},[1314,7509,7235],{"class":1331},[1314,7511,2346],{"class":1799},[1314,7513,1352],{"class":1331},[1314,7515,7516],{"class":1345}," Deploy application code\n",[1314,7518,7519,7522],{"class":1316,"line":2133},[1314,7520,7521],{"class":1799},"      git",[1314,7523,1818],{"class":1331},[1314,7525,7526,7529,7531,7533,7536],{"class":1316,"line":2142},[1314,7527,7528],{"class":1799},"        repo",[1314,7530,1352],{"class":1331},[1314,7532,1980],{"class":1341},[1314,7534,7535],{"class":1345},"{{ git_repo }}",[1314,7537,1986],{"class":1341},[1314,7539,7540,7543,7545,7547,7550],{"class":1316,"line":2150},[1314,7541,7542],{"class":1799},"        dest",[1314,7544,1352],{"class":1331},[1314,7546,1980],{"class":1341},[1314,7548,7549],{"class":1345},"{{ app_dir }}/src",[1314,7551,1986],{"class":1341},[1314,7553,7554,7557,7559,7561,7564],{"class":1316,"line":2166},[1314,7555,7556],{"class":1799},"        version",[1314,7558,1352],{"class":1331},[1314,7560,1980],{"class":1341},[1314,7562,7563],{"class":1345},"{{ git_branch | default('main') }}",[1314,7565,1986],{"class":1341},[1314,7567,7568,7571,7573,7575,7577],{"class":1316,"line":2171},[1314,7569,7570],{"class":1799},"      become_user",[1314,7572,1352],{"class":1331},[1314,7574,1980],{"class":1341},[1314,7576,7382],{"class":1345},[1314,7578,1986],{"class":1341},[1314,7580,7581,7584,7586],{"class":1316,"line":2179},[1314,7582,7583],{"class":1799},"      notify",[1314,7585,1352],{"class":1331},[1314,7587,7588],{"class":1345}," restart gunicorn\n",[1314,7590,7591],{"class":1316,"line":2187},[1314,7592,7593],{"class":1555},"      \n",[1314,7595,7596,7598,7600,7602],{"class":1316,"line":2192},[1314,7597,7235],{"class":1331},[1314,7599,2346],{"class":1799},[1314,7601,1352],{"class":1331},[1314,7603,7604],{"class":1345}," Install Python dependencies\n",[1314,7606,7607,7610],{"class":1316,"line":2200},[1314,7608,7609],{"class":1799},"      pip",[1314,7611,1818],{"class":1331},[1314,7613,7614,7617,7619,7621,7624],{"class":1316,"line":3402},[1314,7615,7616],{"class":1799},"        requirements",[1314,7618,1352],{"class":1331},[1314,7620,1980],{"class":1341},[1314,7622,7623],{"class":1345},"{{ app_dir }}/src/requirements.txt",[1314,7625,1986],{"class":1341},[1314,7627,7628,7631,7633,7635,7638],{"class":1316,"line":3423},[1314,7629,7630],{"class":1799},"        virtualenv",[1314,7632,1352],{"class":1331},[1314,7634,1980],{"class":1341},[1314,7636,7637],{"class":1345},"{{ app_dir }}/venv",[1314,7639,1986],{"class":1341},[1314,7641,7642,7645,7647],{"class":1316,"line":3444},[1314,7643,7644],{"class":1799},"        virtualenv_python",[1314,7646,1352],{"class":1331},[1314,7648,7304],{"class":1345},[1314,7650,7651,7653,7655,7657,7659],{"class":1316,"line":3465},[1314,7652,7570],{"class":1799},[1314,7654,1352],{"class":1331},[1314,7656,1980],{"class":1341},[1314,7658,7382],{"class":1345},[1314,7660,1986],{"class":1341},[1314,7662,7663],{"class":1316,"line":3486},[1314,7664,7593],{"class":1555},[1314,7666,7667,7669,7671,7673],{"class":1316,"line":3491},[1314,7668,7235],{"class":1331},[1314,7670,2346],{"class":1799},[1314,7672,1352],{"class":1331},[1314,7674,7675],{"class":1345}," Configure Gunicorn service\n",[1314,7677,7678,7681],{"class":1316,"line":3496},[1314,7679,7680],{"class":1799},"      template",[1314,7682,1818],{"class":1331},[1314,7684,7685,7688,7690],{"class":1316,"line":3510},[1314,7686,7687],{"class":1799},"        src",[1314,7689,1352],{"class":1331},[1314,7691,7692],{"class":1345}," gunicorn.service.j2\n",[1314,7694,7695,7697,7699],{"class":1316,"line":3524},[1314,7696,7542],{"class":1799},[1314,7698,1352],{"class":1331},[1314,7700,7701],{"class":1345}," /etc/systemd/system/{{ app_name }}.service\n",[1314,7703,7704,7706],{"class":1316,"line":3545},[1314,7705,7583],{"class":1799},[1314,7707,1818],{"class":1331},[1314,7709,7710,7712],{"class":1316,"line":3564},[1314,7711,2372],{"class":1331},[1314,7713,7714],{"class":1345}," reload systemd\n",[1314,7716,7717,7719],{"class":1316,"line":3581},[1314,7718,2372],{"class":1331},[1314,7720,7588],{"class":1345},[1314,7722,7723],{"class":1316,"line":3586},[1314,7724,5702],{"class":1555},[1314,7726,7727,7729,7731,7733],{"class":1316,"line":3591},[1314,7728,7235],{"class":1331},[1314,7730,2346],{"class":1799},[1314,7732,1352],{"class":1331},[1314,7734,7735],{"class":1345}," Configure Nginx\n",[1314,7737,7738,7740],{"class":1316,"line":6417},[1314,7739,7680],{"class":1799},[1314,7741,1818],{"class":1331},[1314,7743,7744,7746,7748],{"class":1316,"line":6424},[1314,7745,7687],{"class":1799},[1314,7747,1352],{"class":1331},[1314,7749,7750],{"class":1345}," nginx.conf.j2\n",[1314,7752,7753,7755,7757],{"class":1316,"line":6430},[1314,7754,7542],{"class":1799},[1314,7756,1352],{"class":1331},[1314,7758,7759],{"class":1345}," /etc/nginx/sites-available/{{ app_name }}\n",[1314,7761,7762,7764,7766],{"class":1316,"line":6449},[1314,7763,7583],{"class":1799},[1314,7765,1352],{"class":1331},[1314,7767,7768],{"class":1345}," restart nginx\n",[1314,7770,7771],{"class":1316,"line":6466},[1314,7772,7593],{"class":1555},[1314,7774,7775,7777,7779,7781],{"class":1316,"line":6491},[1314,7776,7235],{"class":1331},[1314,7778,2346],{"class":1799},[1314,7780,1352],{"class":1331},[1314,7782,7783],{"class":1345}," Enable Nginx site\n",[1314,7785,7786,7788],{"class":1316,"line":6496},[1314,7787,7437],{"class":1799},[1314,7789,1818],{"class":1331},[1314,7791,7792,7794,7796],{"class":1316,"line":6502},[1314,7793,7687],{"class":1799},[1314,7795,1352],{"class":1331},[1314,7797,7759],{"class":1345},[1314,7799,7800,7802,7804],{"class":1316,"line":6515},[1314,7801,7542],{"class":1799},[1314,7803,1352],{"class":1331},[1314,7805,7806],{"class":1345}," /etc/nginx/sites-enabled/{{ app_name }}\n",[1314,7808,7809,7811,7813],{"class":1316,"line":6528},[1314,7810,7344],{"class":1799},[1314,7812,1352],{"class":1331},[1314,7814,7815],{"class":1345}," link\n",[1314,7817,7818,7820,7822],{"class":1316,"line":6541},[1314,7819,7583],{"class":1799},[1314,7821,1352],{"class":1331},[1314,7823,7768],{"class":1345},[1314,7825,7826],{"class":1316,"line":6546},[1314,7827,7593],{"class":1555},[1314,7829,7830,7833],{"class":1316,"line":6555},[1314,7831,7832],{"class":1799},"  handlers",[1314,7834,1818],{"class":1331},[1314,7836,7837,7839,7841,7843],{"class":1316,"line":6569},[1314,7838,7235],{"class":1331},[1314,7840,2346],{"class":1799},[1314,7842,1352],{"class":1331},[1314,7844,7714],{"class":1345},[1314,7846,7847,7850],{"class":1316,"line":6585},[1314,7848,7849],{"class":1799},"      systemd",[1314,7851,1818],{"class":1331},[1314,7853,7854,7857,7859],{"class":1316,"line":6607},[1314,7855,7856],{"class":1799},"        daemon_reload",[1314,7858,1352],{"class":1331},[1314,7860,7182],{"class":7181},[1314,7862,7863],{"class":1316,"line":6650},[1314,7864,5702],{"class":1555},[1314,7866,7867,7869,7871,7873],{"class":1316,"line":6655},[1314,7868,7235],{"class":1331},[1314,7870,2346],{"class":1799},[1314,7872,1352],{"class":1331},[1314,7874,7588],{"class":1345},[1314,7876,7877,7879],{"class":1316,"line":6669},[1314,7878,7849],{"class":1799},[1314,7880,1818],{"class":1331},[1314,7882,7883,7885,7887,7889,7892],{"class":1316,"line":6686},[1314,7884,7294],{"class":1799},[1314,7886,1352],{"class":1331},[1314,7888,1980],{"class":1341},[1314,7890,7891],{"class":1345},"{{ app_name }}",[1314,7893,1986],{"class":1341},[1314,7895,7896,7898,7900],{"class":1316,"line":6703},[1314,7897,7344],{"class":1799},[1314,7899,1352],{"class":1331},[1314,7901,7902],{"class":1345}," restarted\n",[1314,7904,7905,7908,7910],{"class":1316,"line":6720},[1314,7906,7907],{"class":1799},"        enabled",[1314,7909,1352],{"class":1331},[1314,7911,7182],{"class":7181},[1314,7913,7914],{"class":1316,"line":6725},[1314,7915,5702],{"class":1555},[1314,7917,7918,7920,7922,7924],{"class":1316,"line":6748},[1314,7919,7235],{"class":1331},[1314,7921,2346],{"class":1799},[1314,7923,1352],{"class":1331},[1314,7925,7768],{"class":1345},[1314,7927,7928,7930],{"class":1316,"line":6753},[1314,7929,7849],{"class":1799},[1314,7931,1818],{"class":1331},[1314,7933,7934,7936,7938],{"class":1316,"line":6758},[1314,7935,7294],{"class":1799},[1314,7937,1352],{"class":1331},[1314,7939,7325],{"class":1345},[1314,7941,7942,7944,7946],{"class":1316,"line":6771},[1314,7943,7344],{"class":1799},[1314,7945,1352],{"class":1331},[1314,7947,7902],{"class":1345},[1314,7949,7950,7952,7954],{"class":1316,"line":6780},[1314,7951,7907],{"class":1799},[1314,7953,1352],{"class":1331},[1314,7955,7182],{"class":7181},[1030,7957,7959],{"id":7958},"continuous-integrationcontinuous-deployment","Continuous Integration/Continuous Deployment",[1038,7961,7963],{"id":7962},"github-actions-workflow","GitHub Actions Workflow",[1073,7965,7967],{"className":1785,"code":7966,"language":1787,"meta":1082,"style":1082},"# .github/workflows/deploy.yml\nname: Deploy to Production\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    \n    services:\n      postgres:\n        image: postgres:13\n        env:\n          POSTGRES_PASSWORD: postgres\n        options: >-\n          --health-cmd pg_isready\n          --health-interval 10s\n          --health-timeout 5s\n          --health-retries 5\n          \n    steps:\n    - uses: actions/checkout@v3\n    \n    - name: Set up Python\n      uses: actions/setup-python@v4\n      with:\n        python-version: '3.9'\n        \n    - name: Install dependencies\n      run: |\n        python -m pip install --upgrade pip\n        pip install -r requirements.txt\n        \n    - name: Run tests\n      run: |\n        python manage.py test\n      env:\n        DATABASE_URL: postgres://postgres:postgres@localhost:5432/test_db\n        \n    - name: Run security checks\n      run: |\n        pip install bandit safety\n        bandit -r .\n        safety check\n        \n  deploy:\n    needs: test\n    runs-on: ubuntu-latest\n    if: github.ref == 'refs/heads/main'\n    \n    steps:\n    - uses: actions/checkout@v3\n    \n    - name: Deploy to production\n      uses: appleboy/ssh-action@v0.1.5\n      with:\n        host: ${{ secrets.PRODUCTION_HOST }}\n        username: ${{ secrets.PRODUCTION_USER }}\n        key: ${{ secrets.PRODUCTION_SSH_KEY }}\n        script: |\n          cd /opt/django_app\n          git pull origin main\n          source venv/bin/activate\n          pip install -r requirements.txt\n          python manage.py migrate\n          python manage.py collectstatic --noinput\n          sudo systemctl restart django_app\n          sudo systemctl restart nginx\n",[1080,7968,7969,7974,7984,7988,7995,8002,8016,8023,8035,8039,8046,8053,8063,8067,8074,8081,8089,8095,8105,8118,8123,8128,8133,8138,8143,8150,8162,8166,8177,8187,8194,8208,8212,8223,8233,8238,8243,8247,8258,8266,8271,8278,8288,8292,8303,8311,8316,8321,8326,8330,8337,8347,8355,8365,8369,8375,8385,8389,8400,8409,8415,8425,8435,8445,8454,8459,8464,8469,8474,8479,8484,8489],{"__ignoreMap":1082},[1314,7970,7971],{"class":1316,"line":1317},[1314,7972,7973],{"class":1320},"# .github/workflows/deploy.yml\n",[1314,7975,7976,7979,7981],{"class":1316,"line":1324},[1314,7977,7978],{"class":1799},"name",[1314,7980,1352],{"class":1331},[1314,7982,7983],{"class":1345}," Deploy to Production\n",[1314,7985,7986],{"class":1316,"line":1338},[1314,7987,1543],{"emptyLinePlaceholder":1104},[1314,7989,7990,7993],{"class":1316,"line":1357},[1314,7991,7992],{"class":7181},"on",[1314,7994,1818],{"class":1331},[1314,7996,7997,8000],{"class":1316,"line":1394},[1314,7998,7999],{"class":1799},"  push",[1314,8001,1818],{"class":1331},[1314,8003,8004,8007,8009,8011,8014],{"class":1316,"line":1416},[1314,8005,8006],{"class":1799},"    branches",[1314,8008,1352],{"class":1331},[1314,8010,1370],{"class":1331},[1314,8012,8013],{"class":1345},"main",[1314,8015,2163],{"class":1331},[1314,8017,8018,8021],{"class":1316,"line":1437},[1314,8019,8020],{"class":1799},"  pull_request",[1314,8022,1818],{"class":1331},[1314,8024,8025,8027,8029,8031,8033],{"class":1316,"line":1443},[1314,8026,8006],{"class":1799},[1314,8028,1352],{"class":1331},[1314,8030,1370],{"class":1331},[1314,8032,8013],{"class":1345},[1314,8034,2163],{"class":1331},[1314,8036,8037],{"class":1316,"line":1457},[1314,8038,1543],{"emptyLinePlaceholder":1104},[1314,8040,8041,8044],{"class":1316,"line":1488},[1314,8042,8043],{"class":1799},"jobs",[1314,8045,1818],{"class":1331},[1314,8047,8048,8051],{"class":1316,"line":1508},[1314,8049,8050],{"class":1799},"  test",[1314,8052,1818],{"class":1331},[1314,8054,8055,8058,8060],{"class":1316,"line":1528},[1314,8056,8057],{"class":1799},"    runs-on",[1314,8059,1352],{"class":1331},[1314,8061,8062],{"class":1345}," ubuntu-latest\n",[1314,8064,8065],{"class":1316,"line":1534},[1314,8066,7223],{"class":1555},[1314,8068,8069,8072],{"class":1316,"line":1540},[1314,8070,8071],{"class":1799},"    services",[1314,8073,1818],{"class":1331},[1314,8075,8076,8079],{"class":1316,"line":1546},[1314,8077,8078],{"class":1799},"      postgres",[1314,8080,1818],{"class":1331},[1314,8082,8083,8085,8087],{"class":1316,"line":1552},[1314,8084,2356],{"class":1799},[1314,8086,1352],{"class":1331},[1314,8088,2069],{"class":1345},[1314,8090,8091,8093],{"class":1316,"line":1562},[1314,8092,2385],{"class":1799},[1314,8094,1818],{"class":1331},[1314,8096,8097,8100,8102],{"class":1316,"line":1594},[1314,8098,8099],{"class":1799},"          POSTGRES_PASSWORD",[1314,8101,1352],{"class":1331},[1314,8103,8104],{"class":1345}," postgres\n",[1314,8106,8107,8110,8112,8115],{"class":1316,"line":1616},[1314,8108,8109],{"class":1799},"        options",[1314,8111,1352],{"class":1331},[1314,8113,8114],{"class":2655}," >",[1314,8116,8117],{"class":2801},"-\n",[1314,8119,8120],{"class":1316,"line":1621},[1314,8121,8122],{"class":1345},"          --health-cmd pg_isready\n",[1314,8124,8125],{"class":1316,"line":1626},[1314,8126,8127],{"class":1345},"          --health-interval 10s\n",[1314,8129,8130],{"class":1316,"line":1634},[1314,8131,8132],{"class":1345},"          --health-timeout 5s\n",[1314,8134,8135],{"class":1316,"line":1656},[1314,8136,8137],{"class":1345},"          --health-retries 5\n",[1314,8139,8140],{"class":1316,"line":1677},[1314,8141,8142],{"class":1345},"          \n",[1314,8144,8145,8148],{"class":1316,"line":1682},[1314,8146,8147],{"class":1799},"    steps",[1314,8149,1818],{"class":1331},[1314,8151,8152,8154,8157,8159],{"class":1316,"line":1687},[1314,8153,7235],{"class":1331},[1314,8155,8156],{"class":1799}," uses",[1314,8158,1352],{"class":1331},[1314,8160,8161],{"class":1345}," actions/checkout@v3\n",[1314,8163,8164],{"class":1316,"line":1693},[1314,8165,7223],{"class":1555},[1314,8167,8168,8170,8172,8174],{"class":1316,"line":1701},[1314,8169,7235],{"class":1331},[1314,8171,2346],{"class":1799},[1314,8173,1352],{"class":1331},[1314,8175,8176],{"class":1345}," Set up Python\n",[1314,8178,8179,8182,8184],{"class":1316,"line":1712},[1314,8180,8181],{"class":1799},"      uses",[1314,8183,1352],{"class":1331},[1314,8185,8186],{"class":1345}," actions/setup-python@v4\n",[1314,8188,8189,8192],{"class":1316,"line":1729},[1314,8190,8191],{"class":1799},"      with",[1314,8193,1818],{"class":1331},[1314,8195,8196,8199,8201,8203,8206],{"class":1316,"line":1734},[1314,8197,8198],{"class":1799},"        python-version",[1314,8200,1352],{"class":1331},[1314,8202,1383],{"class":1341},[1314,8204,8205],{"class":1345},"3.9",[1314,8207,1810],{"class":1341},[1314,8209,8210],{"class":1316,"line":2042},[1314,8211,5702],{"class":1555},[1314,8213,8214,8216,8218,8220],{"class":1316,"line":2049},[1314,8215,7235],{"class":1331},[1314,8217,2346],{"class":1799},[1314,8219,1352],{"class":1331},[1314,8221,8222],{"class":1345}," Install dependencies\n",[1314,8224,8225,8228,8230],{"class":1316,"line":2054},[1314,8226,8227],{"class":1799},"      run",[1314,8229,1352],{"class":1331},[1314,8231,8232],{"class":2655}," |\n",[1314,8234,8235],{"class":1316,"line":2062},[1314,8236,8237],{"class":1345},"        python -m pip install --upgrade pip\n",[1314,8239,8240],{"class":1316,"line":2072},[1314,8241,8242],{"class":1345},"        pip install -r requirements.txt\n",[1314,8244,8245],{"class":1316,"line":2079},[1314,8246,5702],{"class":1345},[1314,8248,8249,8251,8253,8255],{"class":1316,"line":2090},[1314,8250,7235],{"class":1331},[1314,8252,2346],{"class":1799},[1314,8254,1352],{"class":1331},[1314,8256,8257],{"class":1345}," Run tests\n",[1314,8259,8260,8262,8264],{"class":1316,"line":2100},[1314,8261,8227],{"class":1799},[1314,8263,1352],{"class":1331},[1314,8265,8232],{"class":2655},[1314,8267,8268],{"class":1316,"line":2111},[1314,8269,8270],{"class":1345},"        python manage.py test\n",[1314,8272,8273,8276],{"class":1316,"line":2118},[1314,8274,8275],{"class":1799},"      env",[1314,8277,1818],{"class":1331},[1314,8279,8280,8283,8285],{"class":1316,"line":2126},[1314,8281,8282],{"class":1799},"        DATABASE_URL",[1314,8284,1352],{"class":1331},[1314,8286,8287],{"class":1345}," postgres://postgres:postgres@localhost:5432/test_db\n",[1314,8289,8290],{"class":1316,"line":2133},[1314,8291,5702],{"class":1555},[1314,8293,8294,8296,8298,8300],{"class":1316,"line":2142},[1314,8295,7235],{"class":1331},[1314,8297,2346],{"class":1799},[1314,8299,1352],{"class":1331},[1314,8301,8302],{"class":1345}," Run security checks\n",[1314,8304,8305,8307,8309],{"class":1316,"line":2150},[1314,8306,8227],{"class":1799},[1314,8308,1352],{"class":1331},[1314,8310,8232],{"class":2655},[1314,8312,8313],{"class":1316,"line":2166},[1314,8314,8315],{"class":1345},"        pip install bandit safety\n",[1314,8317,8318],{"class":1316,"line":2171},[1314,8319,8320],{"class":1345},"        bandit -r .\n",[1314,8322,8323],{"class":1316,"line":2179},[1314,8324,8325],{"class":1345},"        safety check\n",[1314,8327,8328],{"class":1316,"line":2187},[1314,8329,5702],{"class":1345},[1314,8331,8332,8335],{"class":1316,"line":2192},[1314,8333,8334],{"class":1799},"  deploy",[1314,8336,1818],{"class":1331},[1314,8338,8339,8342,8344],{"class":1316,"line":2200},[1314,8340,8341],{"class":1799},"    needs",[1314,8343,1352],{"class":1331},[1314,8345,8346],{"class":1345}," test\n",[1314,8348,8349,8351,8353],{"class":1316,"line":3402},[1314,8350,8057],{"class":1799},[1314,8352,1352],{"class":1331},[1314,8354,8062],{"class":1345},[1314,8356,8357,8360,8362],{"class":1316,"line":3423},[1314,8358,8359],{"class":1799},"    if",[1314,8361,1352],{"class":1331},[1314,8363,8364],{"class":1345}," github.ref == 'refs/heads/main'\n",[1314,8366,8367],{"class":1316,"line":3444},[1314,8368,7223],{"class":1555},[1314,8370,8371,8373],{"class":1316,"line":3465},[1314,8372,8147],{"class":1799},[1314,8374,1818],{"class":1331},[1314,8376,8377,8379,8381,8383],{"class":1316,"line":3486},[1314,8378,7235],{"class":1331},[1314,8380,8156],{"class":1799},[1314,8382,1352],{"class":1331},[1314,8384,8161],{"class":1345},[1314,8386,8387],{"class":1316,"line":3491},[1314,8388,7223],{"class":1555},[1314,8390,8391,8393,8395,8397],{"class":1316,"line":3496},[1314,8392,7235],{"class":1331},[1314,8394,2346],{"class":1799},[1314,8396,1352],{"class":1331},[1314,8398,8399],{"class":1345}," Deploy to production\n",[1314,8401,8402,8404,8406],{"class":1316,"line":3510},[1314,8403,8181],{"class":1799},[1314,8405,1352],{"class":1331},[1314,8407,8408],{"class":1345}," appleboy/ssh-action@v0.1.5\n",[1314,8410,8411,8413],{"class":1316,"line":3524},[1314,8412,8191],{"class":1799},[1314,8414,1818],{"class":1331},[1314,8416,8417,8420,8422],{"class":1316,"line":3545},[1314,8418,8419],{"class":1799},"        host",[1314,8421,1352],{"class":1331},[1314,8423,8424],{"class":1345}," ${{ secrets.PRODUCTION_HOST }}\n",[1314,8426,8427,8430,8432],{"class":1316,"line":3564},[1314,8428,8429],{"class":1799},"        username",[1314,8431,1352],{"class":1331},[1314,8433,8434],{"class":1345}," ${{ secrets.PRODUCTION_USER }}\n",[1314,8436,8437,8440,8442],{"class":1316,"line":3581},[1314,8438,8439],{"class":1799},"        key",[1314,8441,1352],{"class":1331},[1314,8443,8444],{"class":1345}," ${{ secrets.PRODUCTION_SSH_KEY }}\n",[1314,8446,8447,8450,8452],{"class":1316,"line":3586},[1314,8448,8449],{"class":1799},"        script",[1314,8451,1352],{"class":1331},[1314,8453,8232],{"class":2655},[1314,8455,8456],{"class":1316,"line":3591},[1314,8457,8458],{"class":1345},"          cd /opt/django_app\n",[1314,8460,8461],{"class":1316,"line":6417},[1314,8462,8463],{"class":1345},"          git pull origin main\n",[1314,8465,8466],{"class":1316,"line":6424},[1314,8467,8468],{"class":1345},"          source venv/bin/activate\n",[1314,8470,8471],{"class":1316,"line":6430},[1314,8472,8473],{"class":1345},"          pip install -r requirements.txt\n",[1314,8475,8476],{"class":1316,"line":6449},[1314,8477,8478],{"class":1345},"          python manage.py migrate\n",[1314,8480,8481],{"class":1316,"line":6466},[1314,8482,8483],{"class":1345},"          python manage.py collectstatic --noinput\n",[1314,8485,8486],{"class":1316,"line":6491},[1314,8487,8488],{"class":1345},"          sudo systemctl restart django_app\n",[1314,8490,8491],{"class":1316,"line":6496},[1314,8492,8493],{"class":1345},"          sudo systemctl restart nginx\n",[1030,8495,8497],{"id":8496},"next-steps","Next Steps",[1026,8499,8500],{},"Ready to deploy your Django application to production? Start with preparing your application for production environments, then progress through server configuration, containerization, and cloud deployment strategies. Each chapter provides comprehensive deployment patterns that ensure reliable, scalable, and maintainable production systems.",[1026,8502,8503],{},"The journey from development to production deployment requires careful attention to security, performance, monitoring, and scalability. This guide provides the knowledge and tools needed to deploy Django applications that can handle real-world traffic and grow with your business needs.",[8505,8506,8507],"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 .se3Ec, html code.shiki .se3Ec{--shiki-light:#90A4AE;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .soVBu, html code.shiki .soVBu{--shiki-light:#39ADB5;--shiki-default:#999999;--shiki-dark:#666666}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 .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .sBPpx, html code.shiki .sBPpx{--shiki-light:#E53935;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}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 .suXOh, html code.shiki .suXOh{--shiki-light:#E53935;--shiki-default:#998418;--shiki-dark:#B8A965}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 .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .s3h35, html code.shiki .s3h35{--shiki-light:#F76D47;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .s8XtY, html code.shiki .s8XtY{--shiki-light:#39ADB5;--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .sa2tF, html code.shiki .sa2tF{--shiki-light:#E2931D;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}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 .sm7ve, html code.shiki .sm7ve{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#B5695977;--shiki-default-font-style:inherit;--shiki-dark:#C98A7D77;--shiki-dark-font-style:inherit}html pre.shiki code .sVyVU, html code.shiki .sVyVU{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#B56959;--shiki-default-font-style:inherit;--shiki-dark:#C98A7D;--shiki-dark-font-style:inherit}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 .sJdAF, html code.shiki .sJdAF{--shiki-light:#6182B8;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sq3J1, html code.shiki .sq3J1{--shiki-light:#FF5370;--shiki-default:#1E754F;--shiki-dark:#4D9375}",{"title":1082,"searchDepth":1317,"depth":1324,"links":8509},[8510,8514,8520,8525,8529,8533,8537,8541,8545,8548,8549,8555,8559,8562],{"id":1032,"depth":1324,"text":1033,"children":8511},[8512,8513],{"id":1040,"depth":1338,"text":1041},{"id":1070,"depth":1338,"text":1071},{"id":1085,"depth":1324,"text":1086,"children":8515},[8516,8517,8518,8519],{"id":1089,"depth":1338,"text":1090},{"id":1151,"depth":1338,"text":1152},{"id":1200,"depth":1338,"text":1201},{"id":1249,"depth":1338,"text":767},{"id":1297,"depth":1324,"text":1298,"children":8521},[8522,8523,8524],{"id":1301,"depth":1338,"text":1302},{"id":1739,"depth":1338,"text":1740},{"id":1746,"depth":1338,"text":1747},{"id":1753,"depth":1324,"text":1754,"children":8526},[8527,8528],{"id":1757,"depth":1338,"text":1758},{"id":1767,"depth":1338,"text":1768},{"id":1777,"depth":1324,"text":1778,"children":8530},[8531,8532],{"id":1781,"depth":1338,"text":1782},{"id":2208,"depth":1338,"text":2209},{"id":2635,"depth":1324,"text":2636,"children":8534},[8535,8536],{"id":2639,"depth":1338,"text":2640},{"id":3596,"depth":1338,"text":3597},{"id":4106,"depth":1324,"text":1152,"children":8538},[8539,8540],{"id":4109,"depth":1338,"text":320},{"id":4369,"depth":1338,"text":4370},{"id":4754,"depth":1324,"text":4755,"children":8542},[8543,8544],{"id":4758,"depth":1338,"text":4759},{"id":5051,"depth":1338,"text":5052},{"id":5514,"depth":1324,"text":5515,"children":8546},[8547],{"id":5518,"depth":1338,"text":5519},{"id":6836,"depth":1324,"text":6837},{"id":6889,"depth":1324,"text":6890,"children":8550},[8551,8552,8553,8554],{"id":6893,"depth":1338,"text":6894},{"id":6900,"depth":1338,"text":1758},{"id":6906,"depth":1338,"text":6907},{"id":6913,"depth":1338,"text":6914},{"id":6920,"depth":1324,"text":6921,"children":8556},[8557,8558],{"id":6924,"depth":1338,"text":6925},{"id":7142,"depth":1338,"text":7143},{"id":7958,"depth":1324,"text":7959,"children":8560},[8561],{"id":7962,"depth":1338,"text":7963},{"id":8496,"depth":1324,"text":8497},"md",null,{},{"title":737,"description":1028},"O3Fy4oVyrFwtS34iscQFEotbjHZZP4vrDpyriyTjfdM",[8569,8571],{"title":733,"path":734,"stem":735,"description":8570,"children":-1},"Django's Tasks framework provides a built-in solution for handling background tasks without requiring external dependencies like Celery or RQ. This framework enables you to offload time-consuming operations from request-response cycles, improving application performance and user experience.",{"title":743,"path":744,"stem":745,"description":8572,"children":-1},"Transitioning a Django application from development to production requires systematic preparation across security, performance, configuration, and infrastructure. This chapter covers essential steps to ensure your application is production-ready, secure, and optimized for real-world usage.",1772474951259]