This repository serves as a comprehensive Python application template designed to facilitate robust development practices. Leveraging modern tools and methodologies, this template is tailored for developers aiming to build maintainable, scalable applications. It emphasizes dependency management, code quality, and seamless integration with DevOps pipelines.
- CI/CD Pipelines: Automated using GitHub Actions to ensure consistent and reliable deployment processes.
- Dependency Management: Powered by Poetry, a sophisticated tool for managing project dependencies with precision and reliability.
- Code Formatting: Automatically formatted with Black to maintain a consistent and readable codebase.
- Code Linting: Utilizes Ruff to identify and address potential issues early, enhancing code quality and maintainability.
- Code Testing: Utilizes Django to run tests.
- Configuration Files: Includes
.gitignore,pyproject.toml, and other essential configuration files to streamline setup.
To initiate a new project using this template, follow these steps:
-
Create a Repository from Template:
- Navigate to the repository on GitHub.
- Click on the
Use this templatebutton. - Customize the new repository with your project details.
-
Clone Your New Repository:
git clone https://github.com/your-username/your-new-project.git cd your-new-project -
Set Up the Environment:
-
Install Poetry if not already installed:
pip install poetry
-
Install the project dependencies:
poetry install
-
-
Create a new Django project:
poetry run python -m django startproject core mv core/* .
-
Configure the app:
Open
core/settings.py:# Add the following line AUTH_USER_MODEL = "users.User" # Application definition INSTALLED_APPS = [ # Add the app to INSTALLED_APPS "app", "app.books", "app.users", "drf_redesign", "rest_framework", # Default apps ... ]
Open
core/urls.py:# Import `include` from django.urls import path, include urlpatterns = [ # Include `app.urls` path("", include("app.urls")), ... ]
-
Run the Application:
poetry run python manage.py runserver
We warmly welcome contributions from the community. Please refer to our CONTRIBUTING guide for detailed instructions on how to contribute effectively. Your feedback and participation are essential for the continued improvement of this template.
For inquiries or support, please open an issue or join the discussion in the GitHub Discussions section to engage with the community.
This project is licensed under the MIT License. A detailed copy of the terms can be found in the LICENSE file.