π€ Author π€ Rohan Sharma π Submitted as part of the Junior Django Developer Assignment π§ [email protected] https://github.com/kuro-2/django-user-activity-logs.git
A Django + DRF mini project that tracks user activity logs, implements filtering, caching with Redis, and a simple workflow transition system.
Fully aligned with the assignment requirements, with test cases and admin interface included.
β
User Activity Log Model
β
PostgreSQL-backed data storage
β
DRF-powered CRUD API
β
Filter logs by action and date
β
Redis cache on list API (1-min timeout)
β
PATCH endpoint for status transitions
β
Secure configuration via .env
β
Admin dashboard
β
Pytest test suite
| Component | Tech Used |
|---|---|
| Backend | Django 5.0.4, DRF 3.15.1 |
| Database | PostgreSQL |
| Cache | Redis via django-redis |
| Tests | Pytest, pytest-django |
| Auth | Django admin + DRF session auth |
See /screenshots/ folder for visuals of:
- Admin login + model
- DRF API login & usage
- Filters & status transitions
- Redis caching demo
- Pytest test results
DEBUG=True
SECRET_KEY=my-secret-key
POSTGRES_DB=activity_db
POSTGRES_USER=activity_user
POSTGRES_PASSWORD=your_paasword_here
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
REDIS_URL=redis://127.0.0.1:6379/1