Welcome to the Django Blog Website repository! This project is a simple yet feature-rich blog platform built using Django, a powerful Python web framework. It allows users to create, read, update, and delete blog posts, manage user authentication, and interact with an intuitive user interface.
-
User Authentication:
- Registration, Login, Logout
- Password reset functionality
-
Blog Posts Management:
- Create, Read, Update, and Delete (CRUD) operations
- List and detail views for blog posts
-
Rich Text Editing:
- Enhanced post creation with a WYSIWYG editor
-
Responsive Design:
- Fully functional on desktops, tablets, and mobile devices
-
Commenting System (Optional):
- Allow users to comment on blog posts
- Python 3.8+
- Django 4.0+
- PostgreSQL (optional, can use SQLite for development)
- Virtualenv or pipenv (recommended for dependency management)
-
Clone the repository:
git clone https://github.com/your-username/django-blog.git cd django-blog
-
Create and activate a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up the database:
-
For SQLite (default):
python manage.py migrate
-
For PostgreSQL (optional): Configure the database settings in
settings.py
, then:python manage.py migrate
-
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
Visit
http://127.0.0.1:8000/
in your browser.
Create a .env
file in the project root to configure sensitive settings:
SECRET_KEY=your-secret-key
DEBUG=True
DATABASE_URL=your-database-url
Collect static files for production use:
python manage.py collectstatic
- Navigate to the homepage to view the list of blog posts.
- Log in to create, edit, or delete posts (admin or authenticated users).
- Explore the admin panel at
/admin
to manage the website.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add a new feature'
). - Push to the branch (
git push origin feature-name
). - Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Django Documentation: https://docs.djangoproject.com/
- Tailwindcss: https://tailwindcss.com/
- Any additional libraries or inspirations you used for the project.
Feel free to suggest improvements or report issues. Happy coding!