Fake News Detection System Using Django and Machine Learning | Source Code
LIMITED TIME
Get Source Code ₹99
Real project UI Full source included

No live demo yet — message us for access

Our team shares demo access on WhatsApp within minutes

Fake News Detection System Using Django and Machine Learning

Complete final-year project source code with frontend, backend, database, and setup guide. Instant download after secure payment.

  • MACHINE-LEARNING Stack
  • Instant Download
Secure CCAvenue payment Instant download link WhatsApp support

Choose your plan

Source Code Only

Full ZIP with frontend, backend, database & documentation.

₹99 one-time
  • Complete project source files
  • Database script included
  • How-to-run guide

What's in your download

Review features, setup steps, and credentials before you pay.

Project Overview

Description, tech stack, and what is included

Full source Frontend + backend
Database .sql file
Setup guide README included

Fake News Detection System Using Django and Machine Learning is a web-based final year project developed for classifying news as Real or Fake using a hybrid machine-learning pipeline. This major project allows users to register, log in, paste news text, submit article URLs, run fake news detection, view prediction labels, check confidence scores, review hybrid and per-model probabilities, access dashboard analytics, search detection history, delete own records, and generate visual reports. The system uses TF-IDF vectorization, Logistic Regression, Random Forest, NLTK preprocessing, and hybrid ensemble probability averaging for prediction. Staff users can view cross-user data, manage detection records, filter reports, and access extra staff-level analytics. Django admin provides complete management of prediction results. This fake news detection source code is suitable for students who need a final year project, major project, minor project, source code, and project report based on Django, Python, NLP, and machine learning.

Technical snapshot

Project
Fake News Detection System Using Django and Machine Learning
Stack
MACHINE-LEARNING
Includes
Code, DB, README
License
Academic submission
Secure CCAvenue payment · Instant download · Need help? WhatsApp us

Admin Features

Modules and controls available to administrators

  • Staff dashboard with cross-user visibility in this final year project
  • Staff overview with all users’ prediction data
  • Staff history view with all visible records
  • Staff reports with cross-user filters
  • Extra User column in staff tables
  • Filter reports by user ID
  • Staff can delete records visible in their queryset
  • Django admin access for superusers/staff
  • Manage all prediction results from Django admin
  • List prediction entries
  • Search prediction entries
  • Filter by user
  • Filter by input type
  • Filter by prediction
  • Filter by date
  • Add prediction result manually from admin
  • Change prediction result from admin
  • Delete prediction result from admin
  • Standard Django superuser support
  • Create superuser using command line
  • Management command for model training
  • Management command for seed data
  • Standard Django migrate command support

User Features

What end users can do in this application

  • User registration in this final year project
  • User login and logout
  • Email-based password reset
  • Auto login after registration
  • Public landing page
  • Detection form for logged-in users
  • Paste news text for detection
  • Submit article URL for detection
  • Optional country field
  • Optional India state field
  • Optional news category field
  • Text input validation
  • URL article fetching
  • HTML extraction using BeautifulSoup
  • URL authenticity heuristic support
  • Country hint inference from URL
  • Fake/Real prediction display
  • Confidence score display
  • Hybrid ensemble probability display
  • Logistic Regression probability display
  • Random Forest probability display
  • Cleaned-text preview
  • URL authenticity information display
  • Store each prediction in database
  • User dashboard overview
  • View total detections
  • View fake vs real breakdown
  • View model trained/not trained status
  • View latest prediction records
  • View own prediction history
  • Search history by text, URL, prediction, country, state, and category
  • Delete own prediction records
  • Dashboard reports with charts
  • Filter reports by date
  • Filter reports by country
  • Filter reports by category
  • Filter reports by prediction
  • Filter reports by input type
  • View label distribution chart
  • View detections over time
  • View category/country breakdown where data exists
  • Access About page
  • Access Contact page
  • Health check endpoint support

Other Features

Additional capabilities included in the project

Machine Learning Features in this Final Year Project

  • Fake news classification using machine learning
  • Hybrid ML prediction pipeline
  • TF-IDF vectorization
  • Logistic Regression model
  • Random Forest model
  • Probability averaging ensemble
  • Fake threshold set at averaged fake probability ≥ 0.4
  • Stores per-model probabilities
  • Stores hybrid probability
  • Trains from labelled CSV dataset
  • Supports Kaggle-style text + label dataset
  • Text preprocessing using NLTK
  • Stopword removal with negation words retained
  • WordNet lemmatization
  • Train/test split support
  • Accuracy score calculation
  • Confusion matrix generation
  • Classification report generation
  • Model artifacts saved using joblib
  • Saved vectorizer:

    
     
    ml_artifacts/tfidf.joblib
  • Saved Logistic Regression model:

    
     
    ml_artifacts/logreg.joblib
  • Saved Random Forest model:

    
     
    ml_artifacts/rf.joblib
  • Saved metadata:

    
     
    ml_artifacts/meta.json

