Welcome to my Django Blog project! This is a simple blog application that I've built to practice and showcase my Django skills. It allows users to view blog posts, and I've included some basic styling and structure.
Follow the instructions below to set up and run this project on your local machine.
Make sure you have the following installed on your system:
- Python 3.10 or higher
- Django 5.1
- A virtual environment tool (optional but recommended)
-
Clone the Repository
First, clone this repository to your local machine:
git clone https://github.com/risav-pyakurel/django-blog.git
cd django-blog
-
Set Up the Virtual Environment
I recommend using a virtual environment to manage dependencies. Set it up using the following commands:
python3 -m venv my_env
source my_env/bin/activate
# On Windows, usemy_env\Scripts\activate
-
Apply Migrations
To set up the database, run the following commands:
python manage.py migrate
-
Run the Development Server
Start the Django development server:
python manage.py runserver
Now, you can visit the blog at
http://127.0.0.1:8000/
.
Here's a brief overview of the project's structure:
- blog/: This directory contains the Django app for the blog.
- templates/: This directory holds the HTML templates for the blog.
- static/: This directory contains static files like CSS.
- mysite/: This directory includes the settings, URLs, and other configurations for the Django project.
To view the blog posts, simply navigate to http://127.0.0.1:8000/blog/
in your web browser. I've designed the blog with a basic layout and structure to make it easy to read and navigate.
I used the following resources to help build this project:
- Django Documentation: The official Django documentation is an excellent resource for learning and reference.
- **Django 5 By Example by Antonio Melé **: This book was a significant reference for me while working on this project. It provides a step-by-step guide to building Django applications and was particularly helpful in getting this blog up and running.
There are several features and improvements I'd like to add to this blog in the future:
- User authentication to allow users to create, edit, and delete their own posts.
- Pagination for the blog posts.
- Adding categories and tags to organize posts better.
- Implementing comments so readers can engage with the content.
Thanks for checking out my Django Blog project! If you have any questions or suggestions, feel free to reach out. I hope you find this project helpful or at least a good starting point for your own Django adventures.