feat(root): scaffold Django project with djinit
Add initial project skeleton using djinit to enable rapid development, CI integration, and deployment setup. New Features - Create .djinit with unified project structure and Tailwind/HTMX enabled. - Add .env.sample with default Django, database, and frontend URLs. - Generate comprehensive .gitignore covering Python, Django, OS, and secret files. - Provide Procfile for Gunicorn web process and release migrations. - Scaffold README.md with project overview and features. - Add manage.py enhanced with environ for .env support. - Initialize pyproject.toml with modern metadata and ruff linting config. - Add requirements.txt mirroring dependencies. - Include runtime.txt pinning Python 3.13. - Update uv.lock to lock dependency versions. Enhancements - Upgrade to latest Django 6.0.5 and DRF ecosystem. - Configure ruff with line-length 88 and isort settings. - Use gunicorn with optimal worker configuration. - Include dj-database-url and psycopg binary for robust PostgreSQL connectivity. Bug Fixes - None.
This commit is contained in:
11 files changed
+1164
No files matched your search
@@ -0,0 +1,119 @@
|
||||
# .
|
||||
|
||||
A Django project folder structure is generated with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
|
||||
|
||||
## Features
|
||||
|
||||
- Modern project structure with environment-specific settings
|
||||
- Pre-configured REST API with JWT authentication
|
||||
- Essential dependencies and utilities
|
||||
- Production-ready configuration
|
||||
|
||||
## Setup
|
||||
|
||||
### Using Just (Recommended)
|
||||
|
||||
1. Set environment variables in `.env` file
|
||||
|
||||
2. Run setup (installs dependencies, runs migrations, creates superuser):
|
||||
```bash
|
||||
just setup
|
||||
```
|
||||
|
||||
3. Start development server:
|
||||
```bash
|
||||
just dev
|
||||
```
|
||||
|
||||
### Traditional Method
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
2. Set environment variables in `.env` file
|
||||
|
||||
3. Run migrations:
|
||||
```bash
|
||||
python manage.py migrate
|
||||
```
|
||||
|
||||
4. Create superuser:
|
||||
```bash
|
||||
python manage.py createsuperuser
|
||||
```
|
||||
|
||||
5. Start development server:
|
||||
```bash
|
||||
python manage.py runserver
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
Run `just` to see all available commands, including:
|
||||
|
||||
- `just dev` - Run development server
|
||||
- `just migrate` - Run migrations
|
||||
- `just makemigrations` - Create migrations
|
||||
- `just createsuperuser` - Create superuser
|
||||
- `just test` - Run tests
|
||||
- `just lint` - Lint code
|
||||
- `just format` - Format code
|
||||
- `just shell` - Django shell
|
||||
- `just clean` - Clean cache files
|
||||
- `just install <package>` - Install package
|
||||
- `just remove <package>` - Remove package
|
||||
- `just server` - Run production server
|
||||
- `just ci` - Run all linting and checks
|
||||
- `just test-coverage` - Run tests with coverage
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
./
|
||||
├── apps/
|
||||
│ ├── admin/
|
||||
│ │ └── __init__.py
|
||||
│ ├── api/
|
||||
│ │ ├── __init__.py
|
||||
│ │ ├── urls.py
|
||||
│ │ └── v1/
|
||||
│ │ ├── __init__.py
|
||||
│ │ └── urls.py
|
||||
│ ├── models/
|
||||
│ │ └── __init__.py
|
||||
│ ├── serializers/
|
||||
│ │ └── __init__.py
|
||||
│ ├── tests/
|
||||
│ │ └── __init__.py
|
||||
│ ├── urls/
|
||||
│ │ └── __init__.py
|
||||
│ └── views/
|
||||
│ └── __init__.py
|
||||
├── core/
|
||||
│ ├── asgi.py
|
||||
│ ├── __init__.py
|
||||
│ ├── settings/
|
||||
│ │ ├── base.py
|
||||
│ │ ├── development.py
|
||||
│ │ ├── __init__.py
|
||||
│ │ └── production.py
|
||||
│ ├── urls.py
|
||||
│ └── wsgi.py
|
||||
├── manage.py
|
||||
├── requirements.txt
|
||||
├── pyproject.toml
|
||||
├── uv.lock
|
||||
├── .env.sample
|
||||
├── justfile
|
||||
├── Procfile
|
||||
├── runtime.txt
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## API Documentation
|
||||
|
||||
When running in development mode, API documentation is available at:
|
||||
- Swagger UI: http://localhost:8000/docs/
|
||||
- Schema: http://localhost:8000/schema/
|
||||
Reference in new issue
Block a user