URL Detection Features in this Final Year Project

  • Article URL input support
  • Fetches HTML using requests
  • Extracts article text using BeautifulSoup
  • Uses lxml parser support
  • Validates extracted article length
  • Supports fallback by pasting text when URL extraction fails
  • URL authenticity heuristic support
  • URL country hint support
  • Stores URL-based prediction records
  • Displays URL authenticity details when available

Dashboard and Report Features in this Final Year Project

  • User dashboard overview
  • Detection totals
  • Fake vs Real distribution
  • Latest detection records
  • Model training status indicator
  • Detection history table
  • Search and filter history
  • Delete own detections
  • Report dashboard with charts
  • Label distribution chart
  • Detection trend over time
  • Country-wise breakdown where data exists
  • Category-wise breakdown where data exists
  • Input type based filtering
  • Prediction based filtering
  • Date range filtering
  • Staff-level report visibility
  • Matplotlib and Seaborn chart generation

Other Features in this Final Year Project

  • Complete fake news detection source code
  • Suitable for final year project, major project, and minor project
  • Project report content can be prepared from included modules
  • Django web application
  • User authentication system
  • Django admin support
  • Staff dashboard support
  • Text-based fake news detection
  • URL-based fake news detection
  • NLP preprocessing
  • Hybrid machine learning ensemble
  • Prediction history storage
  • Dashboard analytics
  • Reports and visual charts
  • Password reset email support
  • Email fallback folder support
  • Environment configuration using .env
  • Health check endpoint
  • Management commands included
  • Dataset training command included
  • Seed data command included
  • No default admin shipped in repository
  • Useful for viva, source code review, project report writing, and project demonstration

How to Run

Step-by-step setup on your laptop or PC

  • Open terminal in the project root folder containing:

    
     
    manage.py
  • Create virtual environment:

    
     
    python -m venv .venv
  • Activate virtual environment on Windows:

    
     
    .venv\Scripts\activate
  • Activate virtual environment on Linux/macOS:

    
     
    source .venv/bin/activate
  • Install dependencies:

    
     
    pip install -r requirements.txt
  • Optional: copy environment file:

    
     
    .env.example
  • Rename or copy it as:

    
     
    .env
  • Run database migrations:

    
     
    python manage.py migrate
  • Place labelled dataset at:

    
     
    data/news.csv
  • For quick demo training, run:
  • 
     
    python manage.py train_model --csv data/sample_news.csv
  • For full training, run:
  • 
     
    python manage.py train_model
  • Optional: insert demo rows:
  • 
     
    python manage.py seed_data
  • Optional: attach demo rows to a specific registered user:
  • 
     
    python manage.py seed_data --user YOUR_USERNAME
  • Create Django admin account:
  • 
     
    python manage.py createsuperuser
  • Start development server:
  • 
     
    python manage.py runserver
  • Open landing page:
  • 
     
    http://127.0.0.1:8000/
  • Open register page:
  • 
     
    http://127.0.0.1:8000/register/
  • Open login page:
  • 
     
    http://127.0.0.1:8000/login/
  • Open dashboard:
  • 
     
    http://127.0.0.1:8000/dashboard/
  • Open Django admin:
  • 
     
    http://127.0.0.1:8000/admin

Login Credentials

Default demo accounts for testing after setup

This repository does not include default usernames or passwords.

Django Admin / Superuser:
Create locally using:


 
python manage.py createsuperuser

Then login at:


 
http://127.0.0.1:8000/admin/

Normal App User:
Register from:


 
http://127.0.0.1:8000/register/

Password Reset:
Configure SMTP or file-based email backend using .env.example. Real email secrets should not be committed.

License

Usage terms for academic and personal projects

Related Tags

Search terms and categories for this source code

Fake News Detection System Using Django and Machine Learning Source Code Final Year MACHINE-LEARNING Project Ready-to-Run Code With Database File Plagiarism-Free Faculty Approved final year project major project minor project source code project report fake news detection fake news detection system fake news detection using Django and machine learning Django fake news detection machine learning final year project NLP project TF-IDF project Logistic Regression project Random Forest project fake news classifier source code Django ML project news classification system