[{"data":1,"prerenderedAt":6281},["ShallowReactive",2],{"navigation":3,"/development-environment/running-development-server":1016,"/development-environment/running-development-server-surround":6276},[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":82,"body":1018,"description":1028,"extension":6271,"links":6272,"meta":6273,"navigation":1083,"path":83,"seo":6274,"stem":84,"__hash__":6275},"docs/02.development-environment/7.running-development-server.md",{"type":1019,"value":1020,"toc":6229},"minimark",[1021,1025,1029,1034,1039,1045,1133,1138,1222,1227,1332,1336,1341,1667,1671,1675,1678,1771,1776,1861,1866,1914,1918,1923,2124,2128,2132,2137,2198,2203,2365,2369,2374,2514,2519,2820,2824,2828,2833,2849,2854,2888,2893,2994,2998,3003,3017,3077,3082,3212,3216,3221,3302,3307,3397,3401,3405,3410,3739,3744,3880,3884,3889,3903,4007,4012,4044,4048,4052,4057,4071,4237,4242,4337,4341,4346,4654,4659,4949,4953,4957,4962,5060,5065,5126,5130,5135,5201,5206,5280,5284,5289,5385,5390,5476,5480,5484,5493,5498,5610,5614,5622,5626,5688,5692,5697,5701,5848,5852,5857,5862,5961,5965,5969,5974,5993,5998,6015,6019,6024,6084,6089,6222,6225],[1022,1023,82],"h1",{"id":1024},"running-django-development-server",[1026,1027,1028],"p",{},"Django's built-in development server is a lightweight, auto-reloading server designed for development and testing. This comprehensive guide covers everything you need to know about running, configuring, and optimizing the development server for productive Django development.",[1030,1031,1033],"h2",{"id":1032},"basic-server-operations","Basic Server Operations",[1035,1036,1038],"h3",{"id":1037},"starting-the-development-server","Starting the Development Server",[1026,1040,1041],{},[1042,1043,1044],"strong",{},"Basic Usage:",[1046,1047,1052],"pre",{"className":1048,"code":1049,"language":1050,"meta":1051,"style":1051},"language-bash shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# Start server on default port (8000)\npython manage.py runserver\n\n# Expected output:\n# Watching for file changes with StatReloader\n# Performing system checks...\n# System check identified no issues (0 silenced).\n# November 15, 2024 - 10:30:45\n# Django version 4.2.7, using settings 'myproject.settings'\n# Starting development server at http://127.0.0.1:8000/\n# Quit the server with CONTROL-C.\n","bash","",[1053,1054,1055,1064,1078,1085,1091,1097,1103,1109,1115,1121,1127],"code",{"__ignoreMap":1051},[1056,1057,1060],"span",{"class":1058,"line":1059},"line",1,[1056,1061,1063],{"class":1062},"s9Tkl","# Start server on default port (8000)\n",[1056,1065,1067,1071,1075],{"class":1058,"line":1066},2,[1056,1068,1070],{"class":1069},"sYn-s","python",[1056,1072,1074],{"class":1073},"sTbE_"," manage.py",[1056,1076,1077],{"class":1073}," runserver\n",[1056,1079,1081],{"class":1058,"line":1080},3,[1056,1082,1084],{"emptyLinePlaceholder":1083},true,"\n",[1056,1086,1088],{"class":1058,"line":1087},4,[1056,1089,1090],{"class":1062},"# Expected output:\n",[1056,1092,1094],{"class":1058,"line":1093},5,[1056,1095,1096],{"class":1062},"# Watching for file changes with StatReloader\n",[1056,1098,1100],{"class":1058,"line":1099},6,[1056,1101,1102],{"class":1062},"# Performing system checks...\n",[1056,1104,1106],{"class":1058,"line":1105},7,[1056,1107,1108],{"class":1062},"# System check identified no issues (0 silenced).\n",[1056,1110,1112],{"class":1058,"line":1111},8,[1056,1113,1114],{"class":1062},"# November 15, 2024 - 10:30:45\n",[1056,1116,1118],{"class":1058,"line":1117},9,[1056,1119,1120],{"class":1062},"# Django version 4.2.7, using settings 'myproject.settings'\n",[1056,1122,1124],{"class":1058,"line":1123},10,[1056,1125,1126],{"class":1062},"# Starting development server at http://127.0.0.1:8000/\n",[1056,1128,1130],{"class":1058,"line":1129},11,[1056,1131,1132],{"class":1062},"# Quit the server with CONTROL-C.\n",[1026,1134,1135],{},[1042,1136,1137],{},"Custom Port and Host:",[1046,1139,1141],{"className":1048,"code":1140,"language":1050,"meta":1051,"style":1051},"# Custom port\npython manage.py runserver 8080\n\n# Custom host and port\npython manage.py runserver 0.0.0.0:8000\n\n# Bind to all interfaces (accessible from network)\npython manage.py runserver 0.0.0.0:8080\n\n# IPv6 support\npython manage.py runserver [::1]:8000\n",[1053,1142,1143,1148,1161,1165,1170,1181,1185,1190,1201,1205,1210],{"__ignoreMap":1051},[1056,1144,1145],{"class":1058,"line":1059},[1056,1146,1147],{"class":1062},"# Custom port\n",[1056,1149,1150,1152,1154,1157],{"class":1058,"line":1066},[1056,1151,1070],{"class":1069},[1056,1153,1074],{"class":1073},[1056,1155,1156],{"class":1073}," runserver",[1056,1158,1160],{"class":1159},"s7CZa"," 8080\n",[1056,1162,1163],{"class":1058,"line":1080},[1056,1164,1084],{"emptyLinePlaceholder":1083},[1056,1166,1167],{"class":1058,"line":1087},[1056,1168,1169],{"class":1062},"# Custom host and port\n",[1056,1171,1172,1174,1176,1178],{"class":1058,"line":1093},[1056,1173,1070],{"class":1069},[1056,1175,1074],{"class":1073},[1056,1177,1156],{"class":1073},[1056,1179,1180],{"class":1073}," 0.0.0.0:8000\n",[1056,1182,1183],{"class":1058,"line":1099},[1056,1184,1084],{"emptyLinePlaceholder":1083},[1056,1186,1187],{"class":1058,"line":1105},[1056,1188,1189],{"class":1062},"# Bind to all interfaces (accessible from network)\n",[1056,1191,1192,1194,1196,1198],{"class":1058,"line":1111},[1056,1193,1070],{"class":1069},[1056,1195,1074],{"class":1073},[1056,1197,1156],{"class":1073},[1056,1199,1200],{"class":1073}," 0.0.0.0:8080\n",[1056,1202,1203],{"class":1058,"line":1117},[1056,1204,1084],{"emptyLinePlaceholder":1083},[1056,1206,1207],{"class":1058,"line":1123},[1056,1208,1209],{"class":1062},"# IPv6 support\n",[1056,1211,1212,1214,1216,1218],{"class":1058,"line":1129},[1056,1213,1070],{"class":1069},[1056,1215,1074],{"class":1073},[1056,1217,1156],{"class":1073},[1056,1219,1221],{"class":1220},"sftqT"," [::1]:8000\n",[1026,1223,1224],{},[1042,1225,1226],{},"Advanced Options:",[1046,1228,1230],{"className":1048,"code":1229,"language":1050,"meta":1051,"style":1051},"# Disable auto-reload\npython manage.py runserver --noreload\n\n# Use threading (default in Django 4.2+)\npython manage.py runserver --nothreading\n\n# Skip system checks\npython manage.py runserver --skip-checks\n\n# Force color output\npython manage.py runserver --force-color\n\n# Specify settings module\npython manage.py runserver --settings=myproject.settings.development\n",[1053,1231,1232,1237,1249,1253,1258,1269,1273,1278,1289,1293,1298,1309,1314,1320],{"__ignoreMap":1051},[1056,1233,1234],{"class":1058,"line":1059},[1056,1235,1236],{"class":1062},"# Disable auto-reload\n",[1056,1238,1239,1241,1243,1245],{"class":1058,"line":1066},[1056,1240,1070],{"class":1069},[1056,1242,1074],{"class":1073},[1056,1244,1156],{"class":1073},[1056,1246,1248],{"class":1247},"sz9Cv"," --noreload\n",[1056,1250,1251],{"class":1058,"line":1080},[1056,1252,1084],{"emptyLinePlaceholder":1083},[1056,1254,1255],{"class":1058,"line":1087},[1056,1256,1257],{"class":1062},"# Use threading (default in Django 4.2+)\n",[1056,1259,1260,1262,1264,1266],{"class":1058,"line":1093},[1056,1261,1070],{"class":1069},[1056,1263,1074],{"class":1073},[1056,1265,1156],{"class":1073},[1056,1267,1268],{"class":1247}," --nothreading\n",[1056,1270,1271],{"class":1058,"line":1099},[1056,1272,1084],{"emptyLinePlaceholder":1083},[1056,1274,1275],{"class":1058,"line":1105},[1056,1276,1277],{"class":1062},"# Skip system checks\n",[1056,1279,1280,1282,1284,1286],{"class":1058,"line":1111},[1056,1281,1070],{"class":1069},[1056,1283,1074],{"class":1073},[1056,1285,1156],{"class":1073},[1056,1287,1288],{"class":1247}," --skip-checks\n",[1056,1290,1291],{"class":1058,"line":1117},[1056,1292,1084],{"emptyLinePlaceholder":1083},[1056,1294,1295],{"class":1058,"line":1123},[1056,1296,1297],{"class":1062},"# Force color output\n",[1056,1299,1300,1302,1304,1306],{"class":1058,"line":1129},[1056,1301,1070],{"class":1069},[1056,1303,1074],{"class":1073},[1056,1305,1156],{"class":1073},[1056,1307,1308],{"class":1247}," --force-color\n",[1056,1310,1312],{"class":1058,"line":1311},12,[1056,1313,1084],{"emptyLinePlaceholder":1083},[1056,1315,1317],{"class":1058,"line":1316},13,[1056,1318,1319],{"class":1062},"# Specify settings module\n",[1056,1321,1323,1325,1327,1329],{"class":1058,"line":1322},14,[1056,1324,1070],{"class":1069},[1056,1326,1074],{"class":1073},[1056,1328,1156],{"class":1073},[1056,1330,1331],{"class":1247}," --settings=myproject.settings.development\n",[1035,1333,1335],{"id":1334},"server-configuration","Server Configuration",[1026,1337,1338],{},[1042,1339,1340],{},"Settings for Development Server:",[1046,1342,1345],{"className":1343,"code":1344,"language":1070,"meta":1051,"style":1051},"language-python shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# settings/development.py\n\n# Debug mode (required for development server features)\nDEBUG = True\n\n# Allowed hosts (important for network access)\nALLOWED_HOSTS = [\n    'localhost',\n    '127.0.0.1',\n    '0.0.0.0',\n    '.ngrok.io',  # For tunneling services\n    '192.168.1.100',  # Your local network IP\n]\n\n# Internal IPs (for debug toolbar and other dev tools)\nINTERNAL_IPS = [\n    '127.0.0.1',\n    'localhost',\n    '192.168.1.100',\n]\n\n# Development server settings\nUSE_TZ = True\nTIME_ZONE = 'UTC'\n\n# Static files (served by development server)\nSTATIC_URL = '/static/'\nSTATICFILES_DIRS = [\n    BASE_DIR / 'static',\n]\n\n# Media files (served by development server)\nMEDIA_URL = '/media/'\nMEDIA_ROOT = BASE_DIR / 'media'\n",[1053,1346,1347,1352,1356,1361,1375,1379,1384,1394,1409,1420,1431,1446,1460,1465,1469,1475,1485,1496,1507,1518,1523,1528,1534,1544,1561,1566,1572,1587,1597,1616,1621,1626,1632,1647],{"__ignoreMap":1051},[1056,1348,1349],{"class":1058,"line":1059},[1056,1350,1351],{"class":1062},"# settings/development.py\n",[1056,1353,1354],{"class":1058,"line":1066},[1056,1355,1084],{"emptyLinePlaceholder":1083},[1056,1357,1358],{"class":1058,"line":1080},[1056,1359,1360],{"class":1062},"# Debug mode (required for development server features)\n",[1056,1362,1363,1367,1371],{"class":1058,"line":1087},[1056,1364,1366],{"class":1365},"se3Ec","DEBUG",[1056,1368,1370],{"class":1369},"soVBu"," =",[1056,1372,1374],{"class":1373},"s8XtY"," True\n",[1056,1376,1377],{"class":1058,"line":1093},[1056,1378,1084],{"emptyLinePlaceholder":1083},[1056,1380,1381],{"class":1058,"line":1099},[1056,1382,1383],{"class":1062},"# Allowed hosts (important for network access)\n",[1056,1385,1386,1389,1391],{"class":1058,"line":1105},[1056,1387,1388],{"class":1365},"ALLOWED_HOSTS",[1056,1390,1370],{"class":1369},[1056,1392,1393],{"class":1369}," [\n",[1056,1395,1396,1400,1403,1406],{"class":1058,"line":1111},[1056,1397,1399],{"class":1398},"sbYkP","    '",[1056,1401,1402],{"class":1073},"localhost",[1056,1404,1405],{"class":1398},"'",[1056,1407,1408],{"class":1369},",\n",[1056,1410,1411,1413,1416,1418],{"class":1058,"line":1117},[1056,1412,1399],{"class":1398},[1056,1414,1415],{"class":1073},"127.0.0.1",[1056,1417,1405],{"class":1398},[1056,1419,1408],{"class":1369},[1056,1421,1422,1424,1427,1429],{"class":1058,"line":1123},[1056,1423,1399],{"class":1398},[1056,1425,1426],{"class":1073},"0.0.0.0",[1056,1428,1405],{"class":1398},[1056,1430,1408],{"class":1369},[1056,1432,1433,1435,1438,1440,1443],{"class":1058,"line":1129},[1056,1434,1399],{"class":1398},[1056,1436,1437],{"class":1073},".ngrok.io",[1056,1439,1405],{"class":1398},[1056,1441,1442],{"class":1369},",",[1056,1444,1445],{"class":1062},"  # For tunneling services\n",[1056,1447,1448,1450,1453,1455,1457],{"class":1058,"line":1311},[1056,1449,1399],{"class":1398},[1056,1451,1452],{"class":1073},"192.168.1.100",[1056,1454,1405],{"class":1398},[1056,1456,1442],{"class":1369},[1056,1458,1459],{"class":1062},"  # Your local network IP\n",[1056,1461,1462],{"class":1058,"line":1316},[1056,1463,1464],{"class":1369},"]\n",[1056,1466,1467],{"class":1058,"line":1322},[1056,1468,1084],{"emptyLinePlaceholder":1083},[1056,1470,1472],{"class":1058,"line":1471},15,[1056,1473,1474],{"class":1062},"# Internal IPs (for debug toolbar and other dev tools)\n",[1056,1476,1478,1481,1483],{"class":1058,"line":1477},16,[1056,1479,1480],{"class":1365},"INTERNAL_IPS",[1056,1482,1370],{"class":1369},[1056,1484,1393],{"class":1369},[1056,1486,1488,1490,1492,1494],{"class":1058,"line":1487},17,[1056,1489,1399],{"class":1398},[1056,1491,1415],{"class":1073},[1056,1493,1405],{"class":1398},[1056,1495,1408],{"class":1369},[1056,1497,1499,1501,1503,1505],{"class":1058,"line":1498},18,[1056,1500,1399],{"class":1398},[1056,1502,1402],{"class":1073},[1056,1504,1405],{"class":1398},[1056,1506,1408],{"class":1369},[1056,1508,1510,1512,1514,1516],{"class":1058,"line":1509},19,[1056,1511,1399],{"class":1398},[1056,1513,1452],{"class":1073},[1056,1515,1405],{"class":1398},[1056,1517,1408],{"class":1369},[1056,1519,1521],{"class":1058,"line":1520},20,[1056,1522,1464],{"class":1369},[1056,1524,1526],{"class":1058,"line":1525},21,[1056,1527,1084],{"emptyLinePlaceholder":1083},[1056,1529,1531],{"class":1058,"line":1530},22,[1056,1532,1533],{"class":1062},"# Development server settings\n",[1056,1535,1537,1540,1542],{"class":1058,"line":1536},23,[1056,1538,1539],{"class":1365},"USE_TZ",[1056,1541,1370],{"class":1369},[1056,1543,1374],{"class":1373},[1056,1545,1547,1550,1552,1555,1558],{"class":1058,"line":1546},24,[1056,1548,1549],{"class":1365},"TIME_ZONE",[1056,1551,1370],{"class":1369},[1056,1553,1554],{"class":1398}," '",[1056,1556,1557],{"class":1073},"UTC",[1056,1559,1560],{"class":1398},"'\n",[1056,1562,1564],{"class":1058,"line":1563},25,[1056,1565,1084],{"emptyLinePlaceholder":1083},[1056,1567,1569],{"class":1058,"line":1568},26,[1056,1570,1571],{"class":1062},"# Static files (served by development server)\n",[1056,1573,1575,1578,1580,1582,1585],{"class":1058,"line":1574},27,[1056,1576,1577],{"class":1365},"STATIC_URL",[1056,1579,1370],{"class":1369},[1056,1581,1554],{"class":1398},[1056,1583,1584],{"class":1073},"/static/",[1056,1586,1560],{"class":1398},[1056,1588,1590,1593,1595],{"class":1058,"line":1589},28,[1056,1591,1592],{"class":1365},"STATICFILES_DIRS",[1056,1594,1370],{"class":1369},[1056,1596,1393],{"class":1369},[1056,1598,1600,1603,1607,1609,1612,1614],{"class":1058,"line":1599},29,[1056,1601,1602],{"class":1365},"    BASE_DIR",[1056,1604,1606],{"class":1605},"sVsLi"," /",[1056,1608,1554],{"class":1398},[1056,1610,1611],{"class":1073},"static",[1056,1613,1405],{"class":1398},[1056,1615,1408],{"class":1369},[1056,1617,1619],{"class":1058,"line":1618},30,[1056,1620,1464],{"class":1369},[1056,1622,1624],{"class":1058,"line":1623},31,[1056,1625,1084],{"emptyLinePlaceholder":1083},[1056,1627,1629],{"class":1058,"line":1628},32,[1056,1630,1631],{"class":1062},"# Media files (served by development server)\n",[1056,1633,1635,1638,1640,1642,1645],{"class":1058,"line":1634},33,[1056,1636,1637],{"class":1365},"MEDIA_URL",[1056,1639,1370],{"class":1369},[1056,1641,1554],{"class":1398},[1056,1643,1644],{"class":1073},"/media/",[1056,1646,1560],{"class":1398},[1056,1648,1650,1653,1655,1658,1660,1662,1665],{"class":1058,"line":1649},34,[1056,1651,1652],{"class":1365},"MEDIA_ROOT",[1056,1654,1370],{"class":1369},[1056,1656,1657],{"class":1365}," BASE_DIR",[1056,1659,1606],{"class":1605},[1056,1661,1554],{"class":1398},[1056,1663,1664],{"class":1073},"media",[1056,1666,1560],{"class":1398},[1030,1668,1670],{"id":1669},"auto-reloading-and-file-watching","Auto-Reloading and File Watching",[1035,1672,1674],{"id":1673},"how-auto-reload-works","How Auto-Reload Works",[1026,1676,1677],{},"Django's development server automatically restarts when it detects changes to Python files:",[1046,1679,1681],{"className":1343,"code":1680,"language":1070,"meta":1051,"style":1051},"# The StatReloader watches for changes in:\n# - Python files (.py)\n# - Translation files (.po, .mo)\n# - Template files (when DEBUG=True)\n\n# Files that trigger reload:\n# - models.py\n# - views.py\n# - urls.py\n# - settings.py\n# - forms.py\n# - admin.py\n\n# Files that DON'T trigger reload:\n# - Static files (CSS, JS, images)\n# - Media files\n# - Log files\n# - Database files\n",[1053,1682,1683,1688,1693,1698,1703,1707,1712,1717,1722,1727,1732,1737,1742,1746,1751,1756,1761,1766],{"__ignoreMap":1051},[1056,1684,1685],{"class":1058,"line":1059},[1056,1686,1687],{"class":1062},"# The StatReloader watches for changes in:\n",[1056,1689,1690],{"class":1058,"line":1066},[1056,1691,1692],{"class":1062},"# - Python files (.py)\n",[1056,1694,1695],{"class":1058,"line":1080},[1056,1696,1697],{"class":1062},"# - Translation files (.po, .mo)\n",[1056,1699,1700],{"class":1058,"line":1087},[1056,1701,1702],{"class":1062},"# - Template files (when DEBUG=True)\n",[1056,1704,1705],{"class":1058,"line":1093},[1056,1706,1084],{"emptyLinePlaceholder":1083},[1056,1708,1709],{"class":1058,"line":1099},[1056,1710,1711],{"class":1062},"# Files that trigger reload:\n",[1056,1713,1714],{"class":1058,"line":1105},[1056,1715,1716],{"class":1062},"# - models.py\n",[1056,1718,1719],{"class":1058,"line":1111},[1056,1720,1721],{"class":1062},"# - views.py\n",[1056,1723,1724],{"class":1058,"line":1117},[1056,1725,1726],{"class":1062},"# - urls.py\n",[1056,1728,1729],{"class":1058,"line":1123},[1056,1730,1731],{"class":1062},"# - settings.py\n",[1056,1733,1734],{"class":1058,"line":1129},[1056,1735,1736],{"class":1062},"# - forms.py\n",[1056,1738,1739],{"class":1058,"line":1311},[1056,1740,1741],{"class":1062},"# - admin.py\n",[1056,1743,1744],{"class":1058,"line":1316},[1056,1745,1084],{"emptyLinePlaceholder":1083},[1056,1747,1748],{"class":1058,"line":1322},[1056,1749,1750],{"class":1062},"# Files that DON'T trigger reload:\n",[1056,1752,1753],{"class":1058,"line":1471},[1056,1754,1755],{"class":1062},"# - Static files (CSS, JS, images)\n",[1056,1757,1758],{"class":1058,"line":1477},[1056,1759,1760],{"class":1062},"# - Media files\n",[1056,1762,1763],{"class":1058,"line":1487},[1056,1764,1765],{"class":1062},"# - Log files\n",[1056,1767,1768],{"class":1058,"line":1498},[1056,1769,1770],{"class":1062},"# - Database files\n",[1026,1772,1773],{},[1042,1774,1775],{},"Customizing File Watching:",[1046,1777,1779],{"className":1343,"code":1778,"language":1070,"meta":1051,"style":1051},"# settings/development.py\n\n# Disable auto-reload for specific patterns\nimport sys\nif 'runserver' in sys.argv:\n    # Custom reloader configuration\n    USE_I18N = True  # Watch translation files\n    USE_L10N = True  # Watch locale files\n",[1053,1780,1781,1785,1789,1794,1803,1831,1836,1849],{"__ignoreMap":1051},[1056,1782,1783],{"class":1058,"line":1059},[1056,1784,1351],{"class":1062},[1056,1786,1787],{"class":1058,"line":1066},[1056,1788,1084],{"emptyLinePlaceholder":1083},[1056,1790,1791],{"class":1058,"line":1080},[1056,1792,1793],{"class":1062},"# Disable auto-reload for specific patterns\n",[1056,1795,1796,1800],{"class":1058,"line":1087},[1056,1797,1799],{"class":1798},"siDh9","import",[1056,1801,1802],{"class":1220}," sys\n",[1056,1804,1805,1808,1810,1813,1815,1818,1821,1824,1828],{"class":1058,"line":1093},[1056,1806,1807],{"class":1798},"if",[1056,1809,1554],{"class":1398},[1056,1811,1812],{"class":1073},"runserver",[1056,1814,1405],{"class":1398},[1056,1816,1817],{"class":1605}," in",[1056,1819,1820],{"class":1220}," sys",[1056,1822,1823],{"class":1369},".",[1056,1825,1827],{"class":1826},"sBPpx","argv",[1056,1829,1830],{"class":1369},":\n",[1056,1832,1833],{"class":1058,"line":1099},[1056,1834,1835],{"class":1062},"    # Custom reloader configuration\n",[1056,1837,1838,1841,1843,1846],{"class":1058,"line":1105},[1056,1839,1840],{"class":1365},"    USE_I18N",[1056,1842,1370],{"class":1369},[1056,1844,1845],{"class":1373}," True",[1056,1847,1848],{"class":1062},"  # Watch translation files\n",[1056,1850,1851,1854,1856,1858],{"class":1058,"line":1111},[1056,1852,1853],{"class":1365},"    USE_L10N",[1056,1855,1370],{"class":1369},[1056,1857,1845],{"class":1373},[1056,1859,1860],{"class":1062},"  # Watch locale files\n",[1026,1862,1863],{},[1042,1864,1865],{},"Manual Reload Triggers:",[1046,1867,1869],{"className":1048,"code":1868,"language":1050,"meta":1051,"style":1051},"# Force reload by touching a Python file\ntouch manage.py\n\n# Or modify any watched file\necho \"# Force reload\" >> myapp/models.py\n",[1053,1870,1871,1876,1884,1888,1893],{"__ignoreMap":1051},[1056,1872,1873],{"class":1058,"line":1059},[1056,1874,1875],{"class":1062},"# Force reload by touching a Python file\n",[1056,1877,1878,1881],{"class":1058,"line":1066},[1056,1879,1880],{"class":1069},"touch",[1056,1882,1883],{"class":1073}," manage.py\n",[1056,1885,1886],{"class":1058,"line":1080},[1056,1887,1084],{"emptyLinePlaceholder":1083},[1056,1889,1890],{"class":1058,"line":1087},[1056,1891,1892],{"class":1062},"# Or modify any watched file\n",[1056,1894,1895,1899,1902,1905,1908,1911],{"class":1058,"line":1093},[1056,1896,1898],{"class":1897},"sJdAF","echo",[1056,1900,1901],{"class":1398}," \"",[1056,1903,1904],{"class":1073},"# Force reload",[1056,1906,1907],{"class":1398},"\"",[1056,1909,1910],{"class":1605}," >>",[1056,1912,1913],{"class":1073}," myapp/models.py\n",[1035,1915,1917],{"id":1916},"handling-reload-issues","Handling Reload Issues",[1026,1919,1920],{},[1042,1921,1922],{},"Common Auto-Reload Problems:",[1046,1924,1926],{"className":1343,"code":1925,"language":1070,"meta":1051,"style":1051},"# Problem: Server doesn't reload after changes\n# Solution: Check file permissions and paths\n\n# Problem: Too many reloads\n# Solution: Exclude problematic directories\nimport os\nfrom django.utils.autoreload import autoreload_started\n\ndef ignore_certain_files(sender, **kwargs):\n    \"\"\"Ignore files that shouldn't trigger reloads.\"\"\"\n    import django.utils.autoreload\n    django.utils.autoreload.FILE_MODIFIED.disconnect(\n        dispatch_uid='django.utils.autoreload.file_modified'\n    )\n\nif DEBUG:\n    autoreload_started.connect(ignore_certain_files)\n",[1053,1927,1928,1933,1938,1942,1947,1952,1959,1982,1986,2014,2027,2043,2072,2088,2093,2097,2106],{"__ignoreMap":1051},[1056,1929,1930],{"class":1058,"line":1059},[1056,1931,1932],{"class":1062},"# Problem: Server doesn't reload after changes\n",[1056,1934,1935],{"class":1058,"line":1066},[1056,1936,1937],{"class":1062},"# Solution: Check file permissions and paths\n",[1056,1939,1940],{"class":1058,"line":1080},[1056,1941,1084],{"emptyLinePlaceholder":1083},[1056,1943,1944],{"class":1058,"line":1087},[1056,1945,1946],{"class":1062},"# Problem: Too many reloads\n",[1056,1948,1949],{"class":1058,"line":1093},[1056,1950,1951],{"class":1062},"# Solution: Exclude problematic directories\n",[1056,1953,1954,1956],{"class":1058,"line":1099},[1056,1955,1799],{"class":1798},[1056,1957,1958],{"class":1220}," os\n",[1056,1960,1961,1964,1967,1969,1972,1974,1977,1979],{"class":1058,"line":1105},[1056,1962,1963],{"class":1798},"from",[1056,1965,1966],{"class":1220}," django",[1056,1968,1823],{"class":1369},[1056,1970,1971],{"class":1220},"utils",[1056,1973,1823],{"class":1369},[1056,1975,1976],{"class":1220},"autoreload ",[1056,1978,1799],{"class":1798},[1056,1980,1981],{"class":1220}," autoreload_started\n",[1056,1983,1984],{"class":1058,"line":1111},[1056,1985,1084],{"emptyLinePlaceholder":1083},[1056,1987,1988,1992,1996,1999,2003,2005,2008,2011],{"class":1058,"line":1117},[1056,1989,1991],{"class":1990},"s5Kfy","def",[1056,1993,1995],{"class":1994},"sljsM"," ignore_certain_files",[1056,1997,1998],{"class":1369},"(",[1056,2000,2002],{"class":2001},"sCyAa","sender",[1056,2004,1442],{"class":1369},[1056,2006,2007],{"class":1605}," **",[1056,2009,2010],{"class":2001},"kwargs",[1056,2012,2013],{"class":1369},"):\n",[1056,2015,2016,2020,2024],{"class":1058,"line":1123},[1056,2017,2019],{"class":2018},"sm7ve","    \"\"\"",[1056,2021,2023],{"class":2022},"sVyVU","Ignore files that shouldn't trigger reloads.",[1056,2025,2026],{"class":2018},"\"\"\"\n",[1056,2028,2029,2032,2034,2036,2038,2040],{"class":1058,"line":1129},[1056,2030,2031],{"class":1798},"    import",[1056,2033,1966],{"class":1220},[1056,2035,1823],{"class":1369},[1056,2037,1971],{"class":1826},[1056,2039,1823],{"class":1369},[1056,2041,2042],{"class":1826},"autoreload\n",[1056,2044,2045,2048,2050,2052,2054,2057,2059,2063,2065,2069],{"class":1058,"line":1311},[1056,2046,2047],{"class":1220},"    django",[1056,2049,1823],{"class":1369},[1056,2051,1971],{"class":1826},[1056,2053,1823],{"class":1369},[1056,2055,2056],{"class":1826},"autoreload",[1056,2058,1823],{"class":1369},[1056,2060,2062],{"class":2061},"sFGJz","FILE_MODIFIED",[1056,2064,1823],{"class":1369},[1056,2066,2068],{"class":2067},"siWMO","disconnect",[1056,2070,2071],{"class":1369},"(\n",[1056,2073,2074,2078,2081,2083,2086],{"class":1058,"line":1316},[1056,2075,2077],{"class":2076},"sqOPj","        dispatch_uid",[1056,2079,2080],{"class":1369},"=",[1056,2082,1405],{"class":1398},[1056,2084,2085],{"class":1073},"django.utils.autoreload.file_modified",[1056,2087,1560],{"class":1398},[1056,2089,2090],{"class":1058,"line":1322},[1056,2091,2092],{"class":1369},"    )\n",[1056,2094,2095],{"class":1058,"line":1471},[1056,2096,1084],{"emptyLinePlaceholder":1083},[1056,2098,2099,2101,2104],{"class":1058,"line":1477},[1056,2100,1807],{"class":1798},[1056,2102,2103],{"class":1365}," DEBUG",[1056,2105,1830],{"class":1369},[1056,2107,2108,2111,2113,2116,2118,2121],{"class":1058,"line":1487},[1056,2109,2110],{"class":1220},"    autoreload_started",[1056,2112,1823],{"class":1369},[1056,2114,2115],{"class":2067},"connect",[1056,2117,1998],{"class":1369},[1056,2119,2120],{"class":2067},"ignore_certain_files",[1056,2122,2123],{"class":1369},")\n",[1030,2125,2127],{"id":2126},"static-and-media-file-serving","Static and Media File Serving",[1035,2129,2131],{"id":2130},"static-files-in-development","Static Files in Development",[1026,2133,2134],{},[1042,2135,2136],{},"Automatic Static File Serving:",[1046,2138,2140],{"className":1343,"code":2139,"language":1070,"meta":1051,"style":1051},"# settings/development.py\nSTATIC_URL = '/static/'\nSTATICFILES_DIRS = [\n    BASE_DIR / 'static',\n]\n\n# Django automatically serves static files when DEBUG=True\n# URLs like /static/css/main.css are handled automatically\n",[1053,2141,2142,2146,2158,2166,2180,2184,2188,2193],{"__ignoreMap":1051},[1056,2143,2144],{"class":1058,"line":1059},[1056,2145,1351],{"class":1062},[1056,2147,2148,2150,2152,2154,2156],{"class":1058,"line":1066},[1056,2149,1577],{"class":1365},[1056,2151,1370],{"class":1369},[1056,2153,1554],{"class":1398},[1056,2155,1584],{"class":1073},[1056,2157,1560],{"class":1398},[1056,2159,2160,2162,2164],{"class":1058,"line":1080},[1056,2161,1592],{"class":1365},[1056,2163,1370],{"class":1369},[1056,2165,1393],{"class":1369},[1056,2167,2168,2170,2172,2174,2176,2178],{"class":1058,"line":1087},[1056,2169,1602],{"class":1365},[1056,2171,1606],{"class":1605},[1056,2173,1554],{"class":1398},[1056,2175,1611],{"class":1073},[1056,2177,1405],{"class":1398},[1056,2179,1408],{"class":1369},[1056,2181,2182],{"class":1058,"line":1093},[1056,2183,1464],{"class":1369},[1056,2185,2186],{"class":1058,"line":1099},[1056,2187,1084],{"emptyLinePlaceholder":1083},[1056,2189,2190],{"class":1058,"line":1105},[1056,2191,2192],{"class":1062},"# Django automatically serves static files when DEBUG=True\n",[1056,2194,2195],{"class":1058,"line":1111},[1056,2196,2197],{"class":1062},"# URLs like /static/css/main.css are handled automatically\n",[1026,2199,2200],{},[1042,2201,2202],{},"Manual Static File Configuration:",[1046,2204,2206],{"className":1343,"code":2205,"language":1070,"meta":1051,"style":1051},"# urls.py\nfrom django.conf import settings\nfrom django.conf.urls.static import static\n\nurlpatterns = [\n    # Your URL patterns\n]\n\n# Serve static files during development\nif settings.DEBUG:\n    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\n    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n",[1053,2207,2208,2213,2229,2255,2259,2268,2273,2277,2281,2286,2299,2335],{"__ignoreMap":1051},[1056,2209,2210],{"class":1058,"line":1059},[1056,2211,2212],{"class":1062},"# urls.py\n",[1056,2214,2215,2217,2219,2221,2224,2226],{"class":1058,"line":1066},[1056,2216,1963],{"class":1798},[1056,2218,1966],{"class":1220},[1056,2220,1823],{"class":1369},[1056,2222,2223],{"class":1220},"conf ",[1056,2225,1799],{"class":1798},[1056,2227,2228],{"class":1220}," settings\n",[1056,2230,2231,2233,2235,2237,2240,2242,2245,2247,2250,2252],{"class":1058,"line":1080},[1056,2232,1963],{"class":1798},[1056,2234,1966],{"class":1220},[1056,2236,1823],{"class":1369},[1056,2238,2239],{"class":1220},"conf",[1056,2241,1823],{"class":1369},[1056,2243,2244],{"class":1220},"urls",[1056,2246,1823],{"class":1369},[1056,2248,2249],{"class":1220},"static ",[1056,2251,1799],{"class":1798},[1056,2253,2254],{"class":1220}," static\n",[1056,2256,2257],{"class":1058,"line":1087},[1056,2258,1084],{"emptyLinePlaceholder":1083},[1056,2260,2261,2264,2266],{"class":1058,"line":1093},[1056,2262,2263],{"class":1220},"urlpatterns ",[1056,2265,2080],{"class":1369},[1056,2267,1393],{"class":1369},[1056,2269,2270],{"class":1058,"line":1099},[1056,2271,2272],{"class":1062},"    # Your URL patterns\n",[1056,2274,2275],{"class":1058,"line":1105},[1056,2276,1464],{"class":1369},[1056,2278,2279],{"class":1058,"line":1111},[1056,2280,1084],{"emptyLinePlaceholder":1083},[1056,2282,2283],{"class":1058,"line":1117},[1056,2284,2285],{"class":1062},"# Serve static files during development\n",[1056,2287,2288,2290,2293,2295,2297],{"class":1058,"line":1123},[1056,2289,1807],{"class":1798},[1056,2291,2292],{"class":1220}," settings",[1056,2294,1823],{"class":1369},[1056,2296,1366],{"class":2061},[1056,2298,1830],{"class":1369},[1056,2300,2301,2304,2307,2310,2312,2315,2317,2319,2321,2324,2326,2328,2330,2333],{"class":1058,"line":1129},[1056,2302,2303],{"class":1220},"    urlpatterns ",[1056,2305,2306],{"class":1369},"+=",[1056,2308,2309],{"class":2067}," static",[1056,2311,1998],{"class":1369},[1056,2313,2314],{"class":2067},"settings",[1056,2316,1823],{"class":1369},[1056,2318,1577],{"class":2061},[1056,2320,1442],{"class":1369},[1056,2322,2323],{"class":2076}," document_root",[1056,2325,2080],{"class":1369},[1056,2327,2314],{"class":2067},[1056,2329,1823],{"class":1369},[1056,2331,2332],{"class":2061},"STATIC_ROOT",[1056,2334,2123],{"class":1369},[1056,2336,2337,2339,2341,2343,2345,2347,2349,2351,2353,2355,2357,2359,2361,2363],{"class":1058,"line":1311},[1056,2338,2303],{"class":1220},[1056,2340,2306],{"class":1369},[1056,2342,2309],{"class":2067},[1056,2344,1998],{"class":1369},[1056,2346,2314],{"class":2067},[1056,2348,1823],{"class":1369},[1056,2350,1637],{"class":2061},[1056,2352,1442],{"class":1369},[1056,2354,2323],{"class":2076},[1056,2356,2080],{"class":1369},[1056,2358,2314],{"class":2067},[1056,2360,1823],{"class":1369},[1056,2362,1652],{"class":2061},[1056,2364,2123],{"class":1369},[1035,2366,2368],{"id":2367},"media-files-in-development","Media Files in Development",[1026,2370,2371],{},[1042,2372,2373],{},"Media File Handling:",[1046,2375,2377],{"className":1343,"code":2376,"language":1070,"meta":1051,"style":1051},"# models.py\nclass UserProfile(models.Model):\n    user = models.OneToOneField(User, on_delete=models.CASCADE)\n    avatar = models.ImageField(upload_to='avatars/')\n    document = models.FileField(upload_to='documents/')\n\n# The development server will serve these files automatically\n# URLs: /media/avatars/user1.jpg, /media/documents/doc.pdf\n",[1053,2378,2379,2384,2405,2441,2471,2500,2504,2509],{"__ignoreMap":1051},[1056,2380,2381],{"class":1058,"line":1059},[1056,2382,2383],{"class":1062},"# models.py\n",[1056,2385,2386,2389,2393,2395,2398,2400,2403],{"class":1058,"line":1066},[1056,2387,2388],{"class":1990},"class",[1056,2390,2392],{"class":2391},"sD-vU"," UserProfile",[1056,2394,1998],{"class":1369},[1056,2396,2397],{"class":1069},"models",[1056,2399,1823],{"class":1369},[1056,2401,2402],{"class":1069},"Model",[1056,2404,2013],{"class":1369},[1056,2406,2407,2410,2412,2415,2417,2420,2422,2425,2427,2430,2432,2434,2436,2439],{"class":1058,"line":1080},[1056,2408,2409],{"class":1220},"    user ",[1056,2411,2080],{"class":1369},[1056,2413,2414],{"class":1220}," models",[1056,2416,1823],{"class":1369},[1056,2418,2419],{"class":2067},"OneToOneField",[1056,2421,1998],{"class":1369},[1056,2423,2424],{"class":2067},"User",[1056,2426,1442],{"class":1369},[1056,2428,2429],{"class":2076}," on_delete",[1056,2431,2080],{"class":1369},[1056,2433,2397],{"class":2067},[1056,2435,1823],{"class":1369},[1056,2437,2438],{"class":2061},"CASCADE",[1056,2440,2123],{"class":1369},[1056,2442,2443,2446,2448,2450,2452,2455,2457,2460,2462,2464,2467,2469],{"class":1058,"line":1087},[1056,2444,2445],{"class":1220},"    avatar ",[1056,2447,2080],{"class":1369},[1056,2449,2414],{"class":1220},[1056,2451,1823],{"class":1369},[1056,2453,2454],{"class":2067},"ImageField",[1056,2456,1998],{"class":1369},[1056,2458,2459],{"class":2076},"upload_to",[1056,2461,2080],{"class":1369},[1056,2463,1405],{"class":1398},[1056,2465,2466],{"class":1073},"avatars/",[1056,2468,1405],{"class":1398},[1056,2470,2123],{"class":1369},[1056,2472,2473,2476,2478,2480,2482,2485,2487,2489,2491,2493,2496,2498],{"class":1058,"line":1093},[1056,2474,2475],{"class":1220},"    document ",[1056,2477,2080],{"class":1369},[1056,2479,2414],{"class":1220},[1056,2481,1823],{"class":1369},[1056,2483,2484],{"class":2067},"FileField",[1056,2486,1998],{"class":1369},[1056,2488,2459],{"class":2076},[1056,2490,2080],{"class":1369},[1056,2492,1405],{"class":1398},[1056,2494,2495],{"class":1073},"documents/",[1056,2497,1405],{"class":1398},[1056,2499,2123],{"class":1369},[1056,2501,2502],{"class":1058,"line":1099},[1056,2503,1084],{"emptyLinePlaceholder":1083},[1056,2505,2506],{"class":1058,"line":1105},[1056,2507,2508],{"class":1062},"# The development server will serve these files automatically\n",[1056,2510,2511],{"class":1058,"line":1111},[1056,2512,2513],{"class":1062},"# URLs: /media/avatars/user1.jpg, /media/documents/doc.pdf\n",[1026,2515,2516],{},[1042,2517,2518],{},"Custom Media Serving:",[1046,2520,2522],{"className":1343,"code":2521,"language":1070,"meta":1051,"style":1051},"# views.py (for protected media files)\nfrom django.http import FileResponse, Http404\nfrom django.contrib.auth.decorators import login_required\nimport os\n\n@login_required\ndef serve_protected_media(request, file_path):\n    \"\"\"Serve protected media files in development.\"\"\"\n    if not settings.DEBUG:\n        raise Http404(\"Not found\")\n    \n    file_full_path = os.path.join(settings.MEDIA_ROOT, file_path)\n    \n    if not os.path.exists(file_full_path):\n        raise Http404(\"File not found\")\n    \n    return FileResponse(open(file_full_path, 'rb'))\n\n# urls.py\nurlpatterns = [\n    path('protected-media/\u003Cpath:file_path>/', views.serve_protected_media),\n]\n",[1053,2523,2524,2529,2550,2576,2582,2586,2594,2613,2622,2638,2657,2662,2696,2700,2724,2741,2745,2773,2777,2781,2789,2816],{"__ignoreMap":1051},[1056,2525,2526],{"class":1058,"line":1059},[1056,2527,2528],{"class":1062},"# views.py (for protected media files)\n",[1056,2530,2531,2533,2535,2537,2540,2542,2545,2547],{"class":1058,"line":1066},[1056,2532,1963],{"class":1798},[1056,2534,1966],{"class":1220},[1056,2536,1823],{"class":1369},[1056,2538,2539],{"class":1220},"http ",[1056,2541,1799],{"class":1798},[1056,2543,2544],{"class":1220}," FileResponse",[1056,2546,1442],{"class":1369},[1056,2548,2549],{"class":1220}," Http404\n",[1056,2551,2552,2554,2556,2558,2561,2563,2566,2568,2571,2573],{"class":1058,"line":1080},[1056,2553,1963],{"class":1798},[1056,2555,1966],{"class":1220},[1056,2557,1823],{"class":1369},[1056,2559,2560],{"class":1220},"contrib",[1056,2562,1823],{"class":1369},[1056,2564,2565],{"class":1220},"auth",[1056,2567,1823],{"class":1369},[1056,2569,2570],{"class":1220},"decorators ",[1056,2572,1799],{"class":1798},[1056,2574,2575],{"class":1220}," login_required\n",[1056,2577,2578,2580],{"class":1058,"line":1087},[1056,2579,1799],{"class":1798},[1056,2581,1958],{"class":1220},[1056,2583,2584],{"class":1058,"line":1093},[1056,2585,1084],{"emptyLinePlaceholder":1083},[1056,2587,2588,2591],{"class":1058,"line":1099},[1056,2589,2590],{"class":1369},"@",[1056,2592,2593],{"class":1994},"login_required\n",[1056,2595,2596,2598,2601,2603,2606,2608,2611],{"class":1058,"line":1105},[1056,2597,1991],{"class":1990},[1056,2599,2600],{"class":1994}," serve_protected_media",[1056,2602,1998],{"class":1369},[1056,2604,2605],{"class":2001},"request",[1056,2607,1442],{"class":1369},[1056,2609,2610],{"class":2001}," file_path",[1056,2612,2013],{"class":1369},[1056,2614,2615,2617,2620],{"class":1058,"line":1111},[1056,2616,2019],{"class":2018},[1056,2618,2619],{"class":2022},"Serve protected media files in development.",[1056,2621,2026],{"class":2018},[1056,2623,2624,2627,2630,2632,2634,2636],{"class":1058,"line":1117},[1056,2625,2626],{"class":1798},"    if",[1056,2628,2629],{"class":1605}," not",[1056,2631,2292],{"class":1220},[1056,2633,1823],{"class":1369},[1056,2635,1366],{"class":2061},[1056,2637,1830],{"class":1369},[1056,2639,2640,2643,2646,2648,2650,2653,2655],{"class":1058,"line":1123},[1056,2641,2642],{"class":1798},"        raise",[1056,2644,2645],{"class":2067}," Http404",[1056,2647,1998],{"class":1369},[1056,2649,1907],{"class":1398},[1056,2651,2652],{"class":1073},"Not found",[1056,2654,1907],{"class":1398},[1056,2656,2123],{"class":1369},[1056,2658,2659],{"class":1058,"line":1129},[1056,2660,2661],{"class":1220},"    \n",[1056,2663,2664,2667,2669,2672,2674,2677,2679,2682,2684,2686,2688,2690,2692,2694],{"class":1058,"line":1311},[1056,2665,2666],{"class":1220},"    file_full_path ",[1056,2668,2080],{"class":1369},[1056,2670,2671],{"class":1220}," os",[1056,2673,1823],{"class":1369},[1056,2675,2676],{"class":1826},"path",[1056,2678,1823],{"class":1369},[1056,2680,2681],{"class":2067},"join",[1056,2683,1998],{"class":1369},[1056,2685,2314],{"class":2067},[1056,2687,1823],{"class":1369},[1056,2689,1652],{"class":2061},[1056,2691,1442],{"class":1369},[1056,2693,2610],{"class":2067},[1056,2695,2123],{"class":1369},[1056,2697,2698],{"class":1058,"line":1316},[1056,2699,2661],{"class":1220},[1056,2701,2702,2704,2706,2708,2710,2712,2714,2717,2719,2722],{"class":1058,"line":1322},[1056,2703,2626],{"class":1798},[1056,2705,2629],{"class":1605},[1056,2707,2671],{"class":1220},[1056,2709,1823],{"class":1369},[1056,2711,2676],{"class":1826},[1056,2713,1823],{"class":1369},[1056,2715,2716],{"class":2067},"exists",[1056,2718,1998],{"class":1369},[1056,2720,2721],{"class":2067},"file_full_path",[1056,2723,2013],{"class":1369},[1056,2725,2726,2728,2730,2732,2734,2737,2739],{"class":1058,"line":1471},[1056,2727,2642],{"class":1798},[1056,2729,2645],{"class":2067},[1056,2731,1998],{"class":1369},[1056,2733,1907],{"class":1398},[1056,2735,2736],{"class":1073},"File not found",[1056,2738,1907],{"class":1398},[1056,2740,2123],{"class":1369},[1056,2742,2743],{"class":1058,"line":1477},[1056,2744,2661],{"class":1220},[1056,2746,2747,2750,2752,2754,2757,2759,2761,2763,2765,2768,2770],{"class":1058,"line":1487},[1056,2748,2749],{"class":1798},"    return",[1056,2751,2544],{"class":2067},[1056,2753,1998],{"class":1369},[1056,2755,2756],{"class":1897},"open",[1056,2758,1998],{"class":1369},[1056,2760,2721],{"class":2067},[1056,2762,1442],{"class":1369},[1056,2764,1554],{"class":1398},[1056,2766,2767],{"class":1073},"rb",[1056,2769,1405],{"class":1398},[1056,2771,2772],{"class":1369},"))\n",[1056,2774,2775],{"class":1058,"line":1498},[1056,2776,1084],{"emptyLinePlaceholder":1083},[1056,2778,2779],{"class":1058,"line":1509},[1056,2780,2212],{"class":1062},[1056,2782,2783,2785,2787],{"class":1058,"line":1520},[1056,2784,2263],{"class":1220},[1056,2786,2080],{"class":1369},[1056,2788,1393],{"class":1369},[1056,2790,2791,2794,2796,2798,2801,2803,2805,2808,2810,2813],{"class":1058,"line":1525},[1056,2792,2793],{"class":2067},"    path",[1056,2795,1998],{"class":1369},[1056,2797,1405],{"class":1398},[1056,2799,2800],{"class":1073},"protected-media/\u003Cpath:file_path>/",[1056,2802,1405],{"class":1398},[1056,2804,1442],{"class":1369},[1056,2806,2807],{"class":2067}," views",[1056,2809,1823],{"class":1369},[1056,2811,2812],{"class":1826},"serve_protected_media",[1056,2814,2815],{"class":1369},"),\n",[1056,2817,2818],{"class":1058,"line":1530},[1056,2819,1464],{"class":1369},[1030,2821,2823],{"id":2822},"development-server-enhancements","Development Server Enhancements",[1035,2825,2827],{"id":2826},"django-extensions-runserver-plus","Django Extensions RunServer Plus",[1026,2829,2830],{},[1042,2831,2832],{},"Installation:",[1046,2834,2836],{"className":1048,"code":2835,"language":1050,"meta":1051,"style":1051},"pip install django-extensions\n",[1053,2837,2838],{"__ignoreMap":1051},[1056,2839,2840,2843,2846],{"class":1058,"line":1059},[1056,2841,2842],{"class":1069},"pip",[1056,2844,2845],{"class":1073}," install",[1056,2847,2848],{"class":1073}," django-extensions\n",[1026,2850,2851],{},[1042,2852,2853],{},"Configuration:",[1046,2855,2857],{"className":1343,"code":2856,"language":1070,"meta":1051,"style":1051},"# settings/development.py\nINSTALLED_APPS += [\n    'django_extensions',\n]\n",[1053,2858,2859,2863,2873,2884],{"__ignoreMap":1051},[1056,2860,2861],{"class":1058,"line":1059},[1056,2862,1351],{"class":1062},[1056,2864,2865,2868,2871],{"class":1058,"line":1066},[1056,2866,2867],{"class":1365},"INSTALLED_APPS",[1056,2869,2870],{"class":1369}," +=",[1056,2872,1393],{"class":1369},[1056,2874,2875,2877,2880,2882],{"class":1058,"line":1080},[1056,2876,1399],{"class":1398},[1056,2878,2879],{"class":1073},"django_extensions",[1056,2881,1405],{"class":1398},[1056,2883,1408],{"class":1369},[1056,2885,2886],{"class":1058,"line":1087},[1056,2887,1464],{"class":1369},[1026,2889,2890],{},[1042,2891,2892],{},"Enhanced Server Features:",[1046,2894,2896],{"className":1048,"code":2895,"language":1050,"meta":1051,"style":1051},"# Start enhanced development server\npython manage.py runserver_plus\n\n# Features:\n# - Werkzeug debugger\n# - Interactive error pages\n# - Better error formatting\n# - Request profiling\n\n# With SSL support\npython manage.py runserver_plus --cert-file cert.pem --key-file key.pem\n\n# With specific reloader\npython manage.py runserver_plus --reloader-type stat\n",[1053,2897,2898,2903,2912,2916,2921,2926,2931,2936,2941,2945,2950,2971,2975,2980],{"__ignoreMap":1051},[1056,2899,2900],{"class":1058,"line":1059},[1056,2901,2902],{"class":1062},"# Start enhanced development server\n",[1056,2904,2905,2907,2909],{"class":1058,"line":1066},[1056,2906,1070],{"class":1069},[1056,2908,1074],{"class":1073},[1056,2910,2911],{"class":1073}," runserver_plus\n",[1056,2913,2914],{"class":1058,"line":1080},[1056,2915,1084],{"emptyLinePlaceholder":1083},[1056,2917,2918],{"class":1058,"line":1087},[1056,2919,2920],{"class":1062},"# Features:\n",[1056,2922,2923],{"class":1058,"line":1093},[1056,2924,2925],{"class":1062},"# - Werkzeug debugger\n",[1056,2927,2928],{"class":1058,"line":1099},[1056,2929,2930],{"class":1062},"# - Interactive error pages\n",[1056,2932,2933],{"class":1058,"line":1105},[1056,2934,2935],{"class":1062},"# - Better error formatting\n",[1056,2937,2938],{"class":1058,"line":1111},[1056,2939,2940],{"class":1062},"# - Request profiling\n",[1056,2942,2943],{"class":1058,"line":1117},[1056,2944,1084],{"emptyLinePlaceholder":1083},[1056,2946,2947],{"class":1058,"line":1123},[1056,2948,2949],{"class":1062},"# With SSL support\n",[1056,2951,2952,2954,2956,2959,2962,2965,2968],{"class":1058,"line":1129},[1056,2953,1070],{"class":1069},[1056,2955,1074],{"class":1073},[1056,2957,2958],{"class":1073}," runserver_plus",[1056,2960,2961],{"class":1247}," --cert-file",[1056,2963,2964],{"class":1073}," cert.pem",[1056,2966,2967],{"class":1247}," --key-file",[1056,2969,2970],{"class":1073}," key.pem\n",[1056,2972,2973],{"class":1058,"line":1311},[1056,2974,1084],{"emptyLinePlaceholder":1083},[1056,2976,2977],{"class":1058,"line":1316},[1056,2978,2979],{"class":1062},"# With specific reloader\n",[1056,2981,2982,2984,2986,2988,2991],{"class":1058,"line":1322},[1056,2983,1070],{"class":1069},[1056,2985,1074],{"class":1073},[1056,2987,2958],{"class":1073},[1056,2989,2990],{"class":1247}," --reloader-type",[1056,2992,2993],{"class":1073}," stat\n",[1035,2995,2997],{"id":2996},"browser-auto-reload","Browser Auto-Reload",[1026,2999,3000],{},[1042,3001,3002],{},"Django Browser Reload:",[1046,3004,3006],{"className":1048,"code":3005,"language":1050,"meta":1051,"style":1051},"pip install django-browser-reload\n",[1053,3007,3008],{"__ignoreMap":1051},[1056,3009,3010,3012,3014],{"class":1058,"line":1059},[1056,3011,2842],{"class":1069},[1056,3013,2845],{"class":1073},[1056,3015,3016],{"class":1073}," django-browser-reload\n",[1046,3018,3020],{"className":1343,"code":3019,"language":1070,"meta":1051,"style":1051},"# settings/development.py\nINSTALLED_APPS += [\n    'django_browser_reload',\n]\n\nMIDDLEWARE += [\n    'django_browser_reload.middleware.BrowserReloadMiddleware',\n]\n",[1053,3021,3022,3026,3034,3045,3049,3053,3062,3073],{"__ignoreMap":1051},[1056,3023,3024],{"class":1058,"line":1059},[1056,3025,1351],{"class":1062},[1056,3027,3028,3030,3032],{"class":1058,"line":1066},[1056,3029,2867],{"class":1365},[1056,3031,2870],{"class":1369},[1056,3033,1393],{"class":1369},[1056,3035,3036,3038,3041,3043],{"class":1058,"line":1080},[1056,3037,1399],{"class":1398},[1056,3039,3040],{"class":1073},"django_browser_reload",[1056,3042,1405],{"class":1398},[1056,3044,1408],{"class":1369},[1056,3046,3047],{"class":1058,"line":1087},[1056,3048,1464],{"class":1369},[1056,3050,3051],{"class":1058,"line":1093},[1056,3052,1084],{"emptyLinePlaceholder":1083},[1056,3054,3055,3058,3060],{"class":1058,"line":1099},[1056,3056,3057],{"class":1365},"MIDDLEWARE",[1056,3059,2870],{"class":1369},[1056,3061,1393],{"class":1369},[1056,3063,3064,3066,3069,3071],{"class":1058,"line":1105},[1056,3065,1399],{"class":1398},[1056,3067,3068],{"class":1073},"django_browser_reload.middleware.BrowserReloadMiddleware",[1056,3070,1405],{"class":1398},[1056,3072,1408],{"class":1369},[1056,3074,3075],{"class":1058,"line":1111},[1056,3076,1464],{"class":1369},[1026,3078,3079],{},[1042,3080,3081],{},"Template Integration:",[1046,3083,3087],{"className":3084,"code":3085,"language":3086,"meta":1051,"style":1051},"language-html shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","\u003C!-- base.html -->\n\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\n    \u003Ctitle>My Django App\u003C/title>\n    {% load static %}\n    {% if debug %}\n        {% load django_browser_reload %}\n        {% browser_reload_script %}\n    {% endif %}\n\u003C/head>\n\u003Cbody>\n    \u003C!-- Your content -->\n\u003C/body>\n\u003C/html>\n","html",[1053,3088,3089,3094,3110,3119,3128,3149,3154,3159,3164,3169,3174,3182,3191,3196,3204],{"__ignoreMap":1051},[1056,3090,3091],{"class":1058,"line":1059},[1056,3092,3093],{"class":1062},"\u003C!-- base.html -->\n",[1056,3095,3096,3099,3103,3107],{"class":1058,"line":1066},[1056,3097,3098],{"class":1369},"\u003C!",[1056,3100,3102],{"class":3101},"sJFLg","DOCTYPE",[1056,3104,3106],{"class":3105},"s5q8q"," html",[1056,3108,3109],{"class":1369},">\n",[1056,3111,3112,3115,3117],{"class":1058,"line":1080},[1056,3113,3114],{"class":1369},"\u003C",[1056,3116,3086],{"class":3101},[1056,3118,3109],{"class":1369},[1056,3120,3121,3123,3126],{"class":1058,"line":1087},[1056,3122,3114],{"class":1369},[1056,3124,3125],{"class":3101},"head",[1056,3127,3109],{"class":1369},[1056,3129,3130,3133,3136,3139,3142,3145,3147],{"class":1058,"line":1093},[1056,3131,3132],{"class":1369},"    \u003C",[1056,3134,3135],{"class":3101},"title",[1056,3137,3138],{"class":1369},">",[1056,3140,3141],{"class":1220},"My Django App",[1056,3143,3144],{"class":1369},"\u003C/",[1056,3146,3135],{"class":3101},[1056,3148,3109],{"class":1369},[1056,3150,3151],{"class":1058,"line":1099},[1056,3152,3153],{"class":1220},"    {% load static %}\n",[1056,3155,3156],{"class":1058,"line":1105},[1056,3157,3158],{"class":1220},"    {% if debug %}\n",[1056,3160,3161],{"class":1058,"line":1111},[1056,3162,3163],{"class":1220},"        {% load django_browser_reload %}\n",[1056,3165,3166],{"class":1058,"line":1117},[1056,3167,3168],{"class":1220},"        {% browser_reload_script %}\n",[1056,3170,3171],{"class":1058,"line":1123},[1056,3172,3173],{"class":1220},"    {% endif %}\n",[1056,3175,3176,3178,3180],{"class":1058,"line":1129},[1056,3177,3144],{"class":1369},[1056,3179,3125],{"class":3101},[1056,3181,3109],{"class":1369},[1056,3183,3184,3186,3189],{"class":1058,"line":1311},[1056,3185,3114],{"class":1369},[1056,3187,3188],{"class":3101},"body",[1056,3190,3109],{"class":1369},[1056,3192,3193],{"class":1058,"line":1316},[1056,3194,3195],{"class":1062},"    \u003C!-- Your content -->\n",[1056,3197,3198,3200,3202],{"class":1058,"line":1322},[1056,3199,3144],{"class":1369},[1056,3201,3188],{"class":3101},[1056,3203,3109],{"class":1369},[1056,3205,3206,3208,3210],{"class":1058,"line":1471},[1056,3207,3144],{"class":1369},[1056,3209,3086],{"class":3101},[1056,3211,3109],{"class":1369},[1035,3213,3215],{"id":3214},"live-reloading-with-external-tools","Live Reloading with External Tools",[1026,3217,3218],{},[1042,3219,3220],{},"Using Browser-Sync:",[1046,3222,3224],{"className":1048,"code":3223,"language":1050,"meta":1051,"style":1051},"# Install browser-sync\nnpm install -g browser-sync\n\n# Start Django server\npython manage.py runserver 8000\n\n# Start browser-sync proxy\nbrowser-sync start --proxy \"localhost:8000\" --files \"**/*.py,**/*.html,**/*.css,**/*.js\"\n",[1053,3225,3226,3231,3244,3248,3253,3264,3268,3273],{"__ignoreMap":1051},[1056,3227,3228],{"class":1058,"line":1059},[1056,3229,3230],{"class":1062},"# Install browser-sync\n",[1056,3232,3233,3236,3238,3241],{"class":1058,"line":1066},[1056,3234,3235],{"class":1069},"npm",[1056,3237,2845],{"class":1073},[1056,3239,3240],{"class":1247}," -g",[1056,3242,3243],{"class":1073}," browser-sync\n",[1056,3245,3246],{"class":1058,"line":1080},[1056,3247,1084],{"emptyLinePlaceholder":1083},[1056,3249,3250],{"class":1058,"line":1087},[1056,3251,3252],{"class":1062},"# Start Django server\n",[1056,3254,3255,3257,3259,3261],{"class":1058,"line":1093},[1056,3256,1070],{"class":1069},[1056,3258,1074],{"class":1073},[1056,3260,1156],{"class":1073},[1056,3262,3263],{"class":1159}," 8000\n",[1056,3265,3266],{"class":1058,"line":1099},[1056,3267,1084],{"emptyLinePlaceholder":1083},[1056,3269,3270],{"class":1058,"line":1105},[1056,3271,3272],{"class":1062},"# Start browser-sync proxy\n",[1056,3274,3275,3278,3281,3284,3286,3289,3291,3294,3296,3299],{"class":1058,"line":1111},[1056,3276,3277],{"class":1069},"browser-sync",[1056,3279,3280],{"class":1073}," start",[1056,3282,3283],{"class":1247}," --proxy",[1056,3285,1901],{"class":1398},[1056,3287,3288],{"class":1073},"localhost:8000",[1056,3290,1907],{"class":1398},[1056,3292,3293],{"class":1247}," --files",[1056,3295,1901],{"class":1398},[1056,3297,3298],{"class":1073},"**/*.py,**/*.html,**/*.css,**/*.js",[1056,3300,3301],{"class":1398},"\"\n",[1026,3303,3304],{},[1042,3305,3306],{},"Using Gulp for Asset Watching:",[1046,3308,3312],{"className":3309,"code":3310,"language":3311,"meta":1051,"style":1051},"language-javascript shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","// gulpfile.js\nconst gulp = require('gulp');\nconst browserSync = require('browser-sync').create();\n\ngulp.task('serve', function() {\n    browserSync.init({\n        proxy: \"localhost:8000\",\n        files: [\n            \"**/*.py\",\n            \"templates/**/*.html\",\n            \"static/**/*.css\",\n            \"static/**/*.js\"\n        ]\n    });\n});\n\ngulp.task('default', ['serve']);\n","javascript",[1053,3313,3314,3319,3324,3329,3333,3338,3343,3348,3353,3358,3363,3368,3373,3378,3383,3388,3392],{"__ignoreMap":1051},[1056,3315,3316],{"class":1058,"line":1059},[1056,3317,3318],{},"// gulpfile.js\n",[1056,3320,3321],{"class":1058,"line":1066},[1056,3322,3323],{},"const gulp = require('gulp');\n",[1056,3325,3326],{"class":1058,"line":1080},[1056,3327,3328],{},"const browserSync = require('browser-sync').create();\n",[1056,3330,3331],{"class":1058,"line":1087},[1056,3332,1084],{"emptyLinePlaceholder":1083},[1056,3334,3335],{"class":1058,"line":1093},[1056,3336,3337],{},"gulp.task('serve', function() {\n",[1056,3339,3340],{"class":1058,"line":1099},[1056,3341,3342],{},"    browserSync.init({\n",[1056,3344,3345],{"class":1058,"line":1105},[1056,3346,3347],{},"        proxy: \"localhost:8000\",\n",[1056,3349,3350],{"class":1058,"line":1111},[1056,3351,3352],{},"        files: [\n",[1056,3354,3355],{"class":1058,"line":1117},[1056,3356,3357],{},"            \"**/*.py\",\n",[1056,3359,3360],{"class":1058,"line":1123},[1056,3361,3362],{},"            \"templates/**/*.html\",\n",[1056,3364,3365],{"class":1058,"line":1129},[1056,3366,3367],{},"            \"static/**/*.css\",\n",[1056,3369,3370],{"class":1058,"line":1311},[1056,3371,3372],{},"            \"static/**/*.js\"\n",[1056,3374,3375],{"class":1058,"line":1316},[1056,3376,3377],{},"        ]\n",[1056,3379,3380],{"class":1058,"line":1322},[1056,3381,3382],{},"    });\n",[1056,3384,3385],{"class":1058,"line":1471},[1056,3386,3387],{},"});\n",[1056,3389,3390],{"class":1058,"line":1477},[1056,3391,1084],{"emptyLinePlaceholder":1083},[1056,3393,3394],{"class":1058,"line":1487},[1056,3395,3396],{},"gulp.task('default', ['serve']);\n",[1030,3398,3400],{"id":3399},"performance-optimization","Performance Optimization",[1035,3402,3404],{"id":3403},"development-server-performance","Development Server Performance",[1026,3406,3407],{},[1042,3408,3409],{},"Optimizing for Development:",[1046,3411,3413],{"className":1343,"code":3412,"language":1070,"meta":1051,"style":1051},"# settings/development.py\n\n# Database optimization for development\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': BASE_DIR / 'db.sqlite3',\n        'OPTIONS': {\n            'timeout': 20,\n        }\n    }\n}\n\n# Disable unnecessary middleware in development\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    # Remove clickjacking protection in development\n    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\n# Optimize template loading\nTEMPLATES[0]['OPTIONS']['debug'] = True\nTEMPLATES[0]['OPTIONS']['string_if_invalid'] = 'INVALID_VARIABLE'\n\n# Disable logging for better performance\nLOGGING_CONFIG = None\n",[1053,3414,3415,3419,3423,3428,3438,3452,3473,3497,3510,3527,3532,3537,3542,3546,3551,3559,3570,3581,3592,3603,3614,3625,3630,3635,3639,3643,3648,3684,3720,3724,3729],{"__ignoreMap":1051},[1056,3416,3417],{"class":1058,"line":1059},[1056,3418,1351],{"class":1062},[1056,3420,3421],{"class":1058,"line":1066},[1056,3422,1084],{"emptyLinePlaceholder":1083},[1056,3424,3425],{"class":1058,"line":1080},[1056,3426,3427],{"class":1062},"# Database optimization for development\n",[1056,3429,3430,3433,3435],{"class":1058,"line":1087},[1056,3431,3432],{"class":1365},"DATABASES",[1056,3434,1370],{"class":1369},[1056,3436,3437],{"class":1369}," {\n",[1056,3439,3440,3442,3445,3447,3450],{"class":1058,"line":1093},[1056,3441,1399],{"class":1398},[1056,3443,3444],{"class":1073},"default",[1056,3446,1405],{"class":1398},[1056,3448,3449],{"class":1369},":",[1056,3451,3437],{"class":1369},[1056,3453,3454,3457,3460,3462,3464,3466,3469,3471],{"class":1058,"line":1099},[1056,3455,3456],{"class":1398},"        '",[1056,3458,3459],{"class":1073},"ENGINE",[1056,3461,1405],{"class":1398},[1056,3463,3449],{"class":1369},[1056,3465,1554],{"class":1398},[1056,3467,3468],{"class":1073},"django.db.backends.sqlite3",[1056,3470,1405],{"class":1398},[1056,3472,1408],{"class":1369},[1056,3474,3475,3477,3480,3482,3484,3486,3488,3490,3493,3495],{"class":1058,"line":1105},[1056,3476,3456],{"class":1398},[1056,3478,3479],{"class":1073},"NAME",[1056,3481,1405],{"class":1398},[1056,3483,3449],{"class":1369},[1056,3485,1657],{"class":1365},[1056,3487,1606],{"class":1605},[1056,3489,1554],{"class":1398},[1056,3491,3492],{"class":1073},"db.sqlite3",[1056,3494,1405],{"class":1398},[1056,3496,1408],{"class":1369},[1056,3498,3499,3501,3504,3506,3508],{"class":1058,"line":1111},[1056,3500,3456],{"class":1398},[1056,3502,3503],{"class":1073},"OPTIONS",[1056,3505,1405],{"class":1398},[1056,3507,3449],{"class":1369},[1056,3509,3437],{"class":1369},[1056,3511,3512,3515,3518,3520,3522,3525],{"class":1058,"line":1117},[1056,3513,3514],{"class":1398},"            '",[1056,3516,3517],{"class":1073},"timeout",[1056,3519,1405],{"class":1398},[1056,3521,3449],{"class":1369},[1056,3523,3524],{"class":1159}," 20",[1056,3526,1408],{"class":1369},[1056,3528,3529],{"class":1058,"line":1123},[1056,3530,3531],{"class":1369},"        }\n",[1056,3533,3534],{"class":1058,"line":1129},[1056,3535,3536],{"class":1369},"    }\n",[1056,3538,3539],{"class":1058,"line":1311},[1056,3540,3541],{"class":1369},"}\n",[1056,3543,3544],{"class":1058,"line":1316},[1056,3545,1084],{"emptyLinePlaceholder":1083},[1056,3547,3548],{"class":1058,"line":1322},[1056,3549,3550],{"class":1062},"# Disable unnecessary middleware in development\n",[1056,3552,3553,3555,3557],{"class":1058,"line":1471},[1056,3554,3057],{"class":1365},[1056,3556,1370],{"class":1369},[1056,3558,1393],{"class":1369},[1056,3560,3561,3563,3566,3568],{"class":1058,"line":1477},[1056,3562,1399],{"class":1398},[1056,3564,3565],{"class":1073},"django.middleware.security.SecurityMiddleware",[1056,3567,1405],{"class":1398},[1056,3569,1408],{"class":1369},[1056,3571,3572,3574,3577,3579],{"class":1058,"line":1487},[1056,3573,1399],{"class":1398},[1056,3575,3576],{"class":1073},"django.contrib.sessions.middleware.SessionMiddleware",[1056,3578,1405],{"class":1398},[1056,3580,1408],{"class":1369},[1056,3582,3583,3585,3588,3590],{"class":1058,"line":1498},[1056,3584,1399],{"class":1398},[1056,3586,3587],{"class":1073},"django.middleware.common.CommonMiddleware",[1056,3589,1405],{"class":1398},[1056,3591,1408],{"class":1369},[1056,3593,3594,3596,3599,3601],{"class":1058,"line":1509},[1056,3595,1399],{"class":1398},[1056,3597,3598],{"class":1073},"django.middleware.csrf.CsrfViewMiddleware",[1056,3600,1405],{"class":1398},[1056,3602,1408],{"class":1369},[1056,3604,3605,3607,3610,3612],{"class":1058,"line":1520},[1056,3606,1399],{"class":1398},[1056,3608,3609],{"class":1073},"django.contrib.auth.middleware.AuthenticationMiddleware",[1056,3611,1405],{"class":1398},[1056,3613,1408],{"class":1369},[1056,3615,3616,3618,3621,3623],{"class":1058,"line":1525},[1056,3617,1399],{"class":1398},[1056,3619,3620],{"class":1073},"django.contrib.messages.middleware.MessageMiddleware",[1056,3622,1405],{"class":1398},[1056,3624,1408],{"class":1369},[1056,3626,3627],{"class":1058,"line":1530},[1056,3628,3629],{"class":1062},"    # Remove clickjacking protection in development\n",[1056,3631,3632],{"class":1058,"line":1536},[1056,3633,3634],{"class":1062},"    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n",[1056,3636,3637],{"class":1058,"line":1546},[1056,3638,1464],{"class":1369},[1056,3640,3641],{"class":1058,"line":1563},[1056,3642,1084],{"emptyLinePlaceholder":1083},[1056,3644,3645],{"class":1058,"line":1568},[1056,3646,3647],{"class":1062},"# Optimize template loading\n",[1056,3649,3650,3653,3656,3659,3662,3664,3666,3668,3670,3672,3675,3677,3680,3682],{"class":1058,"line":1574},[1056,3651,3652],{"class":1365},"TEMPLATES",[1056,3654,3655],{"class":1369},"[",[1056,3657,3658],{"class":1159},"0",[1056,3660,3661],{"class":1369},"][",[1056,3663,1405],{"class":1398},[1056,3665,3503],{"class":1073},[1056,3667,1405],{"class":1398},[1056,3669,3661],{"class":1369},[1056,3671,1405],{"class":1398},[1056,3673,3674],{"class":1073},"debug",[1056,3676,1405],{"class":1398},[1056,3678,3679],{"class":1369},"]",[1056,3681,1370],{"class":1369},[1056,3683,1374],{"class":1373},[1056,3685,3686,3688,3690,3692,3694,3696,3698,3700,3702,3704,3707,3709,3711,3713,3715,3718],{"class":1058,"line":1589},[1056,3687,3652],{"class":1365},[1056,3689,3655],{"class":1369},[1056,3691,3658],{"class":1159},[1056,3693,3661],{"class":1369},[1056,3695,1405],{"class":1398},[1056,3697,3503],{"class":1073},[1056,3699,1405],{"class":1398},[1056,3701,3661],{"class":1369},[1056,3703,1405],{"class":1398},[1056,3705,3706],{"class":1073},"string_if_invalid",[1056,3708,1405],{"class":1398},[1056,3710,3679],{"class":1369},[1056,3712,1370],{"class":1369},[1056,3714,1554],{"class":1398},[1056,3716,3717],{"class":1073},"INVALID_VARIABLE",[1056,3719,1560],{"class":1398},[1056,3721,3722],{"class":1058,"line":1599},[1056,3723,1084],{"emptyLinePlaceholder":1083},[1056,3725,3726],{"class":1058,"line":1618},[1056,3727,3728],{"class":1062},"# Disable logging for better performance\n",[1056,3730,3731,3734,3736],{"class":1058,"line":1623},[1056,3732,3733],{"class":1365},"LOGGING_CONFIG",[1056,3735,1370],{"class":1369},[1056,3737,3738],{"class":1373}," None\n",[1026,3740,3741],{},[1042,3742,3743],{},"Memory Usage Optimization:",[1046,3745,3747],{"className":1343,"code":3746,"language":1070,"meta":1051,"style":1051},"# settings/development.py\n\n# Reduce memory usage for large datasets\nDATA_UPLOAD_MAX_MEMORY_SIZE = 2621440  # 2.5MB\nFILE_UPLOAD_MAX_MEMORY_SIZE = 2621440  # 2.5MB\n\n# Use dummy cache to avoid memory buildup\nCACHES = {\n    'default': {\n        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n    }\n}\n\n# Optimize session handling\nSESSION_ENGINE = 'django.contrib.sessions.backends.db'\nSESSION_COOKIE_AGE = 3600  # 1 hour\n",[1053,3748,3749,3753,3757,3762,3775,3786,3790,3795,3804,3816,3836,3840,3844,3848,3853,3867],{"__ignoreMap":1051},[1056,3750,3751],{"class":1058,"line":1059},[1056,3752,1351],{"class":1062},[1056,3754,3755],{"class":1058,"line":1066},[1056,3756,1084],{"emptyLinePlaceholder":1083},[1056,3758,3759],{"class":1058,"line":1080},[1056,3760,3761],{"class":1062},"# Reduce memory usage for large datasets\n",[1056,3763,3764,3767,3769,3772],{"class":1058,"line":1087},[1056,3765,3766],{"class":1365},"DATA_UPLOAD_MAX_MEMORY_SIZE",[1056,3768,1370],{"class":1369},[1056,3770,3771],{"class":1159}," 2621440",[1056,3773,3774],{"class":1062},"  # 2.5MB\n",[1056,3776,3777,3780,3782,3784],{"class":1058,"line":1093},[1056,3778,3779],{"class":1365},"FILE_UPLOAD_MAX_MEMORY_SIZE",[1056,3781,1370],{"class":1369},[1056,3783,3771],{"class":1159},[1056,3785,3774],{"class":1062},[1056,3787,3788],{"class":1058,"line":1099},[1056,3789,1084],{"emptyLinePlaceholder":1083},[1056,3791,3792],{"class":1058,"line":1105},[1056,3793,3794],{"class":1062},"# Use dummy cache to avoid memory buildup\n",[1056,3796,3797,3800,3802],{"class":1058,"line":1111},[1056,3798,3799],{"class":1365},"CACHES",[1056,3801,1370],{"class":1369},[1056,3803,3437],{"class":1369},[1056,3805,3806,3808,3810,3812,3814],{"class":1058,"line":1117},[1056,3807,1399],{"class":1398},[1056,3809,3444],{"class":1073},[1056,3811,1405],{"class":1398},[1056,3813,3449],{"class":1369},[1056,3815,3437],{"class":1369},[1056,3817,3818,3820,3823,3825,3827,3829,3832,3834],{"class":1058,"line":1123},[1056,3819,3456],{"class":1398},[1056,3821,3822],{"class":1073},"BACKEND",[1056,3824,1405],{"class":1398},[1056,3826,3449],{"class":1369},[1056,3828,1554],{"class":1398},[1056,3830,3831],{"class":1073},"django.core.cache.backends.dummy.DummyCache",[1056,3833,1405],{"class":1398},[1056,3835,1408],{"class":1369},[1056,3837,3838],{"class":1058,"line":1129},[1056,3839,3536],{"class":1369},[1056,3841,3842],{"class":1058,"line":1311},[1056,3843,3541],{"class":1369},[1056,3845,3846],{"class":1058,"line":1316},[1056,3847,1084],{"emptyLinePlaceholder":1083},[1056,3849,3850],{"class":1058,"line":1322},[1056,3851,3852],{"class":1062},"# Optimize session handling\n",[1056,3854,3855,3858,3860,3862,3865],{"class":1058,"line":1471},[1056,3856,3857],{"class":1365},"SESSION_ENGINE",[1056,3859,1370],{"class":1369},[1056,3861,1554],{"class":1398},[1056,3863,3864],{"class":1073},"django.contrib.sessions.backends.db",[1056,3866,1560],{"class":1398},[1056,3868,3869,3872,3874,3877],{"class":1058,"line":1477},[1056,3870,3871],{"class":1365},"SESSION_COOKIE_AGE",[1056,3873,1370],{"class":1369},[1056,3875,3876],{"class":1159}," 3600",[1056,3878,3879],{"class":1062},"  # 1 hour\n",[1035,3881,3883],{"id":3882},"profiling-development-server","Profiling Development Server",[1026,3885,3886],{},[1042,3887,3888],{},"Using Django Silk:",[1046,3890,3892],{"className":1048,"code":3891,"language":1050,"meta":1051,"style":1051},"pip install django-silk\n",[1053,3893,3894],{"__ignoreMap":1051},[1056,3895,3896,3898,3900],{"class":1058,"line":1059},[1056,3897,2842],{"class":1069},[1056,3899,2845],{"class":1073},[1056,3901,3902],{"class":1073}," django-silk\n",[1046,3904,3906],{"className":1343,"code":3905,"language":1070,"meta":1051,"style":1051},"# settings/development.py\nINSTALLED_APPS += [\n    'silk',\n]\n\nMIDDLEWARE += [\n    'silk.middleware.SilkyMiddleware',\n]\n\n# Silk configuration\nSILKY_PYTHON_PROFILER = True\nSILKY_PYTHON_PROFILER_BINARY = True\nSILKY_AUTHENTICATION = True\nSILKY_AUTHORISATION = True\n",[1053,3907,3908,3912,3920,3931,3935,3939,3947,3958,3962,3966,3971,3980,3989,3998],{"__ignoreMap":1051},[1056,3909,3910],{"class":1058,"line":1059},[1056,3911,1351],{"class":1062},[1056,3913,3914,3916,3918],{"class":1058,"line":1066},[1056,3915,2867],{"class":1365},[1056,3917,2870],{"class":1369},[1056,3919,1393],{"class":1369},[1056,3921,3922,3924,3927,3929],{"class":1058,"line":1080},[1056,3923,1399],{"class":1398},[1056,3925,3926],{"class":1073},"silk",[1056,3928,1405],{"class":1398},[1056,3930,1408],{"class":1369},[1056,3932,3933],{"class":1058,"line":1087},[1056,3934,1464],{"class":1369},[1056,3936,3937],{"class":1058,"line":1093},[1056,3938,1084],{"emptyLinePlaceholder":1083},[1056,3940,3941,3943,3945],{"class":1058,"line":1099},[1056,3942,3057],{"class":1365},[1056,3944,2870],{"class":1369},[1056,3946,1393],{"class":1369},[1056,3948,3949,3951,3954,3956],{"class":1058,"line":1105},[1056,3950,1399],{"class":1398},[1056,3952,3953],{"class":1073},"silk.middleware.SilkyMiddleware",[1056,3955,1405],{"class":1398},[1056,3957,1408],{"class":1369},[1056,3959,3960],{"class":1058,"line":1111},[1056,3961,1464],{"class":1369},[1056,3963,3964],{"class":1058,"line":1117},[1056,3965,1084],{"emptyLinePlaceholder":1083},[1056,3967,3968],{"class":1058,"line":1123},[1056,3969,3970],{"class":1062},"# Silk configuration\n",[1056,3972,3973,3976,3978],{"class":1058,"line":1129},[1056,3974,3975],{"class":1365},"SILKY_PYTHON_PROFILER",[1056,3977,1370],{"class":1369},[1056,3979,1374],{"class":1373},[1056,3981,3982,3985,3987],{"class":1058,"line":1311},[1056,3983,3984],{"class":1365},"SILKY_PYTHON_PROFILER_BINARY",[1056,3986,1370],{"class":1369},[1056,3988,1374],{"class":1373},[1056,3990,3991,3994,3996],{"class":1058,"line":1316},[1056,3992,3993],{"class":1365},"SILKY_AUTHENTICATION",[1056,3995,1370],{"class":1369},[1056,3997,1374],{"class":1373},[1056,3999,4000,4003,4005],{"class":1058,"line":1322},[1056,4001,4002],{"class":1365},"SILKY_AUTHORISATION",[1056,4004,1370],{"class":1369},[1056,4006,1374],{"class":1373},[1026,4008,4009],{},[1042,4010,4011],{},"Access Profiling:",[1046,4013,4015],{"className":1048,"code":4014,"language":1050,"meta":1051,"style":1051},"# Start server\npython manage.py runserver\n\n# Visit your application, then check profiling at:\n# http://localhost:8000/silk/\n",[1053,4016,4017,4022,4030,4034,4039],{"__ignoreMap":1051},[1056,4018,4019],{"class":1058,"line":1059},[1056,4020,4021],{"class":1062},"# Start server\n",[1056,4023,4024,4026,4028],{"class":1058,"line":1066},[1056,4025,1070],{"class":1069},[1056,4027,1074],{"class":1073},[1056,4029,1077],{"class":1073},[1056,4031,4032],{"class":1058,"line":1080},[1056,4033,1084],{"emptyLinePlaceholder":1083},[1056,4035,4036],{"class":1058,"line":1087},[1056,4037,4038],{"class":1062},"# Visit your application, then check profiling at:\n",[1056,4040,4041],{"class":1058,"line":1093},[1056,4042,4043],{"class":1062},"# http://localhost:8000/silk/\n",[1030,4045,4047],{"id":4046},"debugging-and-development-tools","Debugging and Development Tools",[1035,4049,4051],{"id":4050},"debug-toolbar-integration","Debug Toolbar Integration",[1026,4053,4054],{},[1042,4055,4056],{},"Installation and Setup:",[1046,4058,4060],{"className":1048,"code":4059,"language":1050,"meta":1051,"style":1051},"pip install django-debug-toolbar\n",[1053,4061,4062],{"__ignoreMap":1051},[1056,4063,4064,4066,4068],{"class":1058,"line":1059},[1056,4065,2842],{"class":1069},[1056,4067,2845],{"class":1073},[1056,4069,4070],{"class":1073}," django-debug-toolbar\n",[1046,4072,4074],{"className":1343,"code":4073,"language":1070,"meta":1051,"style":1051},"# settings/development.py\nINSTALLED_APPS += [\n    'debug_toolbar',\n]\n\nMIDDLEWARE += [\n    'debug_toolbar.middleware.DebugToolbarMiddleware',\n]\n\nDEBUG_TOOLBAR_CONFIG = {\n    'SHOW_TOOLBAR_CALLBACK': lambda request: True,\n    'SHOW_COLLAPSED': True,\n    'INTERCEPT_REDIRECTS': False,\n}\n\nINTERNAL_IPS = [\n    '127.0.0.1',\n    'localhost',\n]\n",[1053,4075,4076,4080,4088,4099,4103,4107,4115,4126,4130,4134,4143,4166,4181,4197,4201,4205,4213,4223,4233],{"__ignoreMap":1051},[1056,4077,4078],{"class":1058,"line":1059},[1056,4079,1351],{"class":1062},[1056,4081,4082,4084,4086],{"class":1058,"line":1066},[1056,4083,2867],{"class":1365},[1056,4085,2870],{"class":1369},[1056,4087,1393],{"class":1369},[1056,4089,4090,4092,4095,4097],{"class":1058,"line":1080},[1056,4091,1399],{"class":1398},[1056,4093,4094],{"class":1073},"debug_toolbar",[1056,4096,1405],{"class":1398},[1056,4098,1408],{"class":1369},[1056,4100,4101],{"class":1058,"line":1087},[1056,4102,1464],{"class":1369},[1056,4104,4105],{"class":1058,"line":1093},[1056,4106,1084],{"emptyLinePlaceholder":1083},[1056,4108,4109,4111,4113],{"class":1058,"line":1099},[1056,4110,3057],{"class":1365},[1056,4112,2870],{"class":1369},[1056,4114,1393],{"class":1369},[1056,4116,4117,4119,4122,4124],{"class":1058,"line":1105},[1056,4118,1399],{"class":1398},[1056,4120,4121],{"class":1073},"debug_toolbar.middleware.DebugToolbarMiddleware",[1056,4123,1405],{"class":1398},[1056,4125,1408],{"class":1369},[1056,4127,4128],{"class":1058,"line":1111},[1056,4129,1464],{"class":1369},[1056,4131,4132],{"class":1058,"line":1117},[1056,4133,1084],{"emptyLinePlaceholder":1083},[1056,4135,4136,4139,4141],{"class":1058,"line":1123},[1056,4137,4138],{"class":1365},"DEBUG_TOOLBAR_CONFIG",[1056,4140,1370],{"class":1369},[1056,4142,3437],{"class":1369},[1056,4144,4145,4147,4150,4152,4154,4157,4160,4162,4164],{"class":1058,"line":1129},[1056,4146,1399],{"class":1398},[1056,4148,4149],{"class":1073},"SHOW_TOOLBAR_CALLBACK",[1056,4151,1405],{"class":1398},[1056,4153,3449],{"class":1369},[1056,4155,4156],{"class":1990}," lambda",[1056,4158,4159],{"class":2001}," request",[1056,4161,3449],{"class":1369},[1056,4163,1845],{"class":1373},[1056,4165,1408],{"class":1369},[1056,4167,4168,4170,4173,4175,4177,4179],{"class":1058,"line":1311},[1056,4169,1399],{"class":1398},[1056,4171,4172],{"class":1073},"SHOW_COLLAPSED",[1056,4174,1405],{"class":1398},[1056,4176,3449],{"class":1369},[1056,4178,1845],{"class":1373},[1056,4180,1408],{"class":1369},[1056,4182,4183,4185,4188,4190,4192,4195],{"class":1058,"line":1316},[1056,4184,1399],{"class":1398},[1056,4186,4187],{"class":1073},"INTERCEPT_REDIRECTS",[1056,4189,1405],{"class":1398},[1056,4191,3449],{"class":1369},[1056,4193,4194],{"class":1373}," False",[1056,4196,1408],{"class":1369},[1056,4198,4199],{"class":1058,"line":1322},[1056,4200,3541],{"class":1369},[1056,4202,4203],{"class":1058,"line":1471},[1056,4204,1084],{"emptyLinePlaceholder":1083},[1056,4206,4207,4209,4211],{"class":1058,"line":1477},[1056,4208,1480],{"class":1365},[1056,4210,1370],{"class":1369},[1056,4212,1393],{"class":1369},[1056,4214,4215,4217,4219,4221],{"class":1058,"line":1487},[1056,4216,1399],{"class":1398},[1056,4218,1415],{"class":1073},[1056,4220,1405],{"class":1398},[1056,4222,1408],{"class":1369},[1056,4224,4225,4227,4229,4231],{"class":1058,"line":1498},[1056,4226,1399],{"class":1398},[1056,4228,1402],{"class":1073},[1056,4230,1405],{"class":1398},[1056,4232,1408],{"class":1369},[1056,4234,4235],{"class":1058,"line":1509},[1056,4236,1464],{"class":1369},[1026,4238,4239],{},[1042,4240,4241],{},"URL Configuration:",[1046,4243,4245],{"className":1343,"code":4244,"language":1070,"meta":1051,"style":1051},"# urls.py\nfrom django.conf import settings\n\nif settings.DEBUG:\n    import debug_toolbar\n    urlpatterns = [\n        path('__debug__/', include(debug_toolbar.urls)),\n    ] + urlpatterns\n",[1053,4246,4247,4251,4265,4269,4281,4288,4296,4326],{"__ignoreMap":1051},[1056,4248,4249],{"class":1058,"line":1059},[1056,4250,2212],{"class":1062},[1056,4252,4253,4255,4257,4259,4261,4263],{"class":1058,"line":1066},[1056,4254,1963],{"class":1798},[1056,4256,1966],{"class":1220},[1056,4258,1823],{"class":1369},[1056,4260,2223],{"class":1220},[1056,4262,1799],{"class":1798},[1056,4264,2228],{"class":1220},[1056,4266,4267],{"class":1058,"line":1080},[1056,4268,1084],{"emptyLinePlaceholder":1083},[1056,4270,4271,4273,4275,4277,4279],{"class":1058,"line":1087},[1056,4272,1807],{"class":1798},[1056,4274,2292],{"class":1220},[1056,4276,1823],{"class":1369},[1056,4278,1366],{"class":2061},[1056,4280,1830],{"class":1369},[1056,4282,4283,4285],{"class":1058,"line":1093},[1056,4284,2031],{"class":1798},[1056,4286,4287],{"class":1220}," debug_toolbar\n",[1056,4289,4290,4292,4294],{"class":1058,"line":1099},[1056,4291,2303],{"class":1220},[1056,4293,2080],{"class":1369},[1056,4295,1393],{"class":1369},[1056,4297,4298,4301,4303,4305,4308,4310,4312,4315,4317,4319,4321,4323],{"class":1058,"line":1105},[1056,4299,4300],{"class":2067},"        path",[1056,4302,1998],{"class":1369},[1056,4304,1405],{"class":1398},[1056,4306,4307],{"class":1073},"__debug__/",[1056,4309,1405],{"class":1398},[1056,4311,1442],{"class":1369},[1056,4313,4314],{"class":2067}," include",[1056,4316,1998],{"class":1369},[1056,4318,4094],{"class":2067},[1056,4320,1823],{"class":1369},[1056,4322,2244],{"class":1826},[1056,4324,4325],{"class":1369},")),\n",[1056,4327,4328,4331,4334],{"class":1058,"line":1111},[1056,4329,4330],{"class":1369},"    ]",[1056,4332,4333],{"class":1605}," +",[1056,4335,4336],{"class":1220}," urlpatterns\n",[1035,4338,4340],{"id":4339},"custom-development-middleware","Custom Development Middleware",[1026,4342,4343],{},[1042,4344,4345],{},"Request Logging Middleware:",[1046,4347,4349],{"className":1343,"code":4348,"language":1070,"meta":1051,"style":1051},"# middleware.py\nimport time\nimport logging\n\nlogger = logging.getLogger(__name__)\n\nclass DevelopmentLoggingMiddleware:\n    def __init__(self, get_response):\n        self.get_response = get_response\n\n    def __call__(self, request):\n        start_time = time.time()\n        \n        # Log request\n        logger.info(f\"Request: {request.method} {request.path}\")\n        \n        response = self.get_response(request)\n        \n        # Log response\n        duration = time.time() - start_time\n        logger.info(f\"Response: {response.status_code} ({duration:.2f}s)\")\n        \n        return response\n",[1053,4350,4351,4356,4363,4370,4374,4397,4401,4410,4431,4446,4450,4467,4485,4490,4495,4542,4546,4566,4570,4575,4597,4642,4646],{"__ignoreMap":1051},[1056,4352,4353],{"class":1058,"line":1059},[1056,4354,4355],{"class":1062},"# middleware.py\n",[1056,4357,4358,4360],{"class":1058,"line":1066},[1056,4359,1799],{"class":1798},[1056,4361,4362],{"class":1220}," time\n",[1056,4364,4365,4367],{"class":1058,"line":1080},[1056,4366,1799],{"class":1798},[1056,4368,4369],{"class":1220}," logging\n",[1056,4371,4372],{"class":1058,"line":1087},[1056,4373,1084],{"emptyLinePlaceholder":1083},[1056,4375,4376,4379,4381,4384,4386,4389,4391,4395],{"class":1058,"line":1093},[1056,4377,4378],{"class":1220},"logger ",[1056,4380,2080],{"class":1369},[1056,4382,4383],{"class":1220}," logging",[1056,4385,1823],{"class":1369},[1056,4387,4388],{"class":2067},"getLogger",[1056,4390,1998],{"class":1369},[1056,4392,4394],{"class":4393},"s131V","__name__",[1056,4396,2123],{"class":1369},[1056,4398,4399],{"class":1058,"line":1099},[1056,4400,1084],{"emptyLinePlaceholder":1083},[1056,4402,4403,4405,4408],{"class":1058,"line":1105},[1056,4404,2388],{"class":1990},[1056,4406,4407],{"class":2391}," DevelopmentLoggingMiddleware",[1056,4409,1830],{"class":1369},[1056,4411,4412,4415,4418,4420,4424,4426,4429],{"class":1058,"line":1111},[1056,4413,4414],{"class":1990},"    def",[1056,4416,4417],{"class":1897}," __init__",[1056,4419,1998],{"class":1369},[1056,4421,4423],{"class":4422},"sRjD_","self",[1056,4425,1442],{"class":1369},[1056,4427,4428],{"class":2001}," get_response",[1056,4430,2013],{"class":1369},[1056,4432,4433,4436,4438,4441,4443],{"class":1058,"line":1117},[1056,4434,4435],{"class":1365},"        self",[1056,4437,1823],{"class":1369},[1056,4439,4440],{"class":1826},"get_response",[1056,4442,1370],{"class":1369},[1056,4444,4445],{"class":1220}," get_response\n",[1056,4447,4448],{"class":1058,"line":1123},[1056,4449,1084],{"emptyLinePlaceholder":1083},[1056,4451,4452,4454,4457,4459,4461,4463,4465],{"class":1058,"line":1129},[1056,4453,4414],{"class":1990},[1056,4455,4456],{"class":1897}," __call__",[1056,4458,1998],{"class":1369},[1056,4460,4423],{"class":4422},[1056,4462,1442],{"class":1369},[1056,4464,4159],{"class":2001},[1056,4466,2013],{"class":1369},[1056,4468,4469,4472,4474,4477,4479,4482],{"class":1058,"line":1311},[1056,4470,4471],{"class":1220},"        start_time ",[1056,4473,2080],{"class":1369},[1056,4475,4476],{"class":1220}," time",[1056,4478,1823],{"class":1369},[1056,4480,4481],{"class":2067},"time",[1056,4483,4484],{"class":1369},"()\n",[1056,4486,4487],{"class":1058,"line":1316},[1056,4488,4489],{"class":1220},"        \n",[1056,4491,4492],{"class":1058,"line":1322},[1056,4493,4494],{"class":1062},"        # Log request\n",[1056,4496,4497,4500,4502,4505,4507,4510,4513,4517,4519,4521,4524,4527,4530,4532,4534,4536,4538,4540],{"class":1058,"line":1471},[1056,4498,4499],{"class":1220},"        logger",[1056,4501,1823],{"class":1369},[1056,4503,4504],{"class":2067},"info",[1056,4506,1998],{"class":1369},[1056,4508,4509],{"class":1990},"f",[1056,4511,4512],{"class":1073},"\"Request: ",[1056,4514,4516],{"class":4515},"s3h35","{",[1056,4518,2605],{"class":2067},[1056,4520,1823],{"class":1369},[1056,4522,4523],{"class":1826},"method",[1056,4525,4526],{"class":4515},"}",[1056,4528,4529],{"class":4515}," {",[1056,4531,2605],{"class":2067},[1056,4533,1823],{"class":1369},[1056,4535,2676],{"class":1826},[1056,4537,4526],{"class":4515},[1056,4539,1907],{"class":1073},[1056,4541,2123],{"class":1369},[1056,4543,4544],{"class":1058,"line":1477},[1056,4545,4489],{"class":1220},[1056,4547,4548,4551,4553,4556,4558,4560,4562,4564],{"class":1058,"line":1487},[1056,4549,4550],{"class":1220},"        response ",[1056,4552,2080],{"class":1369},[1056,4554,4555],{"class":1365}," self",[1056,4557,1823],{"class":1369},[1056,4559,4440],{"class":2067},[1056,4561,1998],{"class":1369},[1056,4563,2605],{"class":2067},[1056,4565,2123],{"class":1369},[1056,4567,4568],{"class":1058,"line":1498},[1056,4569,4489],{"class":1220},[1056,4571,4572],{"class":1058,"line":1509},[1056,4573,4574],{"class":1062},"        # Log response\n",[1056,4576,4577,4580,4582,4584,4586,4588,4591,4594],{"class":1058,"line":1520},[1056,4578,4579],{"class":1220},"        duration ",[1056,4581,2080],{"class":1369},[1056,4583,4476],{"class":1220},[1056,4585,1823],{"class":1369},[1056,4587,4481],{"class":2067},[1056,4589,4590],{"class":1369},"()",[1056,4592,4593],{"class":1605}," -",[1056,4595,4596],{"class":1220}," start_time\n",[1056,4598,4599,4601,4603,4605,4607,4609,4612,4614,4617,4619,4622,4624,4627,4629,4632,4635,4637,4640],{"class":1058,"line":1525},[1056,4600,4499],{"class":1220},[1056,4602,1823],{"class":1369},[1056,4604,4504],{"class":2067},[1056,4606,1998],{"class":1369},[1056,4608,4509],{"class":1990},[1056,4610,4611],{"class":1073},"\"Response: ",[1056,4613,4516],{"class":4515},[1056,4615,4616],{"class":2067},"response",[1056,4618,1823],{"class":1369},[1056,4620,4621],{"class":1826},"status_code",[1056,4623,4526],{"class":4515},[1056,4625,4626],{"class":1073}," (",[1056,4628,4516],{"class":4515},[1056,4630,4631],{"class":2067},"duration",[1056,4633,4634],{"class":1990},":.2f",[1056,4636,4526],{"class":4515},[1056,4638,4639],{"class":1073},"s)\"",[1056,4641,2123],{"class":1369},[1056,4643,4644],{"class":1058,"line":1530},[1056,4645,4489],{"class":1220},[1056,4647,4648,4651],{"class":1058,"line":1536},[1056,4649,4650],{"class":1798},"        return",[1056,4652,4653],{"class":1220}," response\n",[1026,4655,4656],{},[1042,4657,4658],{},"Error Handling Middleware:",[1046,4660,4662],{"className":1343,"code":4661,"language":1070,"meta":1051,"style":1051},"# middleware.py\nfrom django.http import JsonResponse\nfrom django.conf import settings\nimport traceback\n\nclass DevelopmentErrorMiddleware:\n    def __init__(self, get_response):\n        self.get_response = get_response\n\n    def __call__(self, request):\n        try:\n            response = self.get_response(request)\n        except Exception as e:\n            if settings.DEBUG:\n                # Return detailed error information in development\n                error_data = {\n                    'error': str(e),\n                    'type': type(e).__name__,\n                    'traceback': traceback.format_exc(),\n                }\n                return JsonResponse(error_data, status=500)\n            raise\n        \n        return response\n",[1053,4663,4664,4668,4683,4697,4704,4708,4717,4733,4745,4749,4765,4772,4791,4808,4821,4826,4835,4857,4882,4904,4909,4934,4939,4943],{"__ignoreMap":1051},[1056,4665,4666],{"class":1058,"line":1059},[1056,4667,4355],{"class":1062},[1056,4669,4670,4672,4674,4676,4678,4680],{"class":1058,"line":1066},[1056,4671,1963],{"class":1798},[1056,4673,1966],{"class":1220},[1056,4675,1823],{"class":1369},[1056,4677,2539],{"class":1220},[1056,4679,1799],{"class":1798},[1056,4681,4682],{"class":1220}," JsonResponse\n",[1056,4684,4685,4687,4689,4691,4693,4695],{"class":1058,"line":1080},[1056,4686,1963],{"class":1798},[1056,4688,1966],{"class":1220},[1056,4690,1823],{"class":1369},[1056,4692,2223],{"class":1220},[1056,4694,1799],{"class":1798},[1056,4696,2228],{"class":1220},[1056,4698,4699,4701],{"class":1058,"line":1087},[1056,4700,1799],{"class":1798},[1056,4702,4703],{"class":1220}," traceback\n",[1056,4705,4706],{"class":1058,"line":1093},[1056,4707,1084],{"emptyLinePlaceholder":1083},[1056,4709,4710,4712,4715],{"class":1058,"line":1099},[1056,4711,2388],{"class":1990},[1056,4713,4714],{"class":2391}," DevelopmentErrorMiddleware",[1056,4716,1830],{"class":1369},[1056,4718,4719,4721,4723,4725,4727,4729,4731],{"class":1058,"line":1105},[1056,4720,4414],{"class":1990},[1056,4722,4417],{"class":1897},[1056,4724,1998],{"class":1369},[1056,4726,4423],{"class":4422},[1056,4728,1442],{"class":1369},[1056,4730,4428],{"class":2001},[1056,4732,2013],{"class":1369},[1056,4734,4735,4737,4739,4741,4743],{"class":1058,"line":1111},[1056,4736,4435],{"class":1365},[1056,4738,1823],{"class":1369},[1056,4740,4440],{"class":1826},[1056,4742,1370],{"class":1369},[1056,4744,4445],{"class":1220},[1056,4746,4747],{"class":1058,"line":1117},[1056,4748,1084],{"emptyLinePlaceholder":1083},[1056,4750,4751,4753,4755,4757,4759,4761,4763],{"class":1058,"line":1123},[1056,4752,4414],{"class":1990},[1056,4754,4456],{"class":1897},[1056,4756,1998],{"class":1369},[1056,4758,4423],{"class":4422},[1056,4760,1442],{"class":1369},[1056,4762,4159],{"class":2001},[1056,4764,2013],{"class":1369},[1056,4766,4767,4770],{"class":1058,"line":1129},[1056,4768,4769],{"class":1798},"        try",[1056,4771,1830],{"class":1369},[1056,4773,4774,4777,4779,4781,4783,4785,4787,4789],{"class":1058,"line":1311},[1056,4775,4776],{"class":1220},"            response ",[1056,4778,2080],{"class":1369},[1056,4780,4555],{"class":1365},[1056,4782,1823],{"class":1369},[1056,4784,4440],{"class":2067},[1056,4786,1998],{"class":1369},[1056,4788,2605],{"class":2067},[1056,4790,2123],{"class":1369},[1056,4792,4793,4796,4800,4803,4806],{"class":1058,"line":1316},[1056,4794,4795],{"class":1798},"        except",[1056,4797,4799],{"class":4798},"sa2tF"," Exception",[1056,4801,4802],{"class":1798}," as",[1056,4804,4805],{"class":1220}," e",[1056,4807,1830],{"class":1369},[1056,4809,4810,4813,4815,4817,4819],{"class":1058,"line":1322},[1056,4811,4812],{"class":1798},"            if",[1056,4814,2292],{"class":1220},[1056,4816,1823],{"class":1369},[1056,4818,1366],{"class":2061},[1056,4820,1830],{"class":1369},[1056,4822,4823],{"class":1058,"line":1471},[1056,4824,4825],{"class":1062},"                # Return detailed error information in development\n",[1056,4827,4828,4831,4833],{"class":1058,"line":1477},[1056,4829,4830],{"class":1220},"                error_data ",[1056,4832,2080],{"class":1369},[1056,4834,3437],{"class":1369},[1056,4836,4837,4840,4843,4845,4847,4850,4852,4855],{"class":1058,"line":1487},[1056,4838,4839],{"class":1398},"                    '",[1056,4841,4842],{"class":1073},"error",[1056,4844,1405],{"class":1398},[1056,4846,3449],{"class":1369},[1056,4848,4849],{"class":4798}," str",[1056,4851,1998],{"class":1369},[1056,4853,4854],{"class":2067},"e",[1056,4856,2815],{"class":1369},[1056,4858,4859,4861,4864,4866,4868,4871,4873,4875,4878,4880],{"class":1058,"line":1498},[1056,4860,4839],{"class":1398},[1056,4862,4863],{"class":1073},"type",[1056,4865,1405],{"class":1398},[1056,4867,3449],{"class":1369},[1056,4869,4870],{"class":4798}," type",[1056,4872,1998],{"class":1369},[1056,4874,4854],{"class":2067},[1056,4876,4877],{"class":1369},").",[1056,4879,4394],{"class":4393},[1056,4881,1408],{"class":1369},[1056,4883,4884,4886,4889,4891,4893,4896,4898,4901],{"class":1058,"line":1509},[1056,4885,4839],{"class":1398},[1056,4887,4888],{"class":1073},"traceback",[1056,4890,1405],{"class":1398},[1056,4892,3449],{"class":1369},[1056,4894,4895],{"class":1220}," traceback",[1056,4897,1823],{"class":1369},[1056,4899,4900],{"class":2067},"format_exc",[1056,4902,4903],{"class":1369},"(),\n",[1056,4905,4906],{"class":1058,"line":1520},[1056,4907,4908],{"class":1369},"                }\n",[1056,4910,4911,4914,4917,4919,4922,4924,4927,4929,4932],{"class":1058,"line":1525},[1056,4912,4913],{"class":1798},"                return",[1056,4915,4916],{"class":2067}," JsonResponse",[1056,4918,1998],{"class":1369},[1056,4920,4921],{"class":2067},"error_data",[1056,4923,1442],{"class":1369},[1056,4925,4926],{"class":2076}," status",[1056,4928,2080],{"class":1369},[1056,4930,4931],{"class":1159},"500",[1056,4933,2123],{"class":1369},[1056,4935,4936],{"class":1058,"line":1530},[1056,4937,4938],{"class":1798},"            raise\n",[1056,4940,4941],{"class":1058,"line":1536},[1056,4942,4489],{"class":1220},[1056,4944,4945,4947],{"class":1058,"line":1546},[1056,4946,4650],{"class":1798},[1056,4948,4653],{"class":1220},[1030,4950,4952],{"id":4951},"network-access-and-external-tools","Network Access and External Tools",[1035,4954,4956],{"id":4955},"making-server-accessible-on-network","Making Server Accessible on Network",[1026,4958,4959],{},[1042,4960,4961],{},"Local Network Access:",[1046,4963,4965],{"className":1048,"code":4964,"language":1050,"meta":1051,"style":1051},"# Find your local IP address\n# Linux/macOS:\nip addr show | grep inet\n# or\nifconfig | grep inet\n\n# Windows:\nipconfig\n\n# Start server on all interfaces\npython manage.py runserver 0.0.0.0:8000\n\n# Access from other devices:\n# http://192.168.1.100:8000 (replace with your IP)\n",[1053,4966,4967,4972,4977,4997,5002,5013,5017,5022,5027,5031,5036,5046,5050,5055],{"__ignoreMap":1051},[1056,4968,4969],{"class":1058,"line":1059},[1056,4970,4971],{"class":1062},"# Find your local IP address\n",[1056,4973,4974],{"class":1058,"line":1066},[1056,4975,4976],{"class":1062},"# Linux/macOS:\n",[1056,4978,4979,4982,4985,4988,4991,4994],{"class":1058,"line":1080},[1056,4980,4981],{"class":1069},"ip",[1056,4983,4984],{"class":1073}," addr",[1056,4986,4987],{"class":1073}," show",[1056,4989,4990],{"class":1605}," |",[1056,4992,4993],{"class":1069}," grep",[1056,4995,4996],{"class":1073}," inet\n",[1056,4998,4999],{"class":1058,"line":1087},[1056,5000,5001],{"class":1062},"# or\n",[1056,5003,5004,5007,5009,5011],{"class":1058,"line":1093},[1056,5005,5006],{"class":1069},"ifconfig",[1056,5008,4990],{"class":1605},[1056,5010,4993],{"class":1069},[1056,5012,4996],{"class":1073},[1056,5014,5015],{"class":1058,"line":1099},[1056,5016,1084],{"emptyLinePlaceholder":1083},[1056,5018,5019],{"class":1058,"line":1105},[1056,5020,5021],{"class":1062},"# Windows:\n",[1056,5023,5024],{"class":1058,"line":1111},[1056,5025,5026],{"class":1069},"ipconfig\n",[1056,5028,5029],{"class":1058,"line":1117},[1056,5030,1084],{"emptyLinePlaceholder":1083},[1056,5032,5033],{"class":1058,"line":1123},[1056,5034,5035],{"class":1062},"# Start server on all interfaces\n",[1056,5037,5038,5040,5042,5044],{"class":1058,"line":1129},[1056,5039,1070],{"class":1069},[1056,5041,1074],{"class":1073},[1056,5043,1156],{"class":1073},[1056,5045,1180],{"class":1073},[1056,5047,5048],{"class":1058,"line":1311},[1056,5049,1084],{"emptyLinePlaceholder":1083},[1056,5051,5052],{"class":1058,"line":1316},[1056,5053,5054],{"class":1062},"# Access from other devices:\n",[1056,5056,5057],{"class":1058,"line":1322},[1056,5058,5059],{"class":1062},"# http://192.168.1.100:8000 (replace with your IP)\n",[1026,5061,5062],{},[1042,5063,5064],{},"Firewall Configuration:",[1046,5066,5068],{"className":1048,"code":5067,"language":1050,"meta":1051,"style":1051},"# Linux (ufw)\nsudo ufw allow 8000\n\n# macOS (built-in firewall)\n# System Preferences > Security & Privacy > Firewall > Options\n# Allow incoming connections for Python\n\n# Windows\n# Windows Defender Firewall > Allow an app through firewall\n# Add Python to allowed apps\n",[1053,5069,5070,5075,5088,5092,5097,5102,5107,5111,5116,5121],{"__ignoreMap":1051},[1056,5071,5072],{"class":1058,"line":1059},[1056,5073,5074],{"class":1062},"# Linux (ufw)\n",[1056,5076,5077,5080,5083,5086],{"class":1058,"line":1066},[1056,5078,5079],{"class":1069},"sudo",[1056,5081,5082],{"class":1073}," ufw",[1056,5084,5085],{"class":1073}," allow",[1056,5087,3263],{"class":1159},[1056,5089,5090],{"class":1058,"line":1080},[1056,5091,1084],{"emptyLinePlaceholder":1083},[1056,5093,5094],{"class":1058,"line":1087},[1056,5095,5096],{"class":1062},"# macOS (built-in firewall)\n",[1056,5098,5099],{"class":1058,"line":1093},[1056,5100,5101],{"class":1062},"# System Preferences > Security & Privacy > Firewall > Options\n",[1056,5103,5104],{"class":1058,"line":1099},[1056,5105,5106],{"class":1062},"# Allow incoming connections for Python\n",[1056,5108,5109],{"class":1058,"line":1105},[1056,5110,1084],{"emptyLinePlaceholder":1083},[1056,5112,5113],{"class":1058,"line":1111},[1056,5114,5115],{"class":1062},"# Windows\n",[1056,5117,5118],{"class":1058,"line":1117},[1056,5119,5120],{"class":1062},"# Windows Defender Firewall > Allow an app through firewall\n",[1056,5122,5123],{"class":1058,"line":1123},[1056,5124,5125],{"class":1062},"# Add Python to allowed apps\n",[1035,5127,5129],{"id":5128},"tunneling-services","Tunneling Services",[1026,5131,5132],{},[1042,5133,5134],{},"Using ngrok:",[1046,5136,5138],{"className":1048,"code":5137,"language":1050,"meta":1051,"style":1051},"# Install ngrok\n# Download from https://ngrok.com/\n\n# Start Django server\npython manage.py runserver 8000\n\n# In another terminal, start ngrok\nngrok http 8000\n\n# Access your app via public URL:\n# https://abc123.ngrok.io\n",[1053,5139,5140,5145,5150,5154,5158,5168,5172,5177,5187,5191,5196],{"__ignoreMap":1051},[1056,5141,5142],{"class":1058,"line":1059},[1056,5143,5144],{"class":1062},"# Install ngrok\n",[1056,5146,5147],{"class":1058,"line":1066},[1056,5148,5149],{"class":1062},"# Download from https://ngrok.com/\n",[1056,5151,5152],{"class":1058,"line":1080},[1056,5153,1084],{"emptyLinePlaceholder":1083},[1056,5155,5156],{"class":1058,"line":1087},[1056,5157,3252],{"class":1062},[1056,5159,5160,5162,5164,5166],{"class":1058,"line":1093},[1056,5161,1070],{"class":1069},[1056,5163,1074],{"class":1073},[1056,5165,1156],{"class":1073},[1056,5167,3263],{"class":1159},[1056,5169,5170],{"class":1058,"line":1099},[1056,5171,1084],{"emptyLinePlaceholder":1083},[1056,5173,5174],{"class":1058,"line":1105},[1056,5175,5176],{"class":1062},"# In another terminal, start ngrok\n",[1056,5178,5179,5182,5185],{"class":1058,"line":1111},[1056,5180,5181],{"class":1069},"ngrok",[1056,5183,5184],{"class":1073}," http",[1056,5186,3263],{"class":1159},[1056,5188,5189],{"class":1058,"line":1117},[1056,5190,1084],{"emptyLinePlaceholder":1083},[1056,5192,5193],{"class":1058,"line":1123},[1056,5194,5195],{"class":1062},"# Access your app via public URL:\n",[1056,5197,5198],{"class":1058,"line":1129},[1056,5199,5200],{"class":1062},"# https://abc123.ngrok.io\n",[1026,5202,5203],{},[1042,5204,5205],{},"Using localtunnel:",[1046,5207,5209],{"className":1048,"code":5208,"language":1050,"meta":1051,"style":1051},"# Install localtunnel\nnpm install -g localtunnel\n\n# Start Django server\npython manage.py runserver 8000\n\n# Create tunnel\nlt --port 8000 --subdomain myapp\n\n# Access via: https://myapp.loca.lt\n",[1053,5210,5211,5216,5227,5231,5235,5245,5249,5254,5271,5275],{"__ignoreMap":1051},[1056,5212,5213],{"class":1058,"line":1059},[1056,5214,5215],{"class":1062},"# Install localtunnel\n",[1056,5217,5218,5220,5222,5224],{"class":1058,"line":1066},[1056,5219,3235],{"class":1069},[1056,5221,2845],{"class":1073},[1056,5223,3240],{"class":1247},[1056,5225,5226],{"class":1073}," localtunnel\n",[1056,5228,5229],{"class":1058,"line":1080},[1056,5230,1084],{"emptyLinePlaceholder":1083},[1056,5232,5233],{"class":1058,"line":1087},[1056,5234,3252],{"class":1062},[1056,5236,5237,5239,5241,5243],{"class":1058,"line":1093},[1056,5238,1070],{"class":1069},[1056,5240,1074],{"class":1073},[1056,5242,1156],{"class":1073},[1056,5244,3263],{"class":1159},[1056,5246,5247],{"class":1058,"line":1099},[1056,5248,1084],{"emptyLinePlaceholder":1083},[1056,5250,5251],{"class":1058,"line":1105},[1056,5252,5253],{"class":1062},"# Create tunnel\n",[1056,5255,5256,5259,5262,5265,5268],{"class":1058,"line":1111},[1056,5257,5258],{"class":1069},"lt",[1056,5260,5261],{"class":1247}," --port",[1056,5263,5264],{"class":1159}," 8000",[1056,5266,5267],{"class":1247}," --subdomain",[1056,5269,5270],{"class":1073}," myapp\n",[1056,5272,5273],{"class":1058,"line":1117},[1056,5274,1084],{"emptyLinePlaceholder":1083},[1056,5276,5277],{"class":1058,"line":1123},[1056,5278,5279],{"class":1062},"# Access via: https://myapp.loca.lt\n",[1035,5281,5283],{"id":5282},"https-in-development","HTTPS in Development",[1026,5285,5286],{},[1042,5287,5288],{},"Using Django Extensions:",[1046,5290,5292],{"className":1048,"code":5291,"language":1050,"meta":1051,"style":1051},"# Generate self-signed certificate\npython manage.py generate_secret_key > .secret_key\n\n# Create certificate files\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes\n\n# Start HTTPS server\npython manage.py runserver_plus --cert-file cert.pem --key-file key.pem\n",[1053,5293,5294,5299,5314,5318,5323,5360,5364,5369],{"__ignoreMap":1051},[1056,5295,5296],{"class":1058,"line":1059},[1056,5297,5298],{"class":1062},"# Generate self-signed certificate\n",[1056,5300,5301,5303,5305,5308,5311],{"class":1058,"line":1066},[1056,5302,1070],{"class":1069},[1056,5304,1074],{"class":1073},[1056,5306,5307],{"class":1073}," generate_secret_key",[1056,5309,5310],{"class":1605}," >",[1056,5312,5313],{"class":1073}," .secret_key\n",[1056,5315,5316],{"class":1058,"line":1080},[1056,5317,1084],{"emptyLinePlaceholder":1083},[1056,5319,5320],{"class":1058,"line":1087},[1056,5321,5322],{"class":1062},"# Create certificate files\n",[1056,5324,5325,5328,5331,5334,5337,5340,5343,5346,5349,5351,5354,5357],{"class":1058,"line":1093},[1056,5326,5327],{"class":1069},"openssl",[1056,5329,5330],{"class":1073}," req",[1056,5332,5333],{"class":1247}," -x509",[1056,5335,5336],{"class":1247}," -newkey",[1056,5338,5339],{"class":1073}," rsa:4096",[1056,5341,5342],{"class":1247}," -keyout",[1056,5344,5345],{"class":1073}," key.pem",[1056,5347,5348],{"class":1247}," -out",[1056,5350,2964],{"class":1073},[1056,5352,5353],{"class":1247}," -days",[1056,5355,5356],{"class":1159}," 365",[1056,5358,5359],{"class":1247}," -nodes\n",[1056,5361,5362],{"class":1058,"line":1099},[1056,5363,1084],{"emptyLinePlaceholder":1083},[1056,5365,5366],{"class":1058,"line":1105},[1056,5367,5368],{"class":1062},"# Start HTTPS server\n",[1056,5370,5371,5373,5375,5377,5379,5381,5383],{"class":1058,"line":1111},[1056,5372,1070],{"class":1069},[1056,5374,1074],{"class":1073},[1056,5376,2958],{"class":1073},[1056,5378,2961],{"class":1247},[1056,5380,2964],{"class":1073},[1056,5382,2967],{"class":1247},[1056,5384,2970],{"class":1073},[1026,5386,5387],{},[1042,5388,5389],{},"Using mkcert for Trusted Certificates:",[1046,5391,5393],{"className":1048,"code":5392,"language":1050,"meta":1051,"style":1051},"# Install mkcert\n# macOS: brew install mkcert\n# Linux: Follow instructions at https://github.com/FiloSottile/mkcert\n\n# Create local CA\nmkcert -install\n\n# Generate certificate for localhost\nmkcert localhost 127.0.0.1 ::1\n\n# Start server with certificate\npython manage.py runserver_plus --cert-file localhost+2.pem --key-file localhost+2-key.pem\n",[1053,5394,5395,5400,5405,5410,5414,5419,5427,5431,5436,5449,5453,5458],{"__ignoreMap":1051},[1056,5396,5397],{"class":1058,"line":1059},[1056,5398,5399],{"class":1062},"# Install mkcert\n",[1056,5401,5402],{"class":1058,"line":1066},[1056,5403,5404],{"class":1062},"# macOS: brew install mkcert\n",[1056,5406,5407],{"class":1058,"line":1080},[1056,5408,5409],{"class":1062},"# Linux: Follow instructions at https://github.com/FiloSottile/mkcert\n",[1056,5411,5412],{"class":1058,"line":1087},[1056,5413,1084],{"emptyLinePlaceholder":1083},[1056,5415,5416],{"class":1058,"line":1093},[1056,5417,5418],{"class":1062},"# Create local CA\n",[1056,5420,5421,5424],{"class":1058,"line":1099},[1056,5422,5423],{"class":1069},"mkcert",[1056,5425,5426],{"class":1247}," -install\n",[1056,5428,5429],{"class":1058,"line":1105},[1056,5430,1084],{"emptyLinePlaceholder":1083},[1056,5432,5433],{"class":1058,"line":1111},[1056,5434,5435],{"class":1062},"# Generate certificate for localhost\n",[1056,5437,5438,5440,5443,5446],{"class":1058,"line":1117},[1056,5439,5423],{"class":1069},[1056,5441,5442],{"class":1073}," localhost",[1056,5444,5445],{"class":1159}," 127.0.0.1",[1056,5447,5448],{"class":1073}," ::1\n",[1056,5450,5451],{"class":1058,"line":1123},[1056,5452,1084],{"emptyLinePlaceholder":1083},[1056,5454,5455],{"class":1058,"line":1129},[1056,5456,5457],{"class":1062},"# Start server with certificate\n",[1056,5459,5460,5462,5464,5466,5468,5471,5473],{"class":1058,"line":1311},[1056,5461,1070],{"class":1069},[1056,5463,1074],{"class":1073},[1056,5465,2958],{"class":1073},[1056,5467,2961],{"class":1247},[1056,5469,5470],{"class":1073}," localhost+2.pem",[1056,5472,2967],{"class":1247},[1056,5474,5475],{"class":1073}," localhost+2-key.pem\n",[1030,5477,5479],{"id":5478},"troubleshooting-common-issues","Troubleshooting Common Issues",[1035,5481,5483],{"id":5482},"port-already-in-use","Port Already in Use",[1026,5485,5486,5489,5490],{},[1042,5487,5488],{},"Problem:"," ",[1053,5491,5492],{},"Error: That port is already in use.",[1026,5494,5495],{},[1042,5496,5497],{},"Solutions:",[1046,5499,5501],{"className":1048,"code":5500,"language":1050,"meta":1051,"style":1051},"# Find process using port 8000\nlsof -ti:8000  # macOS/Linux\nnetstat -ano | findstr :8000  # Windows\n\n# Kill process\nkill -9 $(lsof -ti:8000)  # macOS/Linux\ntaskkill /PID \u003CPID> /F  # Windows\n\n# Use different port\npython manage.py runserver 8080\n",[1053,5502,5503,5508,5519,5538,5542,5547,5567,5591,5595,5600],{"__ignoreMap":1051},[1056,5504,5505],{"class":1058,"line":1059},[1056,5506,5507],{"class":1062},"# Find process using port 8000\n",[1056,5509,5510,5513,5516],{"class":1058,"line":1066},[1056,5511,5512],{"class":1069},"lsof",[1056,5514,5515],{"class":1247}," -ti:8000",[1056,5517,5518],{"class":1062},"  # macOS/Linux\n",[1056,5520,5521,5524,5527,5529,5532,5535],{"class":1058,"line":1080},[1056,5522,5523],{"class":1069},"netstat",[1056,5525,5526],{"class":1247}," -ano",[1056,5528,4990],{"class":1605},[1056,5530,5531],{"class":1069}," findstr",[1056,5533,5534],{"class":1073}," :8000",[1056,5536,5537],{"class":1062},"  # Windows\n",[1056,5539,5540],{"class":1058,"line":1087},[1056,5541,1084],{"emptyLinePlaceholder":1083},[1056,5543,5544],{"class":1058,"line":1093},[1056,5545,5546],{"class":1062},"# Kill process\n",[1056,5548,5549,5552,5555,5558,5560,5562,5565],{"class":1058,"line":1099},[1056,5550,5551],{"class":1897},"kill",[1056,5553,5554],{"class":1247}," -9",[1056,5556,5557],{"class":1369}," $(",[1056,5559,5512],{"class":1069},[1056,5561,5515],{"class":1247},[1056,5563,5564],{"class":1369},")",[1056,5566,5518],{"class":1062},[1056,5568,5569,5572,5575,5578,5581,5584,5586,5589],{"class":1058,"line":1105},[1056,5570,5571],{"class":1069},"taskkill",[1056,5573,5574],{"class":1073}," /PID",[1056,5576,5577],{"class":1605}," \u003C",[1056,5579,5580],{"class":1073},"PI",[1056,5582,5583],{"class":1220},"D",[1056,5585,3138],{"class":1605},[1056,5587,5588],{"class":1073}," /F",[1056,5590,5537],{"class":1062},[1056,5592,5593],{"class":1058,"line":1111},[1056,5594,1084],{"emptyLinePlaceholder":1083},[1056,5596,5597],{"class":1058,"line":1117},[1056,5598,5599],{"class":1062},"# Use different port\n",[1056,5601,5602,5604,5606,5608],{"class":1058,"line":1123},[1056,5603,1070],{"class":1069},[1056,5605,1074],{"class":1073},[1056,5607,1156],{"class":1073},[1056,5609,1160],{"class":1159},[1035,5611,5613],{"id":5612},"permission-denied","Permission Denied",[1026,5615,5616,5489,5618,5621],{},[1042,5617,5488],{},[1053,5619,5620],{},"Permission denied"," when starting server",[1026,5623,5624],{},[1042,5625,5497],{},[1046,5627,5629],{"className":1048,"code":5628,"language":1050,"meta":1051,"style":1051},"# Check port permissions (ports \u003C 1024 require root)\npython manage.py runserver 8000  # Use port > 1024\n\n# Check file permissions\nchmod +x manage.py\n\n# Check virtual environment activation\nwhich python  # Should point to venv\n",[1053,5630,5631,5636,5649,5653,5658,5668,5672,5677],{"__ignoreMap":1051},[1056,5632,5633],{"class":1058,"line":1059},[1056,5634,5635],{"class":1062},"# Check port permissions (ports \u003C 1024 require root)\n",[1056,5637,5638,5640,5642,5644,5646],{"class":1058,"line":1066},[1056,5639,1070],{"class":1069},[1056,5641,1074],{"class":1073},[1056,5643,1156],{"class":1073},[1056,5645,5264],{"class":1159},[1056,5647,5648],{"class":1062},"  # Use port > 1024\n",[1056,5650,5651],{"class":1058,"line":1080},[1056,5652,1084],{"emptyLinePlaceholder":1083},[1056,5654,5655],{"class":1058,"line":1087},[1056,5656,5657],{"class":1062},"# Check file permissions\n",[1056,5659,5660,5663,5666],{"class":1058,"line":1093},[1056,5661,5662],{"class":1069},"chmod",[1056,5664,5665],{"class":1073}," +x",[1056,5667,1883],{"class":1073},[1056,5669,5670],{"class":1058,"line":1099},[1056,5671,1084],{"emptyLinePlaceholder":1083},[1056,5673,5674],{"class":1058,"line":1105},[1056,5675,5676],{"class":1062},"# Check virtual environment activation\n",[1056,5678,5679,5682,5685],{"class":1058,"line":1111},[1056,5680,5681],{"class":1897},"which",[1056,5683,5684],{"class":1073}," python",[1056,5686,5687],{"class":1062},"  # Should point to venv\n",[1035,5689,5691],{"id":5690},"static-files-not-loading","Static Files Not Loading",[1026,5693,5694,5696],{},[1042,5695,5488],{}," CSS/JS files return 404 errors",[1026,5698,5699],{},[1042,5700,5497],{},[1046,5702,5704],{"className":1343,"code":5703,"language":1070,"meta":1051,"style":1051},"# Ensure DEBUG=True in settings\nDEBUG = True\n\n# Check STATIC_URL setting\nSTATIC_URL = '/static/'\n\n# Verify STATICFILES_DIRS\nSTATICFILES_DIRS = [\n    BASE_DIR / 'static',\n]\n\n# Add static file serving to URLs\nfrom django.conf.urls.static import static\nif settings.DEBUG:\n    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\n",[1053,5705,5706,5711,5719,5723,5728,5740,5744,5749,5757,5771,5775,5779,5784,5806,5818],{"__ignoreMap":1051},[1056,5707,5708],{"class":1058,"line":1059},[1056,5709,5710],{"class":1062},"# Ensure DEBUG=True in settings\n",[1056,5712,5713,5715,5717],{"class":1058,"line":1066},[1056,5714,1366],{"class":1365},[1056,5716,1370],{"class":1369},[1056,5718,1374],{"class":1373},[1056,5720,5721],{"class":1058,"line":1080},[1056,5722,1084],{"emptyLinePlaceholder":1083},[1056,5724,5725],{"class":1058,"line":1087},[1056,5726,5727],{"class":1062},"# Check STATIC_URL setting\n",[1056,5729,5730,5732,5734,5736,5738],{"class":1058,"line":1093},[1056,5731,1577],{"class":1365},[1056,5733,1370],{"class":1369},[1056,5735,1554],{"class":1398},[1056,5737,1584],{"class":1073},[1056,5739,1560],{"class":1398},[1056,5741,5742],{"class":1058,"line":1099},[1056,5743,1084],{"emptyLinePlaceholder":1083},[1056,5745,5746],{"class":1058,"line":1105},[1056,5747,5748],{"class":1062},"# Verify STATICFILES_DIRS\n",[1056,5750,5751,5753,5755],{"class":1058,"line":1111},[1056,5752,1592],{"class":1365},[1056,5754,1370],{"class":1369},[1056,5756,1393],{"class":1369},[1056,5758,5759,5761,5763,5765,5767,5769],{"class":1058,"line":1117},[1056,5760,1602],{"class":1365},[1056,5762,1606],{"class":1605},[1056,5764,1554],{"class":1398},[1056,5766,1611],{"class":1073},[1056,5768,1405],{"class":1398},[1056,5770,1408],{"class":1369},[1056,5772,5773],{"class":1058,"line":1123},[1056,5774,1464],{"class":1369},[1056,5776,5777],{"class":1058,"line":1129},[1056,5778,1084],{"emptyLinePlaceholder":1083},[1056,5780,5781],{"class":1058,"line":1311},[1056,5782,5783],{"class":1062},"# Add static file serving to URLs\n",[1056,5785,5786,5788,5790,5792,5794,5796,5798,5800,5802,5804],{"class":1058,"line":1316},[1056,5787,1963],{"class":1798},[1056,5789,1966],{"class":1220},[1056,5791,1823],{"class":1369},[1056,5793,2239],{"class":1220},[1056,5795,1823],{"class":1369},[1056,5797,2244],{"class":1220},[1056,5799,1823],{"class":1369},[1056,5801,2249],{"class":1220},[1056,5803,1799],{"class":1798},[1056,5805,2254],{"class":1220},[1056,5807,5808,5810,5812,5814,5816],{"class":1058,"line":1322},[1056,5809,1807],{"class":1798},[1056,5811,2292],{"class":1220},[1056,5813,1823],{"class":1369},[1056,5815,1366],{"class":2061},[1056,5817,1830],{"class":1369},[1056,5819,5820,5822,5824,5826,5828,5830,5832,5834,5836,5838,5840,5842,5844,5846],{"class":1058,"line":1471},[1056,5821,2303],{"class":1220},[1056,5823,2306],{"class":1369},[1056,5825,2309],{"class":2067},[1056,5827,1998],{"class":1369},[1056,5829,2314],{"class":2067},[1056,5831,1823],{"class":1369},[1056,5833,1577],{"class":2061},[1056,5835,1442],{"class":1369},[1056,5837,2323],{"class":2076},[1056,5839,2080],{"class":1369},[1056,5841,2314],{"class":2067},[1056,5843,1823],{"class":1369},[1056,5845,2332],{"class":2061},[1056,5847,2123],{"class":1369},[1035,5849,5851],{"id":5850},"server-wont-start","Server Won't Start",[1026,5853,5854,5856],{},[1042,5855,5488],{}," Server fails to start with various errors",[1026,5858,5859],{},[1042,5860,5861],{},"Diagnostic Steps:",[1046,5863,5865],{"className":1048,"code":5864,"language":1050,"meta":1051,"style":1051},"# Check Django installation\npython -c \"import django; print(django.get_version())\"\n\n# Validate settings\npython manage.py check\n\n# Check database connectivity\npython manage.py dbshell\n\n# Verify migrations\npython manage.py showmigrations\n\n# Check for syntax errors\npython -m py_compile manage.py\n",[1053,5866,5867,5872,5886,5890,5895,5904,5908,5913,5922,5926,5931,5940,5944,5949],{"__ignoreMap":1051},[1056,5868,5869],{"class":1058,"line":1059},[1056,5870,5871],{"class":1062},"# Check Django installation\n",[1056,5873,5874,5876,5879,5881,5884],{"class":1058,"line":1066},[1056,5875,1070],{"class":1069},[1056,5877,5878],{"class":1247}," -c",[1056,5880,1901],{"class":1398},[1056,5882,5883],{"class":1073},"import django; print(django.get_version())",[1056,5885,3301],{"class":1398},[1056,5887,5888],{"class":1058,"line":1080},[1056,5889,1084],{"emptyLinePlaceholder":1083},[1056,5891,5892],{"class":1058,"line":1087},[1056,5893,5894],{"class":1062},"# Validate settings\n",[1056,5896,5897,5899,5901],{"class":1058,"line":1093},[1056,5898,1070],{"class":1069},[1056,5900,1074],{"class":1073},[1056,5902,5903],{"class":1073}," check\n",[1056,5905,5906],{"class":1058,"line":1099},[1056,5907,1084],{"emptyLinePlaceholder":1083},[1056,5909,5910],{"class":1058,"line":1105},[1056,5911,5912],{"class":1062},"# Check database connectivity\n",[1056,5914,5915,5917,5919],{"class":1058,"line":1111},[1056,5916,1070],{"class":1069},[1056,5918,1074],{"class":1073},[1056,5920,5921],{"class":1073}," dbshell\n",[1056,5923,5924],{"class":1058,"line":1117},[1056,5925,1084],{"emptyLinePlaceholder":1083},[1056,5927,5928],{"class":1058,"line":1123},[1056,5929,5930],{"class":1062},"# Verify migrations\n",[1056,5932,5933,5935,5937],{"class":1058,"line":1129},[1056,5934,1070],{"class":1069},[1056,5936,1074],{"class":1073},[1056,5938,5939],{"class":1073}," showmigrations\n",[1056,5941,5942],{"class":1058,"line":1311},[1056,5943,1084],{"emptyLinePlaceholder":1083},[1056,5945,5946],{"class":1058,"line":1316},[1056,5947,5948],{"class":1062},"# Check for syntax errors\n",[1056,5950,5951,5953,5956,5959],{"class":1058,"line":1322},[1056,5952,1070],{"class":1069},[1056,5954,5955],{"class":1247}," -m",[1056,5957,5958],{"class":1073}," py_compile",[1056,5960,1883],{"class":1073},[1030,5962,5964],{"id":5963},"production-vs-development-server","Production vs Development Server",[1035,5966,5968],{"id":5967},"key-differences","Key Differences",[1026,5970,5971],{},[1042,5972,5973],{},"Development Server:",[5975,5976,5977,5981,5984,5987,5990],"ul",{},[5978,5979,5980],"li",{},"Single-threaded (by default)",[5978,5982,5983],{},"Auto-reloading",[5978,5985,5986],{},"Serves static files",[5978,5988,5989],{},"Detailed error pages",[5978,5991,5992],{},"Not suitable for production",[1026,5994,5995],{},[1042,5996,5997],{},"Production Server (Gunicorn/uWSGI):",[5975,5999,6000,6003,6006,6009,6012],{},[5978,6001,6002],{},"Multi-process/threaded",[5978,6004,6005],{},"No auto-reloading",[5978,6007,6008],{},"Requires separate static file serving",[5978,6010,6011],{},"Minimal error information",[5978,6013,6014],{},"Optimized for performance",[1035,6016,6018],{"id":6017},"transition-preparation","Transition Preparation",[1026,6020,6021],{},[1042,6022,6023],{},"Testing Production-like Setup:",[1046,6025,6027],{"className":1048,"code":6026,"language":1050,"meta":1051,"style":1051},"# Install production server\npip install gunicorn\n\n# Test with Gunicorn\ngunicorn myproject.wsgi:application --bind 127.0.0.1:8000\n\n# Test static file serving\npython manage.py collectstatic\n",[1053,6028,6029,6034,6043,6047,6052,6066,6070,6075],{"__ignoreMap":1051},[1056,6030,6031],{"class":1058,"line":1059},[1056,6032,6033],{"class":1062},"# Install production server\n",[1056,6035,6036,6038,6040],{"class":1058,"line":1066},[1056,6037,2842],{"class":1069},[1056,6039,2845],{"class":1073},[1056,6041,6042],{"class":1073}," gunicorn\n",[1056,6044,6045],{"class":1058,"line":1080},[1056,6046,1084],{"emptyLinePlaceholder":1083},[1056,6048,6049],{"class":1058,"line":1087},[1056,6050,6051],{"class":1062},"# Test with Gunicorn\n",[1056,6053,6054,6057,6060,6063],{"class":1058,"line":1093},[1056,6055,6056],{"class":1069},"gunicorn",[1056,6058,6059],{"class":1073}," myproject.wsgi:application",[1056,6061,6062],{"class":1247}," --bind",[1056,6064,6065],{"class":1073}," 127.0.0.1:8000\n",[1056,6067,6068],{"class":1058,"line":1099},[1056,6069,1084],{"emptyLinePlaceholder":1083},[1056,6071,6072],{"class":1058,"line":1105},[1056,6073,6074],{"class":1062},"# Test static file serving\n",[1056,6076,6077,6079,6081],{"class":1058,"line":1111},[1056,6078,1070],{"class":1069},[1056,6080,1074],{"class":1073},[1056,6082,6083],{"class":1073}," collectstatic\n",[1026,6085,6086],{},[1042,6087,6088],{},"Production Readiness Checklist:",[1046,6090,6092],{"className":1343,"code":6091,"language":1070,"meta":1051,"style":1051},"# settings/production.py\nDEBUG = False\nALLOWED_HOSTS = ['yourdomain.com']\nSECURE_SSL_REDIRECT = True\nSTATIC_ROOT = '/var/www/static/'\nMEDIA_ROOT = '/var/www/media/'\n\n# Use production database\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        # ... production database config\n    }\n}\n",[1053,6093,6094,6099,6108,6126,6135,6148,6161,6165,6170,6178,6190,6209,6214,6218],{"__ignoreMap":1051},[1056,6095,6096],{"class":1058,"line":1059},[1056,6097,6098],{"class":1062},"# settings/production.py\n",[1056,6100,6101,6103,6105],{"class":1058,"line":1066},[1056,6102,1366],{"class":1365},[1056,6104,1370],{"class":1369},[1056,6106,6107],{"class":1373}," False\n",[1056,6109,6110,6112,6114,6117,6119,6122,6124],{"class":1058,"line":1080},[1056,6111,1388],{"class":1365},[1056,6113,1370],{"class":1369},[1056,6115,6116],{"class":1369}," [",[1056,6118,1405],{"class":1398},[1056,6120,6121],{"class":1073},"yourdomain.com",[1056,6123,1405],{"class":1398},[1056,6125,1464],{"class":1369},[1056,6127,6128,6131,6133],{"class":1058,"line":1087},[1056,6129,6130],{"class":1365},"SECURE_SSL_REDIRECT",[1056,6132,1370],{"class":1369},[1056,6134,1374],{"class":1373},[1056,6136,6137,6139,6141,6143,6146],{"class":1058,"line":1093},[1056,6138,2332],{"class":1365},[1056,6140,1370],{"class":1369},[1056,6142,1554],{"class":1398},[1056,6144,6145],{"class":1073},"/var/www/static/",[1056,6147,1560],{"class":1398},[1056,6149,6150,6152,6154,6156,6159],{"class":1058,"line":1099},[1056,6151,1652],{"class":1365},[1056,6153,1370],{"class":1369},[1056,6155,1554],{"class":1398},[1056,6157,6158],{"class":1073},"/var/www/media/",[1056,6160,1560],{"class":1398},[1056,6162,6163],{"class":1058,"line":1105},[1056,6164,1084],{"emptyLinePlaceholder":1083},[1056,6166,6167],{"class":1058,"line":1111},[1056,6168,6169],{"class":1062},"# Use production database\n",[1056,6171,6172,6174,6176],{"class":1058,"line":1117},[1056,6173,3432],{"class":1365},[1056,6175,1370],{"class":1369},[1056,6177,3437],{"class":1369},[1056,6179,6180,6182,6184,6186,6188],{"class":1058,"line":1123},[1056,6181,1399],{"class":1398},[1056,6183,3444],{"class":1073},[1056,6185,1405],{"class":1398},[1056,6187,3449],{"class":1369},[1056,6189,3437],{"class":1369},[1056,6191,6192,6194,6196,6198,6200,6202,6205,6207],{"class":1058,"line":1129},[1056,6193,3456],{"class":1398},[1056,6195,3459],{"class":1073},[1056,6197,1405],{"class":1398},[1056,6199,3449],{"class":1369},[1056,6201,1554],{"class":1398},[1056,6203,6204],{"class":1073},"django.db.backends.postgresql",[1056,6206,1405],{"class":1398},[1056,6208,1408],{"class":1369},[1056,6210,6211],{"class":1058,"line":1311},[1056,6212,6213],{"class":1062},"        # ... production database config\n",[1056,6215,6216],{"class":1058,"line":1316},[1056,6217,3536],{"class":1369},[1056,6219,6220],{"class":1058,"line":1322},[1056,6221,3541],{"class":1369},[1026,6223,6224],{},"The Django development server is a powerful tool for rapid development and testing. Understanding its features, limitations, and optimization techniques ensures a productive development experience while preparing for smooth production deployment.",[6226,6227,6228],"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 .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sTbE_, html code.shiki .sTbE_{--shiki-light:#91B859;--shiki-default:#B56959;--shiki-dark:#C98A7D}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 .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sz9Cv, html code.shiki .sz9Cv{--shiki-light:#91B859;--shiki-default:#A65E2B;--shiki-dark:#C99076}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 .s8XtY, html code.shiki .s8XtY{--shiki-light:#39ADB5;--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .sbYkP, html code.shiki .sbYkP{--shiki-light:#39ADB5;--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}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 .sBPpx, html code.shiki .sBPpx{--shiki-light:#E53935;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sJdAF, html code.shiki .sJdAF{--shiki-light:#6182B8;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .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 .sFGJz, html code.shiki .sFGJz{--shiki-light:#E53935;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sqOPj, html code.shiki .sqOPj{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#B07D48;--shiki-default-font-style:inherit;--shiki-dark:#BD976A;--shiki-dark-font-style:inherit}html pre.shiki code .sD-vU, html code.shiki .sD-vU{--shiki-light:#E2931D;--shiki-default:#2E8F82;--shiki-dark:#5DA994}html pre.shiki code .s131V, html code.shiki .s131V{--shiki-light:#90A4AE;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sRjD_, html code.shiki .sRjD_{--shiki-light:#E53935;--shiki-light-font-style:italic;--shiki-default:#393A34;--shiki-default-font-style:inherit;--shiki-dark:#DBD7CAEE;--shiki-dark-font-style:inherit}html pre.shiki code .s3h35, html code.shiki .s3h35{--shiki-light:#F76D47;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .sa2tF, html code.shiki .sa2tF{--shiki-light:#E2931D;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sJFLg, html code.shiki .sJFLg{--shiki-light:#E53935;--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .s5q8q, html code.shiki .s5q8q{--shiki-light:#9C3EDA;--shiki-default:#B07D48;--shiki-dark:#BD976A}",{"title":1051,"searchDepth":1059,"depth":1066,"links":6230},[6231,6235,6239,6243,6248,6252,6256,6261,6267],{"id":1032,"depth":1066,"text":1033,"children":6232},[6233,6234],{"id":1037,"depth":1080,"text":1038},{"id":1334,"depth":1080,"text":1335},{"id":1669,"depth":1066,"text":1670,"children":6236},[6237,6238],{"id":1673,"depth":1080,"text":1674},{"id":1916,"depth":1080,"text":1917},{"id":2126,"depth":1066,"text":2127,"children":6240},[6241,6242],{"id":2130,"depth":1080,"text":2131},{"id":2367,"depth":1080,"text":2368},{"id":2822,"depth":1066,"text":2823,"children":6244},[6245,6246,6247],{"id":2826,"depth":1080,"text":2827},{"id":2996,"depth":1080,"text":2997},{"id":3214,"depth":1080,"text":3215},{"id":3399,"depth":1066,"text":3400,"children":6249},[6250,6251],{"id":3403,"depth":1080,"text":3404},{"id":3882,"depth":1080,"text":3883},{"id":4046,"depth":1066,"text":4047,"children":6253},[6254,6255],{"id":4050,"depth":1080,"text":4051},{"id":4339,"depth":1080,"text":4340},{"id":4951,"depth":1066,"text":4952,"children":6257},[6258,6259,6260],{"id":4955,"depth":1080,"text":4956},{"id":5128,"depth":1080,"text":5129},{"id":5282,"depth":1080,"text":5283},{"id":5478,"depth":1066,"text":5479,"children":6262},[6263,6264,6265,6266],{"id":5482,"depth":1080,"text":5483},{"id":5612,"depth":1080,"text":5613},{"id":5690,"depth":1080,"text":5691},{"id":5850,"depth":1080,"text":5851},{"id":5963,"depth":1066,"text":5964,"children":6268},[6269,6270],{"id":5967,"depth":1080,"text":5968},{"id":6017,"depth":1080,"text":6018},"md",null,{},{"title":82,"description":1028},"pcwO05fhHnkwxxqnvuzL9KP-sMcXgSIFhqUjteMqDAw",[6277,6279],{"title":78,"path":79,"stem":80,"description":6278,"children":-1},"Proper environment management is crucial for Django applications. This comprehensive guide covers setting up and managing different environments, ensuring smooth transitions from development to production while maintaining security and performance.",{"title":86,"path":87,"stem":88,"description":6280,"children":-1},"The Django shell is an interactive Python environment with your Django project's context loaded. It's an essential tool for development, debugging, testing, and data manipulation. This comprehensive guide covers everything you need to know about using Django's shell effectively.",1772474902655]