A full-featured, multi-language news & blog web application built with Django 5.2 and Python 3.13. Users can browse categorized news, read articles, comment, and manage content β all in Uzbek, Russian, and English.
- News Feed β Latest published articles displayed on the homepage, sorted by publish time
- Category Filtering β Filter news by categories: Mahalliy (Local), Xorij (Foreign), Sport, Texnalogiya (Technology)
- Article Detail Page β Full article view with hit/view counter powered by
django-hitcount - Comment System β Authenticated users can post comments on articles
- Search β Full-text search across article titles and body content using Django
Qobjects - User Authentication β Register, login, logout with Django's built-in auth system
- User Profile β Profile page with photo upload and date of birth
- Profile Editing β Users can update their personal info and profile picture
- CRUD for News β Create, edit, and delete articles (permission-protected)
- Admin Panel β Superuser-only admin page listing all admin accounts
- Multi-language Support β Full i18n with Uzbek (default), Russian, and English via
django-modeltranslationandi18n_patterns - Contact Form β Users can send messages through a contact page
- Password Management β Change password, reset password via email flow
- Draft / Published Status β Articles have Draft/Published states; only published articles are visible publicly
- Custom Manager β
PublishedManagerfilters only published news across all queries - Custom Permissions β
OnlyLoggedUserMixinrestricts CRUD views to authenticated users - Context Processor β Latest news injected globally into all templates
- Responsive Design β Bootstrap-based frontend with jQuery, Slick slider, WOW.js animations, and FancyBox
| Layer | Technology |
|---|---|
| Language | Python 3.13 |
| Framework | Django 5.2 |
| Database | SQLite3 (dev) |
| ORM | Django ORM |
| Auth | Django Built-in Auth |
| Image Handling | Pillow |
| Hit Counter | django-hitcount |
| Multi-language | django-modeltranslation, Django i18n |
| Frontend | HTML5, CSS3, Bootstrap, jQuery |
| JS Libraries | Slick.js, WOW.js, FancyBox, jQuery NewsTicker |
| Package Manager | Pipenv |
| IDE Config | PyCharm (.idea) |
Blog_project/
βββ config/ # Project settings & root URL config
β βββ settings.py
β βββ urls.py # i18n_patterns + app routing
β βββ wsgi.py
β
βββ news_app/ # Core news application
β βββ models.py # News, Category, Comment, Contact models
β βββ views.py # Function & class-based views
β βββ urls.py # News URL patterns
β βββ forms.py # ContactForm, CommentForm
β βββ admin.py # Admin registrations
β βββ translation.py # modeltranslation field declarations
β βββ context_processor.py # Global latest news context
β βββ custom_permissions.py
β
βββ accounts/ # User auth & profile app
β βββ models.py # Profile model (OneToOne with User)
β βββ views.py # Login, register, profile, edit views
β βββ forms.py # LoginForm, RegisterForm, EditForms
β βββ urls.py
β
βββ templates/ # All HTML templates
β βββ news/ # Home, detail, category, search pages
β βββ account/ # Register, profile edit pages
β βββ registration/ # Login, logout, password reset pages
β βββ crud/ # Create, edit, delete news pages
β βββ pages/ # User profile, admin page
β
βββ static/ # CSS, JS, fonts, images
βββ media/ # Uploaded news images & user photos
βββ manage.py
βββ Pipfile
git clone https://github.com/aziz-200/Blog_project.git
cd Blog_projectpip install pipenv
pipenv install
pipenv shellpython manage.py migratepython manage.py createsuperuserpython manage.py runserverVisit http://127.0.0.1:8000/ in your browser.
The app supports 3 languages: Uzbek (uz β default), Russian (ru), and English (en).
Language switching is handled via Django's i18n_patterns and the /i18n/ URL endpoint. Article titles and bodies have translated fields managed by django-modeltranslation.
django==5.2
pillow
django-hitcount
django-modeltranslation
python==3.13
Install all with:
pipenv install- Public users can browse and read news
- Only logged-in users can post comments or access CRUD views
- Only superusers can access the admin page (
/adminpage/) - Password reset is handled via console email backend (configure SMTP for production)
| URL | View | Description |
|---|---|---|
/ |
HomePageView |
Homepage with latest news |
/news/ |
news_list |
All published news |
/news/<slug>/ |
news_detail |
Single article + comments |
/news/<slug>/edit/ |
NewsUpdateView |
Edit article (auth required) |
/news/<slug>/delete/ |
NewsDeleteView |
Delete article (auth required) |
/new/create/ |
NewsCreateView |
Create article (auth required) |
/mahalliy/ |
LocalNewsView |
Local news category |
/xorij/ |
XorijNewsView |
Foreign news category |
/sport/ |
SportNewsView |
Sports news category |
/texnalogiya/ |
TechnologyNewsView |
Technology news category |
/searchResult/?q= |
SearchResultsListView |
Search results |
/contact-us/ |
ContactPageView |
Contact form |
/account/ |
accounts app | Register, login, profile, edit |
/adminpage/ |
admin_page_view |
Superuser admin page |
title,slug,body,image,category,publish_time,status(Draft/Published)- Custom
PublishedManagerto filter only published articles - Translated fields:
title_uz,title_ru,body_uz,body_ru
nameβ e.g. Mahalliy, Xorij, Sport, Texnalogiya
- Linked to
NewsandUservia ForeignKey body,created_time,activeflag
- OneToOne with Django
User photo,date_of_birth
name,email,message
This project is licensed under the terms in the LICENSE file.
Aziz β github.com/aziz-200