fix formatting

This commit is contained in:
sankalp committed 2026-01-30 23:37:23 +05:45
1 parent a7b92c72cd
commit 3862722e2b
2 files changed
+41 -39

No files matched your search

+38 -38
View File
@@ -53,10 +53,10 @@ dj setup
The wizard will ask you a few questions: The wizard will ask you a few questions:
1. **What structure do you want?** 1. **What structure do you want?**
- **Standard** – Classic Django layout with split settings - **Standard** – Classic Django layout with split settings
- **Predefined** – Organized with `apps/` and `api/` folders (great for larger projects) - **Predefined** – Organized with `apps/` and `api/` folders (great for larger projects)
- **Unified** – Everything under `core/` and `apps/` (clean and minimal) - **Unified** – Everything under `core/` and `apps/` (clean and minimal)
- **Single Folder** – All apps in one configurable folder (simple and flat) - **Single Folder** – All apps in one configurable folder (simple and flat)
2. **Project Setup** – Destination directory (use `.` for current) and project name. 2. **Project Setup** – Destination directory (use `.` for current) and project name.
@@ -71,16 +71,16 @@ That’s it—your project will be ready with everything configured.
## What You Get ## What You Get
- **Split settings** for development and production - **Split settings** for development and production
- **Django REST Framework** with JWT authentication - **Django REST Framework** with JWT authentication
- **API documentation** (Swagger UI at `/docs/`) - **API documentation** (Swagger UI at `/docs/`)
- **CORS** configured for local development - **CORS** configured for local development
- **WhiteNoise** for static files - **WhiteNoise** for static files
- **PostgreSQL** support (SQLite for dev) - **PostgreSQL** support (SQLite for dev)
- **Modern admin** interface (`django-jazzmin`) - **Modern admin** interface (`django-jazzmin`)
- **Deployment ready** with `Procfile` and `runtime.txt` - **Deployment ready** with `Procfile` and `runtime.txt`
- **Development tools** (`Justfile` with common commands) - **Development tools** (`Justfile` with common commands)
- **Environment template** (`.env.sample`) - **Environment template** (`.env.sample`)
- **Git ready** (`.gitignore` included) - **Git ready** (`.gitignore` included)
## Commands ## Commands
@@ -191,16 +191,16 @@ If you don’t have `just` installed, these are just shortcuts for the equivalen
### Packages ### Packages
- **Django** – Web framework - **Django** – Web framework
- **Django REST Framework** – API toolkit - **Django REST Framework** – API toolkit
- **djangorestframework‑simplejwt** – JWT authentication - **djangorestframework‑simplejwt** – JWT authentication
- **drf‑spectacular** – OpenAPI/Swagger docs - **drf‑spectacular** – OpenAPI/Swagger docs
- **django‑cors‑headers** – CORS handling - **django‑cors‑headers** – CORS handling
- **django‑jazzmin** – Modern admin UI - **django‑jazzmin** – Modern admin UI
- **whitenoise** – Static file serving - **whitenoise** – Static file serving
- **psycopg2‑binary** – PostgreSQL driver - **psycopg2‑binary** – PostgreSQL driver
- **gunicorn** – Production WSGI server - **gunicorn** – Production WSGI server
- **python‑dotenv** – `.env` handling - **python‑dotenv** – `.env` handling
### API Endpoints ### API Endpoints
@@ -214,7 +214,7 @@ If you don’t have `just` installed, these are just shortcuts for the equivalen
### Settings Overview ### Settings Overview
- **Development** – SQLite, `DEBUG=True`, console email backend, permissive CORS. - **Development** – SQLite, `DEBUG=True`, console email backend, permissive CORS.
- **Production** – PostgreSQL, hardened security settings, SMTP email backend, strict CORS. - **Production** – PostgreSQL, hardened security settings, SMTP email backend, strict CORS.
## Environment Setup ## Environment Setup
@@ -238,18 +238,18 @@ SQLite works out of the box for development—no extra DB setup required.
The following items are tracked in **TODO.md** and represent the near‑future direction of djinit. The following items are tracked in **TODO.md** and represent the near‑future direction of djinit.
### Planned Features ### Planned Features
- **Docker Support** – Auto‑generate a `Dockerfile` for containerized deployments. - **Docker Support** – Auto‑generate a `Dockerfile` for containerized deployments.
- **Frontend Integration** – Scaffold React, Vue, or HTMX alongside the Django backend. - **Frontend Integration** – Scaffold React, Vue, or HTMX alongside the Django backend.
- **Celery Integration** – Simplify background task setup with Celery. - **Celery Integration** – Simplify background task setup with Celery.
- **More Packages** – Add optional integrations for popular Django packages. - **More Packages** – Add optional integrations for popular Django packages.
### Enhancements ### Enhancements
- **Add more project structure templates** – Expand the set of ready‑made layouts. - **Add more project structure templates** – Expand the set of ready‑made layouts.
- **Add testing framework setup** – Provide pytest and coverage configuration out of the box. - **Add testing framework setup** – Provide pytest and coverage configuration out of the box.
- **Fix bugs** – Ongoing maintenance and bug resolution. - **Fix bugs** – Ongoing maintenance and bug resolution.
### Completed ### Completed
- **Interactive configuration wizard** – Streamlined project creation experience. - **Interactive configuration wizard** – Streamlined project creation experience.
- **Improved structure detection** – Smarter detection of existing Django layouts. - **Improved structure detection** – Smarter detection of existing Django layouts.
> Contributions that address any of the above items are highly welcome! > Contributions that address any of the above items are highly welcome!
@@ -258,17 +258,17 @@ The following items are tracked in **TODO.md** and represent the near‑future d
Found a bug or have an idea? Open an issue or submit a pull request. Contributions are always welcome! Found a bug or have an idea? Open an issue or submit a pull request. Contributions are always welcome!
1. Fork the repository. 1. Fork the repository.
2. Create a feature branch (`git checkout -b feature/awesome-feature`). 2. Create a feature branch (`git checkout -b feature/awesome-feature`).
3. Make your changes and ensure tests pass (`just test`). 3. Make your changes and ensure tests pass (`just test`).
4. Submit a pull request with a clear description of the change. 4. Submit a pull request with a clear description of the change.
Please follow the existing code style (ruff + black) and include tests for new functionality. Please follow the existing code style (ruff + black) and include tests for new functionality.
## License ## License
MIT © Sankalp Tharu MIT © Sankalp Tharu
--- ---
*© 2024 Sankalp Tharu. All rights reserved.* *© 2024 Sankalp Tharu. All rights reserved.*
+3 -1
View File
@@ -24,7 +24,9 @@ class DjangoHelper:
os.makedirs(directory, exist_ok=True) os.makedirs(directory, exist_ok=True)
manage_py_path = os.path.join(directory, "manage.py") manage_py_path = os.path.join(directory, "manage.py")
create_file_from_template(manage_py_path, "project/manage_py.j2", {"project_name": project_name}, "Created manage.py") create_file_from_template(
manage_py_path, "project/manage_py.j2", {"project_name": project_name}, "Created manage.py"
)
os.chmod(manage_py_path, 0o755) os.chmod(manage_py_path, 0o755)
if unified: if unified: