An online learning management system (LMS) built with Django. Students purchase subscription plans to access programming courses, complete video lessons with quizzes and homework, and receive feedback from teachers.
- Authentication β email-based registration with email verification, login, password reset, and profile management (avatar, country, GitHub/LinkedIn links)
- Subscription plans β three tiers (Newbie, Middle, Pro) with flexible durations (1 month, 3 months, 6 months, 1 year, or lifetime)
- Promo codes β admin-generated codes that activate a subscription plan for a student
- Courses & lessons β video lessons (YouTube embed), PDF notes, and JSON-based lesson content; lessons unlock sequentially as the student progresses
- Lesson tests β multiple-choice quizzes with a configurable minimum passing score
- Homework submissions β students submit a GitHub link; teachers review and mark as approved, pending, or needs revision
- Comments & reports β students can comment on lessons and report issues
- Admin/teacher dashboard β overview of pending homework, student progress, and submitted reports
- Email notifications β confirmation emails, password reset emails, and homework submission alerts
- Python 3 / Django 5.1
- PostgreSQL β primary database
- Redis β caching backend and django-select2 cache
- Django REST Framework β API layer
- django-select2 β searchable dropdowns for country and status fields
- Pillow β user avatar uploads
- python-dotenv β environment variable management
codingschool/
βββ config/ # Django project settings and root URL configuration
βββ users/ # Custom user model, subscription plans, promo codes, country data
βββ course/ # Courses, lessons, tests, homework, comments, reports
βββ main/ # Public pages (index, courses overview, dashboard, promo code page)
βββ manage.py
- Python 3.10+
- PostgreSQL
- Redis
-
Clone the repository
git clone <repository-url> cd codingschool
-
Create and activate a virtual environment
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env
Fill in
.envwith your database credentials, secret key, and email settings. -
Apply migrations
python manage.py migrate
-
Load country data
python manage.py load_countries
-
Create a superuser
python manage.py createsuperuser
-
Start Redis (required for caching)
redis-server
-
Run the development server
python manage.py runserver
The app will be available at
http://127.0.0.1:8000.
After running the server, log in to the Django admin (/admin/) and create:
- Programming languages and bonus modules (used in subscription plans)
- Subscription plan modes and duration types
- At least one
CoursewithLessonobjects - A teacher group named
teachersto grant dashboard access to non-superuser staff
| Variable | Description |
|---|---|
DJANGO_SECRET_KEY |
Django secret key |
POSTGRES_ENGINE |
DB engine (django.db.backends.postgresql) |
POSTGRES_DB |
Database name |
POSTGRES_USER |
Database user |
POSTGRES_PASSWORD |
Database password |
EMAIL_BACKEND |
Email backend class |
EMAIL_HOST |
SMTP host (e.g. smtp.gmail.com) |
EMAIL_HOST_USER |
Sender email address |
EMAIL_HOST_PASSWORD |
SMTP password or app password |
This project is for portfolio and educational purposes.