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.3.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.3-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_facile-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 7686a974a614f702b31948c3eba0fb4ced87bd7eecbdfd114b031f4f394d7699
MD5 1a699585a9b9cd633f50873de20b0939
BLAKE2b-256 f8f62eb372228dcd28a58371a9857dbf2e97be82aa8ad331005c17ac5a3fc384

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_facile-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3eb0fc10404d28b600cac225737f1465fe1d0e1ef33559300ebb0b07f4a911e8
MD5 9c11247609b61f02781e47591c77155e
BLAKE2b-256 236e4dd71449b75df40c14ae1284df495ee86de1bafec2d0b71488f537886fea

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