A modern, responsive blog platform built with Django, featuring a clean UI and admin functionality.
- Dual Content System
- Timely Comments: Quick updates and thoughts
- Long-form Blogs: Detailed articles with reading time estimates
- Admin Panel
- Secure login system
- Real-time comment posting
- Session management
- Responsive Design
- Mobile-friendly interface
- Modern UI with smooth animations
- Custom styling with CSS
blog_writer/
├── static/
│ └── post/
│ └── style.css # Main stylesheet with modern UI components
├── templates/
│ └── posts/
│ └── post_list.html # Main template with dual content system
├── models.py # Database models for Blog and Comment
├── views.py # View logic and admin functionality
└── urls.py # URL routing configuration
Blog: Long-form content with title, description, and reading timeComment: Timely updates with timestamp and content
post_list: Main view displaying both blogs and commentsadmin_login: Secure admin authenticationpost_comment: Admin-only comment postingcheck_auth: Session verification
- Modern, responsive design
- Tab-based content organization
- Dynamic admin panel
- Footer with contact information
- Custom color scheme with dark theme
- Smooth animations and transitions
- Mobile-responsive layout
- Interactive elements (hover effects, tabs)
- Install dependencies:
pip install -r requirements.txt- Run migrations:
python manage.py migrate- Create admin user:
python manage.py createsuperuser- Run development server:
python manage.py runserver- Build the development image:
docker build -t ryans-rice-hub-dev .- Run the development container:
docker run -p 8000:8000 -v $(pwd):/app ryans-rice-hub-dev- Build the production image:
docker build -t ryans-rice-hub-prod -f Dockerfile.prod .- Run with Docker Compose:
docker-compose up -dFROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN python manage.py collectstatic --noinput
EXPOSE 8000
CMD ["gunicorn", "myblog.wsgi:application", "--bind", "0.0.0.0:8000"]version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile.prod
ports:
- "8000:8000"
environment:
- DEBUG=0
- SECRET_KEY=your-secret-key
- ALLOWED_HOSTS=localhost,127.0.0.1
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/media
volumes:
static_volume:
media_volume:- Consistent Environment: Same development and production environments
- Easy Deployment: Simple commands to build and run
- Isolation: Dependencies and configurations are contained
- Scalability: Easy to scale with Docker Compose
- Version Control: Track environment changes with Dockerfiles
- Access the admin panel through the "Admin" button
- Requires staff privileges
- Secure session management
- Real-time comment posting capability
Feel free to submit issues and enhancement requests.
This project is licensed under the MIT License - see the LICENSE file for details.