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.
-
User Registration and Login
Users can register in the system and, after logging into their accounts, access news categories. -
News Categorization
News is categorized into the following:- Economics
- Politics
- Health
- Sports
- Technology
Users can select their preferred categories and view the related news.
-
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. -
Edit and Delete News
Users can edit or delete existing news. Additionally, they can add new news items with custom titles and content. -
View Count System (ViewCounter)
Each time a user views a news item, its view count is automatically incremented.
- 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.
-
Clone the Repository
git clone https://github.com/Warm-Hearted-Snowman/News-Management-System-Python cd News-Management-System-Python -
Run the Local Server To run the local server and view the project:
python manage.py runserver
-
Access the Project Open your browser and go to:
http://127.0.0.1:8000For demo usage you can use root/root user.
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.
-
Login and Registration Page
Users can log in or create a new account on this page. -
Category Selection Page
After logging in, users can select their preferred categories. -
News Viewing Page
News is displayed based on selected categories and sorted by view count. -
News Editing Page
Users can add new news items or edit/delete existing ones.
-
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.
این پروژه یک سیستم مدیریت اخبار ساده و کاربردی است که به کاربران اجازه میدهد اخبار را در دستهبندیهای مختلف مشاهده، جستجو، ویرایش و حذف کنند. همچنین، سیستم قابلیت نمایش تعداد بازدید هر خبر را نیز دارد.
-
ثبتنام و ورود کاربران
کاربران میتوانند در سیستم ثبتنام کنند و پس از ورود به حساب کاربری خود، به دستهبندیهای خبری دسترسی پیدا کنند. -
دستهبندی اخبار
اخبار در دستههای زیر تقسیمبندی شدهاند:- اقتصاد (Economics)
- سیاست (Politics)
- سلامت (Health)
- ورزش (Sports)
- فناوری (Technology)
کاربران میتوانند بر اساس علاقهمندی خود، دستههای موردنظر را انتخاب کرده و اخبار مربوطه را مشاهده کنند.
-
مشاهده و مرتبسازی اخبار بر اساس تعداد بازدید
اخبار هر دسته به ترتیب تعداد بازدید نمایش داده میشوند. همچنین، امکان مرتبسازی بر اساس پارامترهای دیگر نیز وجود دارد. -
ویرایش و حذف اخبار
کاربران میتوانند اخبار موجود را ویرایش کرده یا آنها را حذف کنند. علاوه بر این، امکان افزودن خبر جدید با عنوان و متن دلخواه نیز فراهم شده است. -
سیستم شمارش تعداد بازدید (ViewCounter)
هر بار که یک کاربر خبر را مشاهده میکند، تعداد بازدید آن خبر به صورت خودکار افزایش مییابد.
- Django: برای پیادهسازی بخش بکاند و مدیریت پایگاه داده.
- HTML و CSS: برای طراحی صفحات وب زیبا و واکنشگرا.
- JavaScript: برای ایجاد تعاملات پویا در صفحات.
- SQLite: برای ذخیرهسازی دادهها در پایگاه داده.
-
کلون کردن مخزن پروژه
git clone https://github.com/Warm-Hearted-Snowman/News-Management-System-Python cd News-Management-System-Python -
اجرای سرور محلی برای اجرای سرور محلی و مشاهده پروژه:
python manage.py runserver
-
دسترسی به پروژه مرورگر خود را باز کرده و به آدرس زیر بروید:
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: تعداد دفعات مشاهده خبر.
-
صفحه ورود و ثبتنام
کاربران میتوانند در این صفحه وارد سیستم شوند یا حساب کاربری جدید ایجاد کنند. -
صفحه انتخاب دستهبندیها
پس از ورود، کاربران میتوانند دستهبندیهای مورد علاقه خود را انتخاب کنند. -
صفحه مشاهده اخبار
اخبار بر اساس دستهبندیهای انتخاب شده و تعداد بازدید مرتبسازی شدهاند. -
صفحه ویرایش اخبار
کاربران میتوانند اخبار جدید اضافه کنند یا اخبار موجود را ویرایش یا حذف کنند.
-
بروزرسانی خودکار
وضعیت اخبار نمایش داده شده در بازههای زمانی کوتاه (مثلاً هر ۳ ثانیه) بروزرسانی میشود. این شامل تغییرات در عنوان، متن، دستهبندی و تعداد بازدید میشود. -
تکنولوژیهای دلخواه
دانشجویان میتوانند از تکنولوژیهای دلخواه برای پیادهسازی هر قسمت استفاده کنند. -
امتیاز اضافی
پیادهسازی قابلیتهای بیشتر، گرافیک زیبا و شخصیسازیهای افزون بر موارد ذکر شده میتواند نمره اضافی برای دانشجو به همراه داشته باشد.


