Rishil Mittal 11232984 5G
Project – Blog Application
Project Overview: This Blog Application is a complete blogging site for the users where
users can add, edit and delete their blogs and share to everyone on the world. It contains all
the features of a Blog site like login/register into the system, CRUD operation like add blog
post with title, description and image and edit or delete the blog post.
1. Start a Django project using these commands in terminal -
# Create virtual environment (backend) -
mkdir blog_project
cd blog_project
python -m venv venv
venv\Scripts\activate # Windows
# Install backend dependencies -
pip install django djangorestframework django-cors-headers
#create app
python [Link] startapp posts
# Run Django server
python [Link] runserver
# (In new terminal) Run frontend –
mkdir blog_frontend
cd blog_frontend
npm install
npm run dev
2. Update [Link] Add REST installed apps and cors config:
Rishil Mittal 11232984 5G
3. blog_project/[Link] Link the app URLs:
4. posts/[Link] -
Rishil Mittal 11232984 5G
5. Create posts/[Link] -
6. posts/[Link]
7. posts/[Link]
8. Run Migrations and Test -
python [Link] makemigrations
python [Link] migrate
python [Link] runserver
9. Set Up React Frontend From root folder
cd ..
npm create vite@latest blog_frontend template react
cd blog_frontend
npm install axios
npm install
Rishil Mittal 11232984 5G
10. blog_frontend/src/services/[Link]
11. blog_frontend/src/components/[Link], [Link] and [Link]
Rishil Mittal 11232984 5G
12. blog_frontend/src/[Link]
13. Run Both Servers
In two terminals:
Terminal 1 (Backend):
cd PYTHONPROJECT/blog_project
venv\Scripts\activate
python [Link] runserver
Terminal 2 (Frontend):
cd PYTHONPROJECT/blog_frontend
npm run dev
Visit [Link]