* Check if manage.py exists in workPath and references DJANGO_SETTINGS_MODULE.
(workPath: string)
| 342 | * Check if manage.py exists in workPath and references DJANGO_SETTINGS_MODULE. |
| 343 | */ |
| 344 | async function checkDjangoManage(workPath: string): Promise<boolean> { |
| 345 | const managePath = join(workPath, 'manage.py'); |
| 346 | try { |
| 347 | const content = await fs.promises.readFile(managePath, 'utf-8'); |
| 348 | if (!content.includes('DJANGO_SETTINGS_MODULE')) return false; |
| 349 | debug(`Found Django manage.py with DJANGO_SETTINGS_MODULE at ${workPath}`); |
| 350 | return true; |
| 351 | } catch { |
| 352 | return false; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | /** |
| 357 | * List immediate subdirectories of workPath (non-hidden). |
no test coverage detected