A web-based application where users can upload multiple images and generate visually aligned collage layouts. The platform allows users to preview and save their image sets in an organized manner with complete user authentication.
- User Authentication: Complete registration, login, logout system
- Models:
Collage: Stores collage information with title, creation date, template ID, and frame styleImageItem: Stores individual images linked to collages with positioning data and order
- Views: Full CRUD operations for collages with user-specific access
- Forms: Multi-image upload with validation (max 10 images per collage)
- Media Handling: Proper image storage and serving
- Aesthetic UI: Modern Bootstrap-based design with custom styling
- Upload Interface: Clean form with drag-and-drop image preview
- Multiple Template Types: Various collage templates (template_2_1, etc.)
- Frame Styles: Modern, Classic, Minimal, and Vintage frame options
- Image Positioning: Flexible positioning with coordinates and dimensions
- Responsive Design: Works on desktop, tablet, and mobile devices
- Export Functionality: Download collages as PNG images using HTML2Canvas
- User-specific Access: Users can only see and edit their own collages
- Flexible Positioning: Images can be arranged in any direction/orientation
- Drag & Drop: Real-time image repositioning in freeform mode
- Search & Pagination: Find collages easily with search and pagination
- AJAX Updates: Seamless position updates without page refresh
- Python 3.8+ installed
- pip package manager
- Git (optional, for cloning)
-
Navigate to the project directory:
cd collage_editor_platform -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Run database migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser (optional):
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application:
- Open your browser and go to:
http://127.0.0.1:8000/ - Admin panel:
http://127.0.0.1:8000/admin/
- Open your browser and go to:
- Register: Create a new account or log in with existing credentials
- Create Collage: Click "Create New" to start a new collage
- Upload Images: Select multiple images from your device
- Choose Template: Select from available collage templates
- Choose Frame Style: Pick from Modern, Classic, Minimal, or Vintage styles
- Save & View: Save your collage and view the details
- Various pre-designed collage templates
- Customizable layout arrangements
- Template-based positioning system
- Modern: Clean, contemporary styling
- Classic: Traditional, elegant borders
- Minimal: Simple, understated design
- Vintage: Retro, nostalgic appearance
- Secure registration and login
- Password management
- User profile with statistics
- Session management
- Create, read, and delete collages
- Search functionality for finding collages
- Pagination for large collections
- User-specific access control
- Support for JPEG, PNG, GIF, WebP formats
- Automatic image optimization
- Responsive image display
- Secure file upload validation
- Detailed collage view with all images
- Responsive image display
- Clean, organized layout
collage_editor_platform/
├── collage_platform/ # Main Django project
│ ├── settings.py # Django settings
│ ├── urls.py # URL configuration
│ └── wsgi.py # WSGI configuration
├── collages/ # Collages app
│ ├── models.py # Database models
│ ├── views.py # View functions
│ ├── forms.py # Form definitions
│ ├── urls.py # App URLs
│ └── admin.py # Admin interface
├── accounts/ # User authentication app
│ ├── views.py # Authentication views
│ └── urls.py # Authentication URLs
├── templates/ # HTML templates
│ ├── base.html # Base template
│ ├── collages/ # Collage templates
│ ├── accounts/ # Account templates
│ └── registration/ # Auth templates
├── static/ # Static files
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── media/ # User uploads
│ └── collages/ # Uploaded images
├── requirements.txt # Python dependencies
└── README.md # This file
- Framework: Django 4.2.13
- Database: SQLite (development) - easily changeable for production
- Image Processing: Pillow for image handling
- Authentication: Django's built-in authentication system
- CSS Framework: Bootstrap 5.3.0
- Icons: Bootstrap Icons
- JavaScript: Vanilla JS with jQuery
- Image Export: HTML2Canvas library
- Responsive Design: Mobile-first approach
- CSRF protection on all forms
- User-specific data access
- File upload validation
- Secure media file handling
- Session-based authentication
id: Primary keytitle: Collage title (max 255 chars)user: Foreign key to User modelcreated_at: Auto-generated timestamptemplate_id: Template identifier (default: 'template_2_1')frame_style: Frame style choice (modern/classic/minimal/vintage)
id: Primary keycollage: Foreign key to Collageimage: Image file fieldcaption: Optional image captionorder: Display orderx_position,y_position: Freeform positioningwidth,height: Custom dimensions
/accounts/register/- User registration/accounts/login/- User login/accounts/logout/- User logout/accounts/profile/- User profile
/- Home page/collages/- List all user collages/collages/create/- Create new collage/collages/<id>/- View collage detail/collages/<id>/delete/- Delete collage
- Update
template_idoptions orframe_stylechoices inmodels.py - Add corresponding CSS in
static/css/style.css - Update template logic in
detail.html - Add form options in
forms.py
- Modify
static/css/style.cssfor visual changes - Update Bootstrap variables for theme changes
- Add custom JavaScript in template blocks
- Add image filters and effects
- Implement collaborative collages
- Add social sharing features
- Include image annotation tools
-
Images not displaying:
- Check MEDIA_URL and MEDIA_ROOT settings
- Ensure media files are served correctly
- Verify file permissions
-
Upload errors:
- Check file size limits
- Verify supported file formats
- Ensure proper form encoding
-
Layout issues:
- Clear browser cache
- Check CSS file loading
- Verify responsive breakpoints
- Set
DEBUG = Truein settings.py for development - Check Django debug toolbar for performance issues
- Use browser developer tools for frontend debugging
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source and available under the MIT License.
For issues and questions:
- Check the troubleshooting section
- Review Django documentation
- Search existing issues
- Create a new issue with detailed description
- Add image filters and effects
- Implement real-time collaboration
- Add social sharing capabilities
- Include image annotation tools
- Add collage templates
- Implement image search and tagging
- Add export to different formats (PDF, SVG)
- Mobile app development
- Cloud storage integration
- Advanced layout algorithms