A comprehensive, role-based Learning Management System built with Django 5.0 and PostgreSQL. This platform facilitates academic management by organizing departments, programs, courses, and user interactions (assignments, grading, polling, and notifications).
GitHub Markdown does not support direct video embeds.
👉 Click here to watch the Live Demo Video on LinkedIn
- Role-Based Access Control: Custom user model supporting
Admin,Teacher,Student, andDepartment Managerroles. - Department & Program Management: Organize academics logically with dedicated departments and program structures.
- Course Management: Teachers can create lectures, upload study materials (PDFs, Videos), and manage assignments.
- Enrollment System: Students can enroll in courses, which require admin/teacher approval before granting access.
- Assignments & Grading: Students can submit text or files for assignments. Teachers can review submissions, assign marks, and provide feedback.
- Communication: Built-in apps for global notifications and polls/surveys.
- Backend: Python 3.x, Django 5.0.6
- Database: PostgreSQL (
psycopg2) - Environment Setup:
python-dotenvfor securely managing secrets. - Frontend: Server-Side Rendered Django Templates (HTML, CSS, JS)
university-lms-django/
│
├── accounts/ # Custom user models, authentication, and role logic
├── courses/ # Course, Lecture, Assignment, Submission, and Grading models
├── departments/ # Department and Program models
├── notifications/ # System-wide alert and notification logic
├── polls/ # Voting, surveying, and feedback logic
├── results/ # Examination and final result management
├── static/ # Global static files (CSS, JS, Images)
├── templates/ # Global HTML templates (base.html, etc.)
└── lms_project/ # Core project settings and configurations
Follow these steps to run the project locally on your machine.
- Python 3.10+ installed
- PostgreSQL installed and running
- Git installed
Create a PostgreSQL database for the project. Open your psql terminal or pgAdmin and run:
CREATE DATABASE lms_db;
CREATE USER postgres WITH PASSWORD 'your_secure_password';
ALTER ROLE postgres SET client_encoding TO 'utf8';
ALTER ROLE postgres SET default_transaction_isolation TO 'read committed';
ALTER ROLE postgres SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE lms_db TO postgres;# Clone the repository
git clone https://github.com/codedbyasim/university-lms-django.git
cd university-lms-django
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txtThe project uses environment variables to keep sensitive data like passwords and secret keys secure.
- Create a
.envfile in the root directory (or rename.env.exampleto.env). - Add your database credentials and Django secret key to it:
SECRET_KEY=your-secret-key-goes-here
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
DB_NAME=lms_db
DB_USER=postgres
DB_PASSWORD=your_secure_password
DB_HOST=localhost
DB_PORT=5432Apply the database schemas:
python manage.py makemigrations
python manage.py migrateCreate an admin account to access the Django backend:
python manage.py createsuperuserStart the development server:
python manage.py runserverOpen your browser and navigate to http://127.0.0.1:8000/. You will be redirected to the login page. Admin dashboard is available at http://127.0.0.1:8000/admin/.
For any additional changes, please ensure that you create a new app using python manage.py startapp <app_name> and register it in lms_project/settings.py under INSTALLED_APPS.