Skip to main content

A CLI tool to simplify Django development

Project description

🚀 Django Facile

Django Facile is a powerful CLI tool that simplifies Django development by automating project setup, environment management, and common workflows.


✨ Features

  • ⚡ One-command project setup
  • 🔄 Dev ↔ Prod environment switching
  • 🛠 Built-in commands for migrations, shell, server
  • 🔐 Production-ready configuration helpers
  • 📦 Simplified Django workflow

📦 Installation

pip install django-facile

🚀 Quick Start

django-facile startproject myproject --env dev --db sqlite
cd myproject
django-facile run

📚 Commands Overview

Command Description
startproject Create a Django project
startapp Create a Django app
switch-env Switch environment (dev/prod)
run Start development server
migrate Run makemigrations + migrate
superuser Create admin user
shell Open Django shell
check Validate project configuration
collectstatic Prepare static files for production
--help Show CLI help
--version Show CLI version

🧠 Environment Modes

🧪 Development Mode (dev)

  • Uses SQLite
  • DEBUG = True
  • Auto static serving
  • Faster development

🚀 Production Mode (prod)

  • Uses PostgreSQL
  • DEBUG = False
  • Requires collectstatic
  • Security settings enabled

⚙️ Commands (Detailed)


🏗 Create Project

django-facile startproject <project_name> --env dev --db sqlite

Example:

django-facile startproject myproject --env dev --db sqlite

📦 Create App

django-facile startapp <app_name>

Example:

django-facile startapp blog

🔄 Switch Environment

Switch to Development:

django-facile switch-env dev

Switch to Production:

django-facile switch-env prod

▶️ Run Server

django-facile run

Custom port:

django-facile run --port 8001

🗄 Database Migrations

django-facile migrate

👉 Internally runs:

  • makemigrations
  • migrate

👤 Create Superuser

django-facile superuser

🐚 Django Shell

django-facile shell

🔍 Check Configuration

Normal check:

django-facile check

Production check:

django-facile check --deploy

📦 Collect Static Files (Production Only)

django-facile collectstatic

⚠️ Use only in production mode


📖 Help

django-facile --help

🔢 Version

django-facile --version

🔄 Typical Workflow

🧪 Development Workflow

django-facile startproject myproject --env dev --db sqlite
cd myproject
django-facile startapp blog
django-facile run

🚀 Production Workflow

django-facile switch-env prod
django-facile migrate
django-facile collectstatic
django-facile check --deploy

⚠️ Important Notes

  • collectstatic is only required in production
  • check --deploy should be run before deployment
  • .env controls active environment
  • Dev and Prod configs are separated internally

🧠 Why Django Facile?

Django setup and environment management can be repetitive and error-prone. Django Facile simplifies the workflow into a clean, developer-friendly CLI.


🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_facile-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_facile-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file django_facile-1.0.0.tar.gz.

File metadata

  • Download URL: django_facile-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for django_facile-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1e5b77e0cb4a3ad1de51524a5ca42cb0451d0bb17eed7c8524e1f41838faf049
MD5 9c722f84333808a4f87c0adb1feb0933
BLAKE2b-256 8e4f3a4b1c798d347858dc9299054e805e89ac08f78b6bbe3426e46e982778e9

See more details on using hashes here.

File details

Details for the file django_facile-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_facile-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for django_facile-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d30cda351b0be6c69e3b5e5cf6d8f9a9447c0faa062ad6594638f6466cf32e19
MD5 9ddc89e320206bbc493d168490ecb679
BLAKE2b-256 fa8e4ea24d26cd9002e1f90787164d1740c0dc22647a5e26b355671155a12806

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page