Skip to content
/ drf-app Public template
generated from youzarsiph/django-app

A Django REST Framework app template with dependency management and DevOps best practices.

License

Notifications You must be signed in to change notification settings

youzarsiph/drf-app

drf-app

CI CD Code Style: Black Code Linting: Ruff Code Testing Docker Image Docker Publish PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - License

Overview

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.

Key Features

  • 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.

Quick Start Guide

To initiate a new project using this template, follow these steps:

  1. Create a Repository from Template:

    • Navigate to the repository on GitHub.
    • Click on the Use this template button.
    • Customize the new repository with your project details.
  2. Clone Your New Repository:

    git clone https://github.com/your-username/your-new-project.git
    cd your-new-project
  3. Set Up the Environment:

    • Install Poetry if not already installed:

      pip install poetry
    • Install the project dependencies:

      poetry install
  4. Create a new Django project:

    poetry run python -m django startproject core
    mv core/* .
  5. 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")),
       ...
    ]
  6. Run the Application:

    poetry run python manage.py runserver

Contributing

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.

Support

For inquiries or support, please open an issue or join the discussion in the GitHub Discussions section to engage with the community.

Licensing

This project is licensed under the MIT License. A detailed copy of the terms can be found in the LICENSE file.

About

A Django REST Framework app template with dependency management and DevOps best practices.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published