This is a simple blog application built with Django. The project allows users to create, read, update, and delete blog posts. It also includes a structured system for managing blog titles and associating them with corresponding blog posts.
The Blogs project provides a platform where users can write and manage blog posts. Each post is associated with a blog title, making it easy to categorize and organize the content. The application leverages Django’s admin interface for managing posts and titles and uses Bootstrap for front-end styling.
- Create, Read, Update, and Delete (CRUD) functionality for blog posts.
- Separation of blog titles and content using a relational database model.
- Django's admin site for managing blog content.
- Bootstrap integration for responsive design and a clean user interface.
- BlogTitle: Represents the title of the blog and the date it was added.
- BlogPost: Contains the text of the blog post and a foreign key relationship to
BlogTitle
to ensure that each post is associated with a specific title.
- Django: The web framework used to build this project.
- Python: The programming language used for development.
- SQLite: The database used for data storage.
- Bootstrap 5: Front-end framework for styling.
- django-bootstrap5: For integrating Bootstrap with Django forms.
- Clone the repository:
git clone https://github.com/username/blogs-project.git
- Navigate to the project directory:
cd blogs-project
- Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Apply database migrations:
python manage.py migrate
- Run the server:
python manage.py runserver
- Access the app in your browser at http://127.0.0.1:8000/.
- To access the Django admin panel for managing blog posts and titles:
-
- Create a superuser:
python manage.py createsuperuser
- Create a superuser:
-
- Log in at http://127.0.0.1:8000/admin/.
```bash
blogs/
├── blogs/ # Project configuration files
├── blog/ # Blog app where models, views, and templates are located
├── templates/ # HTML templates for the project
├── static/ # Static files such as CSS and JS
├── manage.py # Django's command-line utility for administrative tasks
Home Page.
User authenticattion Page.
Blogs Page.
Blogpost Page.
- Implement a rich text editor for formatting blog posts.
- Add tags and categories to improve post organization.
- Enable pagination for better handling of large number of posts.
- This project is under the Apache Licence - see the LICENSE file for details.
- For any questions or suggestions, feel free to reach out to me:
- Email: [email protected]
- GitHub: Njoro90260
Feel free to adjust any specific details, like the repository URL, or add more features as needed. Let me know if you need further customization!