Skip to content

User Activity Log System is a Django + DRF backend that records user actions like login, logout, and file uploads. It supports filtering, status transitions, PostgreSQL storage, Redis caching, authentication, API documentation, and Pytest-based unit tests.

Notifications You must be signed in to change notification settings

kuro-2/django-user-activity-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🀝 Author πŸ‘€ Rohan Sharma πŸ“ Submitted as part of the Junior Django Developer Assignment πŸ“§ [email protected] https://github.com/kuro-2/django-user-activity-logs.git

πŸ› οΈ User Activity Log – Junior Django Assignment

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.


πŸš€ Features

βœ… 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


πŸ“‚ Tech Stack

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

πŸ“Έ Screenshots

See /screenshots/ folder for visuals of:

  • Admin login + model
  • DRF API login & usage
  • Filters & status transitions
  • Redis caching demo
  • Pytest test results

πŸ” Environment Config (.env)

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

About

User Activity Log System is a Django + DRF backend that records user actions like login, logout, and file uploads. It supports filtering, status transitions, PostgreSQL storage, Redis caching, authentication, API documentation, and Pytest-based unit tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages