Cursor as Your Tool: A New Workflow for AI-Native Development
The Problem: Context Switching Kills Flow
The Problem: Context Switching Kills Flow
Django Formsets What: Multiple instances of the same form on one page (e.g. many products in one order). Same form, N times, one submit.
Django Email Testing Idea: In tests, Django can use an in-memory backend so nothing is really sent. All “sent” emails go to mail.outbox (a list).
Django Signals What: Observer pattern. Something happens (e.g. model save) → receivers run. Decouples “who did it” from “what runs after.”
Django FBV vs CBV — When to Use Which
DTOs (Data Transfer Objects) What: Objects that carry data between layers (API ↔ service ↔ DB). Data only, no behavior (or minimal validation).
Dependency Injection Idea: Don’t create dependencies inside a class; pass them in (constructor, param, or setter). Caller or a container provides the concret...
Python DateTime & Timezone Rule of thumb: Store and compute in UTC. Convert to local only for display.
Celery Task Testing Goal: Test task logic without a real broker and without flakiness.
JS Promises: Promise.all vs Promise.allSettled Promise.all(iterable) Resolves when all resolve; rejects as soon as one rejects (fail-fast). Result: arra...
Django FBV vs CBV Reality: Both can do the same job. Choice = team + use case, not religion.
Deploy Django to Railway Prep: requirements.txt, Procfile, env-based settings, static files handled (e.g. Whitenoise).