Skip to content

Latest commit

Β 

History

History
86 lines (54 loc) Β· 2.92 KB

File metadata and controls

86 lines (54 loc) Β· 2.92 KB

🌐 Django

DevKit ships with full Django automation tools to bootstrap, manage, and streamline your projects.

πŸ“‘ Table of Contents


🎬 Project Bootstrap

  • django-project-start <project> β€” Create a new Django project in the current folder.
  • django-app-start <app> β€” Add a new app to your Django project.
  • django-settings [local|dev|prod|test] β€” Activate Python env and set DJANGO_SETTINGS_MODULE.
  • django-secret-key-generate β€” Generate and set a secure Django secret key.

🧱 Database Schema & Migrations

  • django-migrate-make [args] β€” Shortcut to makemigrations.
  • django-migrate [args] β€” Run migrations.
  • django-migrate-initial β€” Clean slate: wipe migrations/cache, disable URLs, re-init DB.
  • django-migrate-and-cache-delete β€” Remove all migrations (except __init__.py) and caches.

πŸ” Database Initialization

  • django-database-init β€” Full DB reset: validate env, confirm action, recreate DB, restore data.

πŸ’Ύ Data Backup & Restore

  • django-data-backup β€” Backup your database to data.json.
  • django-data-restore β€” Restore data from data.json and reset sequences.

🌍 Translations & Localization

  • django-translations-make β€” Generate .po files for Arabic across apps with locale/.
  • django-translations-compile β€” Compile .po into .mo for deployment.

πŸš€ Development & Deployment

  • django-run-server [port] β€” Start Django dev server on 0.0.0.0:8000 (default).
  • django-collect-static β€” Collect and clear static files.
  • django-upload-env-to-github-secrets β€” Push .env and GCP_CREDENTIALS to GitHub Secrets.

πŸ§ͺ Testing & Quality

  • django-run-pytest [test_path] β€” Run tests with pytest and coverage report.
  • django-run-test [test_path] β€” Run Django tests via manage.py.

πŸ” Introspection & Automation

  • django-find-cron-urls [project_root] β€” Discover cron/ URLs in internal apps and print full paths.

🧰 Utilities & Aliases

  • django-project-setup β€” Full setup: env, dependencies, DB init.
  • django-find-templates β€” Show Django’s internal template paths.
  • django-format-documents β€” Format codebase with isort and black.

πŸš€ All Django commands are environment-aware. Make sure your Python environment is active before running them.