Skip to content

AbrahamJr105/School_management

Repository files navigation

πŸŽ“ Django School Management System

A comprehensive web-based school management system built with Django, featuring modern UI/UX design and robust functionality for managing students, teachers, grades, and academic operations.

Django Python HTML5 CSS3 JavaScript

πŸ“‹ Table of Contents

✨ Features

πŸ‘₯ User Management

  • Authentication System: Secure login/logout with role-based access (Staff/Student)
  • User Roles: Differentiated access levels for administrators and students
  • Registration: New user registration with role assignment

πŸ‘¨β€πŸŽ“ Student Management

  • Student Profiles: Comprehensive student information management
  • Personal Details: Name, address, nationality, date of birth
  • Academic Information: Field of study (FiliΓ¨re), enrollment details
  • Extracurricular: Sports activities and platform preferences
  • Image Upload: Student photo management
  • CRUD Operations: Create, Read, Update, Delete student records

πŸ‘¨β€πŸ« Teacher Management

  • Teacher Profiles: Complete teacher information system
  • Professional Details: Academic grade, specialty, contact information
  • Academic Hierarchy: Support for various academic ranks (Assistant to Professor)
  • Specializations: Multiple subject specialties (Computer Science, Mathematics, etc.)
  • CRUD Operations: Full teacher record management

πŸ“š Academic Management

  • Module System: Course/subject management with coefficients
  • Grade Management: Student grade recording and calculation
  • Weighted Averages: Automatic calculation based on module coefficients
  • Academic Programs: FiliΓ¨re (field of study) management
  • Pass/Fail Status: Automatic determination based on grade thresholds

πŸ“Š Statistics & Analytics

  • Dashboard: Modern statistical overview with interactive charts
  • Student Statistics: Gender distribution, enrollment numbers
  • Grade Analytics: Performance metrics and trends
  • Visual Charts: Chart.js integration for data visualization
  • Responsive Design: Mobile-friendly statistical displays

πŸ“„ Transcript Generation (PV)

  • Grade Transcripts: Official academic transcript generation
  • Program-based Reports: Filter by academic program
  • Email Integration: Send transcripts via email
  • Print Support: Print-friendly transcript layouts
  • Chart Integration: Visual grade distribution charts
  • Export Options: Multiple output formats

πŸ“§ Communication

  • Email System: Integrated email functionality for transcripts
  • HTML Templates: Professional email templates
  • Chart Attachments: Send visual charts via email
  • Bulk Operations: Multiple recipient support

🎯 Modern UI/UX

  • Responsive Design: Mobile-first approach
  • Modern Styling: CSS Grid, Flexbox, and modern CSS features
  • Interactive Elements: Hover effects, transitions, and animations
  • Color-coded Status: Visual indicators for pass/fail status
  • Professional Templates: Clean, modern template design
  • Form Validation: Client-side and server-side validation

πŸ“± Screenshots

Dashboard

Dashboard Preview Modern dashboard with statistics cards and interactive charts

Student Management

Student Form Comprehensive student information form with modern UI

Grade Transcripts

Transcript View Professional transcript generation with charts and email integration

πŸ—ƒοΈ Models Overview

Core Models

πŸŽ“ Etudiant (Student)

  • Personal information (name, address, nationality)
  • Academic details (program, enrollment)
  • Extracurricular activities (sports)
  • Contact information and preferences
  • Image upload support

πŸ‘¨β€πŸ« Enseignant (Teacher)

  • Professional information (grade, specialty)
  • Personal details (contact, address)
  • Academic qualifications
  • Teaching assignments

πŸ“š Module

  • Course/subject information
  • Credit coefficients for grading
  • Teaching assignments
  • Program associations

πŸ“ Note (Grade)

  • Student-module grade relationships
  • Weighted grade calculations
  • Pass/fail determinations
  • Date tracking

🏫 Filiere (Academic Program)

  • Fields of study management
  • Program descriptions
  • Student-program associations

🌍 Nationalite (Nationality)

  • Country code management
  • Nationality information

⚽ Sport

  • Sports activities catalog
  • Student-sport relationships

πŸš€ Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • Virtual environment (recommended)

Step 1: Clone the Repository

git clone https://github.com/yourusername/school-management-system.git
cd school-management-system

Step 2: Create Virtual Environment

# Windows
python -m venv venv
venv\Scripts\activate

# macOS/Linux
python3 -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Environment Configuration

Create a .env file in the project root:

# Database Configuration
DB_NAME=school_management
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=localhost
DB_PORT=5432

# Email Configuration
EHU=[email protected]
EMAIL_PASSWORD=your_app_password

# Django Settings
SECRET_KEY=your_secret_key_here
DEBUG=True

Step 5: Database Setup

# Run migrations
python manage.py makemigrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

Step 6: Collect Static Files

python manage.py collectstatic

Step 7: Run Development Server

python manage.py runserver

Visit http://127.0.0.1:8000 to access the application.

βš™οΈ Configuration

Database Configuration

The project supports multiple database backends:

PostgreSQL (Recommended for Production)

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': os.getenv('DB_NAME'),
        'USER': os.getenv('DB_USER'),
        'PASSWORD': os.getenv('DB_PASSWORD'),
        'HOST': os.getenv('DB_HOST', 'localhost'),
        'PORT': os.getenv('DB_PORT', '5432'),
    }
}

SQLite (Development)

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

Email Configuration

Configure SMTP settings in settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = os.getenv('EHU')
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_PASSWORD')

Media Files

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

πŸ’» Usage

User Roles

πŸ” Staff/Admin Users

  • Full access to all features
  • Student and teacher management
  • Grade management and statistics
  • Transcript generation and email

πŸ‘¨β€πŸŽ“ Student Users

  • Limited access to bulletin/transcript viewing
  • Personal information access

