Files
djinit/djinit/templates/shared/readme.j2
T

149 lines
3.6 KiB
Django/Jinja

# {{ project_name }}
A Django project created with django-setup.
## Features
- Modern project structure with environment-specific settings
- Pre-configured REST API with JWT authentication
- Essential dependencies and utilities
- Production-ready configuration
## Setup
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
```
## Project Structure
```
{% if predefined_structure %}
{{ project_name }}/
├── {{ module_name }}/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
├── apps/
│ ├── users/
│ │ ├── apps.py
│ │ ├── models/
│ │ │ └── user.py
│ │ ├── serializers/
│ │ │ └── user_serializer.py
│ │ ├── services/
│ │ │ └── user_service.py
│ │ ├── views/
│ │ │ └── user_view.py
│ │ ├── urls.py
│ │ └── tests/
│ │ └── test_user_api.py
│ └── core/
│ ├── utils/
│ │ └── responses.py
│ ├── mixins/
│ │ └── timestamped_model.py
│ ├── exceptions.py
│ └── middleware/
│ └── request_logger.py
├── api/
│ ├── __init__.py
│ ├── urls.py
│ └── v1/
│ ├── __init__.py
│ └── urls.py
├── manage.py
├── requirements.txt
├── pyproject.toml
├── .env.sample
├── justfile
├── Procfile
├── runtime.txt
└── README.md
{% elif unified_structure %}
{{ project_name }}/
├── core/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
├── apps/
│ ├── core/
│ │ ├── apps.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ └── mixins.py
│ │ ├── utils/
│ │ │ ├── __init__.py
│ │ │ └── responses.py
│ │ ├── permissions/
│ │ ├── middleware/
│ │ └── __init__.py
│ └── api/
│ ├── apps.py
│ ├── models/
│ ├── serializers/
│ ├── views/
│ ├── services/
│ ├── tests/
│ ├── urls/
│ └── admin/
├── manage.py
├── requirements.txt
├── pyproject.toml
├── .env.sample
├── justfile
├── Procfile
├── runtime.txt
└── README.md
{% else %}
{{ project_name }}/
├── {{ project_name }}/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
{% for app in app_names %}├── {{ app }}/
{% endfor %}├── manage.py
├── requirements.txt
├── pyproject.toml
├── .env.sample
└── README.md
{% endif %}
```
## API Documentation
When running in development mode, API documentation is available at:
- Swagger UI: http://localhost:8000/docs/
- Schema: http://localhost:8000/schema/