News Portal — Dynamic News Platform

Overview

Problem: Many news platforms lack real-time notifications, subscription-based updates, and efficient content management, resulting in disconnected user experiences.

Solution: News Portal — a Django-based news platform with category subscriptions, instant email notifications, and weekly digests powered by Celery and Redis.

Technologies: Python, Django 4.2, Celery, Redis, django-allauth, Bootstrap.

Result: Increased user engagement, timely delivery of news, and simplified content management.

Key Features
  • User registration (email) and optional Yandex OAuth.
  • Authors can create/edit/delete articles (news/posts) with rich text.
  • Category subscriptions with instant email notifications.
  • Weekly digests (Monday 08:00) via Celery Beat.
  • User groups: Basic (read), Premium (up to 5 posts/day), Authors (full CRUD).
  • Caching (low-level, per-page, template fragments) and structured logging.
  • Security: CSRF/XSS mitigation, safe ORM queries.
News Portal home
Home page
Articles list
Articles list & filters
Article details
Article details & subscribe
User profile
User profile & groups
Run Locally
  1. Clone the repository:
    git clone https://github.com/Rostislav62/NewsPortal-Var1.git NewsPortal
    cd NewsPortal
  2. Create virtual environment & install dependencies:
    python3.10 -m venv .venv
    source .venv/bin/activate
    python -m pip install --upgrade pip
    pip install -r requirements.txt
  3. Create .env:
    SECRET_KEY=<strong-secret>
    DEBUG=True
    ALLOWED_HOSTS=127.0.0.1,localhost
    EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
    CELERY_BROKER_URL=redis://127.0.0.1:6379/0
    CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/1
  4. Run migrations & create superuser:
    python manage.py makemigrations
    python manage.py migrate
    python manage.py createsuperuser
  5. (Optional) Start Redis & Celery:
    sudo apt install -y redis-server
    sudo systemctl enable --now redis-server
    celery -A NewsPortal worker -l info
    celery -A NewsPortal beat -l info
  6. Run server:
    python manage.py runserver
Demo Video