A Django-based gallery web app where authenticated users can upload, edit, and delete images, organized by categories. Built with Djangoβs built-in authentication system and file handling.
- π User registration, login, and logout
- πΈ Upload images with titles, descriptions, and categories
- βοΈ Update and delete own images
- π Categorize images (e.g., Nature, Architecture, People)
- π§βπ» Users can only manage their own uploads
- π¨ Clean and responsive UI (Bootstrap)
- Backend: Django 4.x+
- Database: SQLite (default)
- Frontend: Django Templates + Bootstrap
- Auth: Django built-in authentication
- Image Handling: Django
ImageField
, media routing
gallery_project/ βββ myapp/ # Main app (models, views, templates) βββ media/ # Uploaded images βββ static/ # Static files βββ templates/ # Shared templates βββ gallery_project/ # Django settings βββ manage.py βββ requirements.txt
π§ How It Works
- Users can register/login to access the gallery dashboard.
- Uploaded images are tied to the user who posted them.
- Images are grouped into categories using a ForeignKey relationship.
- CRUD permissions are scoped per userβno editing others' images.
βοΈ Setup Instructions
git clone https://github.com/sophonie-1/gallery.git cd gallery
Set Up Environment:
python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install -r requirements.txt
Apply Migrations
python manage.py migrate