# DjangoDetector

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/django-detector.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/django-detector.ts#L119)

Django Detector

## Methods

| Method | Signature | Returns |
|---|---|---|
| `detectViews` | `detectViews(entities: Entity[])` | `DetectedDjangoView[]` |
| `detectSerializers` | `detectSerializers(entities: Entity[])` | `DetectedDjangoSerializer[]` |
| `detectModels` | `detectModels(entities: Entity[])` | `DetectedDjangoModel[]` |
| `getViewSummary` | `getViewSummary(view: DetectedDjangoView)` | `string` |

## Where it refuses work

- `DjangoDetector` stops the work with an early return when `!match`, in 3 places.
- `DjangoDetector` stops the work with an early return when `!/views\.py$/i.test(filePath)`.
- `DjangoDetector` stops the work with an early return when `!/models\.py$/i.test(filePath)`.
- `DjangoDetector` stops the work with an early return when `/ViewSet/.test(code)`.
- `DjangoDetector` stops the work with an early return when `/APIView/.test(code)`.
- `DjangoDetector` stops the work with an early return when `/class\s+\w+\s*\(/.test(code)`.
