Metadata-Version: 2.4
Name: django-autoapp
Version: 1.0.3
Summary: Auto-generate Django apps with full CRUD boilerplate — models, views, URLs, forms, admin, and templates.
Author-email: Dhiraj Jadav <jadavdhiraj020@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/dhirajjadav/django-autoapp
Project-URL: Repository, https://github.com/dhirajjadav/django-autoapp
Project-URL: Issues, https://github.com/dhirajjadav/django-autoapp/issues
Keywords: django,boilerplate,code-generator,crud,scaffolding
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=4.2
Requires-Dist: Jinja2>=3.1
Dynamic: license-file

# Django AutoApp

[![PyPI version](https://img.shields.io/pypi/v/django-autoapp.svg)](https://pypi.org/project/django-autoapp/)
[![Python](https://img.shields.io/pypi/pyversions/django-autoapp.svg)](https://pypi.org/project/django-autoapp/)
[![Django](https://img.shields.io/badge/Django-4.2%2B-green.svg)](https://www.djangoproject.com/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**Auto-generate Django apps with full CRUD boilerplate** — models, views, URLs, forms, admin, templates, and static files — in a single command.

## Installation

```sh
pip install django-autoapp
```

## Quick Start — New Project from Scratch

Bootstrap a full Django project + virtual environment in one command:

```sh
mkdir my_site && cd my_site
django-autoapp-init myproject
```

This creates:

```
my_site/
├── venv/              ← isolated virtual environment
└── myproject/         ← Django project (manage.py, settings, etc.)
```

Then follow the printed instructions:

```sh
cd myproject
..\venv\Scripts\activate      # Windows
source ../venv/bin/activate   # macOS / Linux
python manage.py autoapp blog Post
python manage.py runserver
```

## Adding to an Existing Project

Add to your `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    # ...
    "django_autoapp",
]
```

## Usage

```sh
python manage.py autoapp <APP_NAME> <MODEL_NAME>
```

### Example

```sh
python manage.py autoapp blog Post
```

This generates a complete `blog/` app with a `Post` model, including:

- `models.py` — Model with `name`, `created_at`, `updated_at` fields
- `views.py` — ListView, CreateView, DetailView, UpdateView, DeleteView
- `urls.py` — URL patterns with proper namespacing
- `forms.py` — ModelForm
- `admin.py` — Admin registration with all fields displayed
- `apps.py` — AppConfig
- `templates/` — List, form, detail, and confirm-delete HTML templates
- `management/commands/run_project.py` — One-command project runner

### Options

| Flag | Description |
|------|-------------|
| `--dry-run` | Simulate execution without writing any files |
| `--force` | Overwrite existing files and directories |
| `--template-dir PATH` | Use a custom Jinja2 template directory |

## Requirements

- Python ≥ 3.10
- Django ≥ 4.2
- Jinja2 ≥ 3.1

## License

[MIT](LICENSE)