Core Workflows

1. Student Registration

  1. Navigate to Student Management
  2. Click "Add New Student"
  3. Fill in personal and academic information
  4. Upload student photo (optional)
  5. Save the record

2. Grade Management

  1. Access Django Admin panel
  2. Navigate to Notes (Grades)
  3. Add grades for student-module combinations
  4. System automatically calculates weighted averages

3. Transcript Generation

  1. Go to PV (Transcript) section
  2. Select academic program (Filière)
  3. View generated transcript with statistics
  4. Email or print the transcript

4. Statistics Dashboard

  1. Access Statistics section
  2. View interactive charts and metrics
  3. Analyze student distribution and performance

Navigation

Main Menu Options:

  • Etudiant: Student management interface
  • Enseignant: Teacher management interface
  • Tableaux: Django admin panel access
  • Bulletin: Individual student transcripts
  • Statistique: Statistics dashboard
  • PV: Program transcripts and reports

πŸ”— API Endpoints

Endpoint Method Description Access Level
/ GET Main menu/dashboard Staff
/login/ GET, POST User authentication Public
/register/ GET, POST User registration Public
/logout/ POST User logout Authenticated
/etudiant/ GET, POST Student management Staff
/enseignant/ GET, POST Teacher management Staff
/bulletin/ GET, POST Student bulletins All Users
/statistique/ GET Statistics dashboard Staff
/pv/ GET, POST Program transcripts Staff
/save-chart-image/ POST Chart image saving Staff
/admin/ GET Django admin panel Superuser

πŸ“ Project Structure

School_management/
β”œβ”€β”€ πŸ“ myproject/              # Django project configuration
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ settings.py           # Project settings
β”‚   β”œβ”€β”€ urls.py              # URL routing
β”‚   └── wsgi.py              # WSGI configuration
β”œβ”€β”€ πŸ“ myapp/                 # Main application
β”‚   β”œβ”€β”€ πŸ“ migrations/        # Database migrations
β”‚   β”œβ”€β”€ πŸ“ templates/         # HTML templates
β”‚   β”‚   β”œβ”€β”€ πŸ“ accounts/      # Authentication templates
β”‚   β”‚   └── πŸ“ myapp/         # Application templates
β”‚   β”‚       β”œβ”€β”€ base.html     # Base template
β”‚   β”‚       β”œβ”€β”€ menu.html     # Navigation menu
β”‚   β”‚       β”œβ”€β”€ etudiant_form.html    # Student form
β”‚   β”‚       β”œβ”€β”€ enseignant_form.html  # Teacher form
β”‚   β”‚       β”œβ”€β”€ statistique.html      # Statistics dashboard
β”‚   β”‚       β”œβ”€β”€ pv.html              # Transcript generation
β”‚   β”‚       β”œβ”€β”€ bulletin.html        # Student bulletin
β”‚   β”‚       └── html_content.html    # Email template
β”‚   β”œβ”€β”€ πŸ“ static/            # Static files (CSS, JS, images)
β”‚   β”œβ”€β”€ models.py            # Database models
β”‚   β”œβ”€β”€ views.py             # View functions
β”‚   β”œβ”€β”€ forms.py             # Django forms
β”‚   β”œβ”€β”€ admin.py             # Admin interface
β”‚   └── urls.py              # App URL patterns
β”œβ”€β”€ πŸ“ media/                 # User uploaded files
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ Pipfile                  # Pipenv configuration
β”œβ”€β”€ manage.py               # Django management script
β”œβ”€β”€ .env                    # Environment variables
└── README.md               # This file

πŸ› οΈ Technologies Used

Backend

  • Django 5.1.3: Web framework
  • Python 3.8+: Programming language
  • PostgreSQL: Database (production)
  • SQLite: Database (development)

Frontend

  • HTML5: Markup language
  • CSS3: Styling with modern features (Grid, Flexbox)
  • JavaScript: Client-side functionality
  • Chart.js: Interactive charts and graphs

Libraries & Tools

  • Pillow: Image processing
  • python-dotenv: Environment variable management
  • django-debug-toolbar: Development debugging
  • WeasyPrint: PDF generation
  • gunicorn: WSGI HTTP Server
  • whitenoise: Static file serving

Development Tools

  • Git: Version control
  • pip: Package management
  • Pipenv: Virtual environment management

πŸš€ Deployment

Production Setup

1. Environment Variables

DEBUG=False
SECRET_KEY=your_production_secret_key
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com

2. Static Files

python manage.py collectstatic --noinput

3. Database Migration

python manage.py migrate

4. Gunicorn Configuration

gunicorn myproject.wsgi:application --bind 0.0.0.0:8000

Heroku Deployment

  1. Create Procfile:
web: gunicorn myproject.wsgi
  1. Configure environment variables in Heroku dashboard
  2. Deploy using Heroku CLI or GitHub integration

πŸ“š Documentation

This project includes comprehensive documentation to help developers and administrators:

πŸ“– Available Documentation

πŸ”§ Quick Documentation Links

πŸ“‹ Documentation Features

  • Step-by-step installation guides
  • Complete API endpoint documentation
  • Database schema and relationships
  • Security best practices
  • Performance optimization tips
  • Troubleshooting guides
  • Testing procedures and checklists

🀝 Contributing

We welcome contributions! Please follow these guidelines:

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Standards

  • Follow PEP 8 for Python code
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Write unit tests for new features
  • Update documentation as needed

Testing

# Run tests
python manage.py test

# Check code coverage
coverage run --source='.' manage.py test
coverage report

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Django community for the excellent framework
  • Chart.js for interactive charting capabilities
  • Contributors and testers who helped improve this project

About

myproject

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published