Centralise all AI prompt strings into a single Python module so you can iterate on model behaviour without hunting across your codebase.
Tutorials
Learn programming, AI, cloud, everyday technology and automation through practical, step-by-step tutorials. Browse a topic below or explore all technology categories.
Browse by topic92 available tagsShow all tags
Offload slow OpenAI or Claude API calls to Celery workers so Django views return immediately and users receive results through HTMX polling.
Set up a retrieval-augmented generation system using PostgreSQL pgvector so your AI assistant answers from your own content instead of hallucinating.
Learn the structure and principles behind effective system prompts so your AI integration responds consistently and stays within the boundaries you define.
Replace verbose try/except/pass patterns with contextlib.suppress to make intentional exception suppression readable and precise.
Design management commands that can be safely re-run in any environment without creating duplicates, side effects, or partial database state.
Implement Django's clean() method to validate business rules at the ORM layer so invalid data is rejected regardless of how the model is saved.
Create a drop-in server-side pagination partial using HTMX and Django's Paginator so list pages update inline without writing any JavaScript.
Split settings into a base file and environment-specific files so configuration is clean, environment variables are explicit, and nothing leaks between environments.
Install Django Debug Toolbar and use the SQL panel to identify duplicated queries and fix them with select_related and prefetch_related.
Understand when to rebase and when to merge, with concrete examples of each workflow and the team rules that prevent history from breaking.
Structure Django views so business logic lives in service functions that can be unit-tested without a running server or HTTP request.