A Django-based blog application allowing users to create, view, edit, and delete blog posts. This application includes features such as commenting on posts and uploading images.
- Create, view, edit, and delete blog posts
- Optional commenting on blog posts
- Optional image uploads to blog posts
- Admin interface for managing posts
These instructions will help you set up the project on your local machine for development and testing purposes.
- Python 3.x
- Django 3.x
- Virtualenv (optional but recommended)
-
Clone the repository:
git clone https://github.com/yataknemogy/BlogApplicationPython.git cd blog -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application:
- Go to
http://127.0.0.1:8000to view the blog. - Go to
http://127.0.0.1:8000/adminto access the admin interface.
- Go to
- Log in to the admin interface at
http://127.0.0.1:8000/admin. - Click on "Posts" and then "Add Post".
- Fill in the title and content, then click "Save".
- Visit
http://127.0.0.1:8000to see a list of all blog posts. - Click on the post title to view the detailed post.
- Log in to the admin interface at
http://127.0.0.1:8000/admin. - Click on "Posts" and then on the post you want to edit or delete.
- Make changes and click "Save" or click "Delete" to remove the post.
- Uncomment and configure the code related to comments in the
blogapp. - Apply migrations and update admin settings to manage comments.
- Uncomment and configure the code related to image uploads in the
blogapp. - Install necessary dependencies (e.g., Pillow) and update settings for media files.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.