- 1 Welcome to Django: Setup and First Steps ๐ The "Why" Before the "How": Why Choose Django?Setting up the Environment: Python, Pip, and VirtualenvsYour First Django Project: `django-admin startproject`Project Structure: Understanding the Django Blueprint
- 2 Django's Brain: Architecture & Apps ๐ง The MVT (Model-View-Template) Pattern ExplainedProjects vs. Apps: Modularizing Your CodeCreating Your First App: `python manage.py startapp`Registering Apps and Navigating `settings.py`
- 3 URLs and Views: Directing Traffic ๐ฆ URL Dispatcher: Mapping Routes to ViewsFunction-Based Views (FBVs): Handling Requests & ResponsesDynamic URLs: Passing Parameters in PathsNaming URLs & The Power of the `reverse` Function
- 4 Templates: Making It Look Good ๐จ Django Template Language (DTL): Variables & TagsTemplate Inheritance: Don't Repeat Yourself (DRY)Passing Context: Sending Data from View to TemplateServing Static Files: Integrating CSS, JS, and Images
- 5 Models: Your Database Blueprint ๐๏ธ Introduction to the Django ORM (Object-Relational Mapper)Defining Models: Choosing the Right FieldsMigrations: Translating Code to Database TablesThe Django Admin: Setting up the Free Out-of-the-Box Dashboard
- 6 Mastering the ORM: Data Manipulation ๐ The Django Shell: Interactively Querying Your DataCRUD Operations: Create, Read, Update, DeleteFiltering and Lookups: Finding Exactly What You NeedDatabase Relationships: Foreign Keys and Many-to-Many
- 7 Forms: Handling User Input Safely ๐ HTML Forms vs. Django Forms: Why Use the Latter?Creating, Rendering, and Processing Django FormsModelForms: Magically Tying Forms Directly to ModelsValidation and Security: CSRF Protection Explained
- 8 Class-Based Views (CBVs): Leveling Up ๐ The Transition: Why and When to Use Class-Based ViewsGeneric Display Views: `ListView` and `DetailView`Generic Editing Views: `CreateView`, `UpdateView`, and `DeleteView`Overriding Methods: Customizing Default CBV Behavior
- 9 Authentication: Securing Your App ๐ The Built-in User Model: Registration, Login, and LogoutRestricting Access: `@login_required` and `LoginRequiredMixin`Managing Passwords and Handling Session ExpirationExtending the User Model: Adding Custom Profile Fields
- 10 State and Memory: Sessions & Messages ๐ช Understanding the Web's StatelessnessThe Messages Framework: Flash Notifications for UsersReading, Writing, and Securing CookiesSession Management: Storing Temporary Data Behind the Scenes
- 11 Django REST Framework (DRF): Building APIs ๐ What is an API and Why Add DRF to Django?Serializers: Translating Complex Models to JSONFunction-Based API Views vs. Class-Based API ViewsViewSets and Routers: Automating API Endpoints
- 12 Testing: Bulletproofing Your App ๐ก๏ธ Why Write Tests? Setting Up the Django Test FrameworkTesting Models and Database IntegrityTesting Views, Context Data, and URL RoutingThe Test Client: Simulating User Interactions
- 13 Deployment: Going Live! ๐ Preparing for Production: `DEBUG = False` and `ALLOWED_HOSTS`Hiding Secrets: Managing Environment Variables (`python-dotenv`)Switching Databases: Moving from SQLite to PostgreSQLServing The App: WSGI, Gunicorn, and Web Servers (Nginx)