This is a complete Django full-stack application with Docker setup that includes:
- Django Web Console (CRUD with Bootstrap)
- Django REST API (CRUD operations)
- Django WebSocket + Channels + Redis (Chat Application)
- Django Celery (Background Tasks and Scheduling)
- Django + PostgreSQL database
- Docker and Docker Compose installed
- Git (optional, for version control)
- Basic knowledge of Django and Docker
docker-compose up --build
In a new terminal:
docker-compose exec django python manage.py makemigrations
docker-compose exec django python manage.py migrate
docker-compose exec django python manage.py createsuperuser
docker-compose exec django python manage.py collectstatic --noinput
- Web Console: http://localhost:8000/
- REST API: http://localhost:8000/api/items/
- Chat Application: http://localhost:8000/chat/
- Django Admin: http://localhost:8000/admin/
docker-compose exec web python manage.py shell -c "
from apps.tasks.tasks import sample_background_task;
result = sample_background_task.delay('test parameter');
print(f'Task ID: {result.id}')
"
- Go to Django Admin: http://localhost:8000/admin/
- Navigate to "Periodic Tasks"
- Create a new periodic task using the
scheduled_task
function
# Collect static files
docker-compose exec web python manage.py collectstatic --noinput
# Check static files directory
docker-compose exec web ls -la staticfiles/
# Show migration status
docker-compose exec web python manage.py showmigrations
# Reset migrations (⚠️ For development only)
docker-compose exec web python manage.py migrate console zero
docker-compose exec web python manage.py makemigrations console
docker-compose exec web python manage.py migrate
- Full CRUD operations with Bootstrap UI
- Comprehensive form with all Django field types
- File uploads (images, documents)
- Rich form validation
- Responsive design
- Full CRUD API endpoints
- JSON serialization
- Authentication support -Browsable API interface
- Real-time messaging
- Persistent message storage
- Connection management
- Reconnection handling
- Bootstrap-styled interface
- Asynchronous task processing
- Scheduled tasks with Celery Beat
- Task monitoring
- Database-backed results
- Production-ready database
- Data persistence
- Proper indexing
- Relationship handling
- WebSocket channel layer
- Celery broker
- Caching support
- High performance