Kind: Class
Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/detectors/django-detector.ts
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
DjangoDetectorstops the work with an early return when!match, in 3 places.DjangoDetectorstops the work with an early return when!/views\.py$/i.test(filePath).DjangoDetectorstops the work with an early return when!/models\.py$/i.test(filePath).DjangoDetectorstops the work with an early return when/ViewSet/.test(code).DjangoDetectorstops the work with an early return when/APIView/.test(code).DjangoDetectorstops the work with an early return when/class\s+\w+\s*\(/.test(code).
Was this page helpful?