From cab69c2232f85977cbcea6d382a57325672b4501 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 31 Jan 2026 02:15:44 +0545 Subject: [PATCH] feat(djinit/templates/components): expose configurable app_config_name placeholder in AppConfig template Allows the generated AppConfig class to use a custom name derived from `app_config_name`, supporting optional `app_module` specification. New Features - Replace `app_name|title` placeholder with `app_config_name` for flexible config naming. - Add conditional block that sets `name` to `app_module` when provided, otherwise falls back to `app_name`. Enhancements - Maintain backward compatibility by defaulting to the original `app_name` behavior. - Improve template flexibility for future naming conventions. Bug Fixes - None. --- djinit/templates/components/apps.py-tpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/djinit/templates/components/apps.py-tpl b/djinit/templates/components/apps.py-tpl index 94f6a3d..fdac009 100644 --- a/djinit/templates/components/apps.py-tpl +++ b/djinit/templates/components/apps.py-tpl @@ -1,6 +1,12 @@ from django.apps import AppConfig -class [[ app_name|title ]]Config(AppConfig): + +class [[ app_config_name ]]Config(AppConfig): default_auto_field = 'django.db.models.BigAutoField' +# @IF app_module + name = '[[ app_module ]]' +# @ENDIF +# @IF not app_module name = '[[ app_name ]]' +# @ENDIF