Install
openclaw skills install djangoBuild secure Django apps avoiding ORM pitfalls, N+1 queries, and common security traps.
openclaw skills install django| Topic | File |
|---|---|
| QuerySet lazy eval, N+1, transactions | orm.md |
| Request handling, middleware, context | views.md |
| Validation, CSRF, file uploads | forms.md |
| Migrations, signals, managers | models.md |
| XSS, CSRF, SQL injection, auth | security.md |
| Async views, ORM in async, channels | async.md |
list() to cacheselect_related for FK/O2O, prefetch_related for M2M — or N+1 queriesupdate() skips save() — no signals fire, no auto_now updateF() for atomic updates — F('count') + 1 avoids race conditionsget() raises DoesNotExist or MultipleObjectsReturned — use filter().first() for safeDEBUG=False requires ALLOWED_HOSTS — 400 Bad Request without it{% csrf_token %} — or 403 Forbidden on POSTauto_now can't be overridden — use default=timezone.now if need manual setexclude(field=None) excludes NULL — use filter(field__isnull=True) for NULLForeignKey('app.Model')transaction.atomic() doesn't catch exceptions — errors still propagatesync_to_async for ORM in async views — ORM is sync-only