Skip to content

Guiding-King/News-Management-System-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News Management Project with Categorization and View Count

This project is a simple and functional news management system that allows users to view, search, edit, and delete news in various categories. The system also includes a feature to display the view count of each news item.


Portal Screenshots

image


image


image


Main Features

  1. User Registration and Login
    Users can register in the system and, after logging into their accounts, access news categories.

  2. News Categorization
    News is categorized into the following:

    • Economics
    • Politics
    • Health
    • Sports
    • Technology

    Users can select their preferred categories and view the related news.

  3. View and Sort News by View Count
    News in each category is displayed in order of view count. Additionally, sorting by other parameters is also possible.

  4. Edit and Delete News
    Users can edit or delete existing news. Additionally, they can add new news items with custom titles and content.

  5. View Count System (ViewCounter)
    Each time a user views a news item, its view count is automatically incremented.


Technologies Used

  • Django: For backend implementation and database management.
  • HTML and CSS: For designing beautiful and responsive web pages.
  • JavaScript: For creating dynamic interactions on the pages.
  • SQLite: For storing data in the database.

How to Run the Project

  1. Clone the Repository

    git clone https://github.com/Warm-Hearted-Snowman/News-Management-System-Python
    cd News-Management-System-Python
  2. Run the Local Server To run the local server and view the project:

    python manage.py runserver
  3. Access the Project Open your browser and go to:

    http://127.0.0.1:8000
    

    For demo usage you can use root/root user.


Database Description

The database for this project includes a table named News where each record is defined as follows:

NewsID NewsTitle NewsBody NewsClass ViewController
1 Microsoft unveils new Xbox Microsoft hasn’t disclosed a price for the new device, an important detail gamers will no doubt be looking for as they come to decide which new model to get their hands on. Technology 74
  • NewsID: A unique identifier for each news item.
  • NewsTitle: The title of the news.
  • NewsBody: The main content of the news.
  • NewsClass: The category of the news (Economics, Politics, Health, Sports, Technology).
  • ViewController: The number of times the news has been viewed.

Main Pages of the Project

  1. Login and Registration Page
    Users can log in or create a new account on this page.

  2. Category Selection Page
    After logging in, users can select their preferred categories.

  3. News Viewing Page
    News is displayed based on selected categories and sorted by view count.

  4. News Editing Page
    Users can add new news items or edit/delete existing ones.


Technical Notes

  • Automatic Updates
    The displayed news status is updated at short intervals (e.g., every 3 seconds). This includes changes to the title, content, category, and view count.

  • Optional Technologies
    Students can use any technologies they prefer for implementing each part.

  • Extra Credit
    Implementing additional features, beautiful graphics, and customizations beyond the mentioned requirements can earn extra credit for the student.


پروژه مدیریت اخبار با دسته‌بندی و نمایش تعداد بازدید

این پروژه یک سیستم مدیریت اخبار ساده و کاربردی است که به کاربران اجازه می‌دهد اخبار را در دسته‌بندی‌های مختلف مشاهده، جستجو، ویرایش و حذف کنند. همچنین، سیستم قابلیت نمایش تعداد بازدید هر خبر را نیز دارد.


ویژگی‌های اصلی پروژه

  1. ثبت‌نام و ورود کاربران
    کاربران می‌توانند در سیستم ثبت‌نام کنند و پس از ورود به حساب کاربری خود، به دسته‌بندی‌های خبری دسترسی پیدا کنند.

  2. دسته‌بندی اخبار
    اخبار در دسته‌های زیر تقسیم‌بندی شده‌اند:

    • اقتصاد (Economics)
    • سیاست (Politics)
    • سلامت (Health)
    • ورزش (Sports)
    • فناوری (Technology)

    کاربران می‌توانند بر اساس علاقه‌مندی خود، دسته‌های موردنظر را انتخاب کرده و اخبار مربوطه را مشاهده کنند.

  3. مشاهده و مرتب‌سازی اخبار بر اساس تعداد بازدید
    اخبار هر دسته به ترتیب تعداد بازدید نمایش داده می‌شوند. همچنین، امکان مرتب‌سازی بر اساس پارامترهای دیگر نیز وجود دارد.

  4. ویرایش و حذف اخبار
    کاربران می‌توانند اخبار موجود را ویرایش کرده یا آن‌ها را حذف کنند. علاوه بر این، امکان افزودن خبر جدید با عنوان و متن دلخواه نیز فراهم شده است.

  5. سیستم شمارش تعداد بازدید (ViewCounter)
    هر بار که یک کاربر خبر را مشاهده می‌کند، تعداد بازدید آن خبر به صورت خودکار افزایش می‌یابد.


