This Bash script helps initialize and configure a Django project quickly by renaming template directories, updating references within Python files, verifying Python dependencies, and setting up a Python virtual environment. It streamlines the transition from a Cloud Run Django template (helloproject
and helloapp
) to your own project and app names.
- Interactive prompts for project and app names.
- Automated directory renaming (
helloproject
→ your project name,helloapp
→ your app name). - Updates Python file references to reflect new names.
- Modifies the
manage.py
file to match the new project and app configuration. - Checks for Python3 and installs required dependencies (
python3-dev
). - Creates a Python virtual environment.
- Linux OS (preferably Debian-based).
- Bash shell.
python3
andpython3-dev
packages.virtualenv
capability (python3 -m venv
).
-
Clone or download the template project containing the script.
-
Make the script executable:
chmod +x cloud_run_project_renamer.sh
- Run the script:
./cloud_run_project_renamer.sh
-
Follow the interactive prompts to enter your desired project and app names.
-
Select from the available operations:
- Rename directories
- Update Python references
- Update
manage.py
- Check and install Python dependencies
- Create a virtual environment
- Run all operations
$ ./cloud_run_project_renamer.sh
Enter the project name (default: your_project_name): myproject
Enter the app name (default: your_app_name): myapp
Select the operation you want to perform:
1) Rename directories
2) Update Python references in directories (project and app)
3) Update manage.py file
4) Check python environment and install dependencies
5) Create virtual environment
6) Run all operations
0) Exit
Enter your choice (0-6): 6
This script is licensed under the AGPL v3.0.0.
For questions or support, please contact:
- Email: solengdev@tagntrakit.com, enquiries@tagntrakit.com
- Website: Tag N Trak It
Crafted with care by TNTIT-Shamir © 2025 Tag N Trak It - Australia.