This project is a web-based attendance management system built with Django, featuring distinct dashboards for students, teachers, and administrators, along with real-time notifications powered by Django Channels.
- Teachers:
prof.silva,prof.santos,prof.costa - Students:
student1tostudent8 - Password:
password123(for all accounts)
- Login as teacher → Generate attendance code
- Login as student → Enter code → Submit
- See real-time updates in teacher dashboard
User Authentication & Authorization: Secure login and role-based access for students, teachers, and admins.
View enrolled courses and upcoming class sessions.
Submit attendance codes for active classes.
Real-time notifications for attendance validation.
View classes they teach.
Generate unique, time-sensitive attendance codes (10-minute validity).
Receive real-time notifications when students submit attendance codes.
Validate student attendance submissions.
(Future) Display attendance statistics and plots (e.g., using Chart.js).
Comprehensive user management (create, edit, delete students, teachers, and admins).
Course and class session creation and management.
(Future) Overall attendance reporting.
Real-time Notifications: Instant feedback and updates for teachers on student submissions, and for students on attendance validation, using Django Channels and WebSockets.
Python 3
Django: The web framework.
Django Channels: For asynchronous capabilities and WebSocket communication.
Redis: Serves as the channel layer backend for Django Channels, enabling real-time messaging. # Frontend: HTML5
CSS3 (with Bootstrap 5 for responsive design and components)
JavaScript: For client-side logic, WebSocket handling, and dynamic UI updates.
SQLite3 (default for development)
PostgreSQL (recommended for production environments) ## Other Libraries: asgiref: ASGI support.
channels_redis: Redis backend for Channels.
Python 3.8+
Django 4.0+
PostgreSQL (or your preferred database)
Linux (Debian/Ubuntu): sudo apt update && sudo apt install redis-server
macOS (Homebrew): brew install redis
-
Clone the Repository git clone <repository_url> # Replace with your actual repository URL cd attendance_system
-
Create a Virtual Environment (Recommended) python -m venv venv
-
Activate the Virtual Environment macOS/Linux:
source venv/bin/activate
Windows:
.\venv\Scripts\activate
Install all required Python packages using pip:
pip install -r requirements.txt # Assuming you have a requirements.txt, or:
pip install Django daphne channels channels_redis redis
Apply database migrations and create a superuser:
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser # Follow prompts to create an admin user
Start the Django Channels development server using Daphne:
daphne -b 0.0.0.0 -p 8000 attendance_system.asgi:application
Your application should now be accessible at http://127.0.0.1:8000/.
cd attendance_system_django
python manage.py create_test_data --clear
python3 manage.py clean_database --confirm
Run again:
python manage.py create_test_data --clear
Access the Admin Panel: Log in as the superuser at http://127.0.0.1:8000/admin/ to:
Create Users (assign roles: student, teacher, admin).
Create Courses.
Create Class Sessions for courses.
Enroll students in courses (Enrollment model).
Log in as a student.
Navigate to /student/dashboard/.
Enter attendance codes provided by the teacher for relevant classes. Notifications will appear upon successful submission and validation.
Log in as a teacher.
Navigate to /teacher/dashboard/.
Click "Generate New Code" for a class session. The code will appear and be valid for 10 minutes.
Observe real-time notifications as students submit codes.
Click "Validate" next to a student's name to confirm their attendance.
Interactive Calendar: Fully integrate Calendar handling 30 days next of classes.
Attendance Plots: Implement interactive statistical plots (e.g., bar charts of attendance frequency, line graphs over time) using libraries like Chart.js or Plotly.js.
User Profile Management: Allow users to update their own profiles.
Notifications UI: Enhance notification display with more visually appealing elements or a dedicated notification center.
Search and Filtering: Add search and filter options for courses, classes, and attendance records in dashboards.
Course Enrollment Workflow: Implement a student self-enrollment process.
Email Notifications: Integrate email notifications for certain events (e.g., upcoming classes, attendance reports).











