English | فارسی
This project is a simple yet powerful blog built using the Django framework. The goal is to provide a platform for creating, editing, and displaying articles using Django best practices. This README includes complete steps for installation, setup, usage, testing, and development.
Ensure your system has:
- Python 3.6 or higher
- pip (Python package manager)
- (Optional) virtualenv for isolated environments
Clone the source code from GitHub:
git clone https://github.com/YourUsername/YourProjectName.git
cd YourProjectName
python -m venv venv
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- Linux/Mac:
source venv/bin/activate
Install packages from requirements.txt
:
pip install -r requirements.txt
Set up the database:
python manage.py migrate
python manage.py createsuperuser
Follow the prompts to set up a username, email, and password.
python manage.py runserver
Visit http://127.0.0.1:8000 in your browser.
- mysite/ # Main project folder
- settings.py # Project settings
- urls.py # Main URL configurations
- blog/ # Blog app
- admin.py # Admin panel registration
- models.py # Database models (articles, categories)
- templates/ # HTML templates
- static/ # CSS, JS, images
- migrations/ # Database migration files
- db.sqlite3 # Default SQLite database (development)
- manage.py # Django management tool
Visit http://127.0.0.1:8000 to see the blog.
- Go to http://127.0.0.1:8000/admin.
- Log in with your superuser credentials.
- Use the admin panel to manage articles.
- Public pages display articles and their details.
After modifying models:
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
Modify mysite/settings.py
for database, email, etc.
MIT License
- Created with ❤️ by Sorna
- Email: [email protected]
این پروژه یک وبلاگ ساده و قدرتمند با استفاده از فریمورک Django است. هدف، ایجاد بستری برای تولید، ویرایش و نمایش مقالات با روشهای بهینه جنگو میباشد. این فایل شامل مراحل نصب، راهاندازی، استفاده، تست و توسعه پروژه است.
- پایتون 3.6 یا بالاتر
- pip (مدیر بستههای پایتون)
- (اختیاری) virtualenv برای محیطهای مجزا
git clone https://github.com/YourUsername/YourProjectName.git
cd YourProjectName
python -m venv venv
فعالسازی محیط:
- ویندوز:
venv\Scripts\activate
- لینوکس/مک:
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
به آدرس http://127.0.0.1:8000 مراجعه کنید.
- mysite/ # پوشه اصلی پروژه
- settings.py # تنظیمات پروژه
- urls.py # تنظیمات URL اصلی
- blog/ # اپلیکیشن وبلاگ
- admin.py # ثبت مدلها در پنل مدیریت
- models.py # مدلهای پایگاه داده (مقالات، دستهبندیها)
- templates/ # قالبهای HTML
- static/ # فایلهای استاتیک
- migrations/ # فایلهای مهاجرت
- db.sqlite3 # پایگاه داده پیشفرش SQLite
- manage.py # ابزار مدیریت جنگو
به آدرس http://127.0.0.1:8000 بروید.
- آدرس http://127.0.0.1:8000/admin.
- با حساب سوپر کاربر وارد شوید.
- از پنل مدیریت برای ایجاد یا ویرایش مقالات استفاده کنید.
- صفحات عمومی، مقالات را نمایش میدهند.
پس از تغییر مدلها:
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
ویرایش mysite/settings.py
برای پایگاه داده، ایمیل و غیره.
مجوز MIT
- ساخته شده با ❤️ توسط Sorna
- ایمیل: [email protected]