UX Enhancement: Use project_name variable for dynamic log paths instead of hardcoded 'mysite'#21
Open
SatyamGupta-py wants to merge 2 commits intotendenci:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! This pull request is to improve the onboarding experience for new developers by making a small adjustment to the
settings.pyproject template.Context:
When a new developer follows the installation.txt guide, they are encouraged to customize their project name, database, and other settings. For example, a user setting up a project named '
my-project' will create a database, virtual environment, and log directory all using the 'my-project' name. This is a great, intuitive process.The first time the user runs a command 'python manage.py initial_migrate', they may encounter a:
FileNotFoundError: [Errno 2] No such file or directory: '/var/log/mysite/debug.log'This happened to me.
This happens because the log path in the settings.py template is currently hardcoded to use 'mysite', while the user has created a log directory matching their custom project name
(e.g., /var/log/my-project/). This can cause a pause in the setup process while the user investigates their settings file to align the paths.UX Enhancement:
This PR replaces the hardcoded '
mysite' in the log path with the{{ project_name }}template variable.This change ensures that the generated
settings.pyfile automatically uses the correct, custom project name for the log directory, aligning the template's behavior with the instructions in the documentation.