feat(src/djinit/templates/config/settings): add DATABASE_URL support via dj_database_url
Add conditional import of `dj_database_url` and a directive comment for `use_database_url` to enable automatic database configuration when the `use_database_url` flag is set, improving flexibility of the production settings template. - New Features: Introduce support for reading `DATABASE_URL` to configure Django databases automatically. - Enhancements: Conditional import improves template modularity and reduces unnecessary dependencies. - Bug Fixes: None.
This commit is contained in:
1 file changed
+2
@@ -1,7 +1,9 @@
|
||||
"""generated with djinit"""
|
||||
|
||||
from .base import *
|
||||
# @IF use_database_url
|
||||
import dj_database_url
|
||||
# @ENDIF
|
||||
|
||||
DEBUG = False
|
||||
SECRET_KEY = env('SECRET_KEY')
|
||||
|
||||
Reference in new issue
Block a user