تکنولوژی‌های مورد استفاده

  • Django: برای پیاده‌سازی بخش بک‌اند و مدیریت پایگاه داده.
  • HTML و CSS: برای طراحی صفحات وب زیبا و واکنش‌گرا.
  • JavaScript: برای ایجاد تعاملات پویا در صفحات.
  • SQLite: برای ذخیره‌سازی داده‌ها در پایگاه داده.

نحوه اجرای پروژه

  1. کلون کردن مخزن پروژه

    git clone https://github.com/Warm-Hearted-Snowman/News-Management-System-Python
    cd News-Management-System-Python
  2. اجرای سرور محلی برای اجرای سرور محلی و مشاهده پروژه:

    python manage.py runserver
  3. دسترسی به پروژه مرورگر خود را باز کرده و به آدرس زیر بروید:

    http://127.0.0.1:8000
    

    برای استفاده اولیه میتوان از یوزر root/root استفاده کنید.


توضیحات پایگاه داده

پایگاه داده این پروژه شامل یک جدول به نام News است که هر رکورد در آن به صورت زیر تعریف می‌شود:

NewsID NewsTitle NewsBody NewsClass ViewController
1 Microsoft unveils new Xbox Microsoft hasn’t disclosed a price for the new device, an important detail gamers will no doubt be looking for as they come to decide which new model to get their hands on. Technology 74
  • NewsID: یک شناسه یکتا برای هر خبر.
  • NewsTitle: عنوان خبر.
  • NewsBody: متن اصلی خبر.
  • NewsClass: دسته‌بندی خبر (اقتصاد، سیاست، سلامت، ورزش، فناوری).
  • ViewController: تعداد دفعات مشاهده خبر.

صفحات اصلی پروژه

  1. صفحه ورود و ثبت‌نام
    کاربران می‌توانند در این صفحه وارد سیستم شوند یا حساب کاربری جدید ایجاد کنند.

  2. صفحه انتخاب دسته‌بندی‌ها
    پس از ورود، کاربران می‌توانند دسته‌بندی‌های مورد علاقه خود را انتخاب کنند.

  3. صفحه مشاهده اخبار
    اخبار بر اساس دسته‌بندی‌های انتخاب شده و تعداد بازدید مرتب‌سازی شده‌اند.

  4. صفحه ویرایش اخبار
    کاربران می‌توانند اخبار جدید اضافه کنند یا اخبار موجود را ویرایش یا حذف کنند.


نکات فنی

  • بروزرسانی خودکار
    وضعیت اخبار نمایش داده شده در بازه‌های زمانی کوتاه (مثلاً هر ۳ ثانیه) بروزرسانی می‌شود. این شامل تغییرات در عنوان، متن، دسته‌بندی و تعداد بازدید می‌شود.

  • تکنولوژی‌های دلخواه
    دانشجویان می‌توانند از تکنولوژی‌های دلخواه برای پیاده‌سازی هر قسمت استفاده کنند.

  • امتیاز اضافی
    پیاده‌سازی قابلیت‌های بیشتر، گرافیک زیبا و شخصی‌سازی‌های افزون بر موارد ذکر شده می‌تواند نمره اضافی برای دانشجو به همراه داشته باشد.


About

A Django-based news management system for viewing, editing, and categorizing news. Features user authentication, view count tracking, and sorting by categories like Economics, Politics, Health, Sports, and Technology. Ideal for learning web development with Django.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors