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.4.tar.gz (9.8 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.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_facile-1.0.4.tar.gz
  • Upload date:
  • Size: 9.8 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.4.tar.gz
Algorithm Hash digest
SHA256 12dfde657b24d5b43be264fb0943ff123997a3cf744304e28b6cba09942e8291
MD5 7f41e0a9bb17e620da9ba568cb01b597
BLAKE2b-256 d7089eb7f9aa2e246512e8ceb65124b0f27ec614f8d0159bc3dd503aaa76cacc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_facile-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 323f1f276ce7d791fab9761b8d43b0a7e4f33b2f8bebf8d3c2a4347d5a6cc557
MD5 bb7c956e86b7eda30eb32685c4519375
BLAKE2b-256 21a904ebf816fb89a1e06f26c7d8345150ede0fc2f0959ba7d8a83b9c91aed6a

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