A Django web application for managing a collection of films with details like title, director, year, genre, and poster images.
Film Reference is a web-based application that allows users to:
- Browse a collection of films
- View detailed information about each film
- Add new films to the database
- Edit existing film entries
- Delete films from the collection
Before you begin, ensure you have the following installed:
- Python 3.9+
- pip (Python package manager)
- MySQL Server 8.0+
- Git
- Clone the repository
git clone https://github.com/otmanetouhami/film_reference.git
cd film_reference- Create and activate a virtual environment
# For Windows
python -m venv .venv
.venv\Scripts\activate
# For macOS/Linux
python -m venv .venv
source .venv/bin/activate- Install required dependencies
pip install -r requirements.txt- Create a MySQL database
CREATE DATABASE film_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;- Update database configuration
Create an .env file in the project root and add the following:
DB_USERNAME=YOUR_DB_USERNAME
DB_PASSWORD=YOUR_DB_PASSWORD
- Apply migrations
python manage.py migrate- Create a superuser for admin access
python manage.py createsuperuser- Start the development server
python manage.py runserver- Access the application
- Main site: http://127.0.0.1:8000/
- Admin interface: http://127.0.0.1:8000/admin/
- film - Main application with models, views, and templates
- film_reference - Project settings and configuration
- posters - Storage for uploaded film posters
static-files/- Compiled static files (generated when deployed)
- Film Management: Create, read, update, and delete film entries
- Image Upload: Upload and display film posters
- Categorization: Organize films by genre, year, and director
- Admin Interface: Powerful Django admin for database management
- Responsive Design: Mobile-friendly interface using TailwindCSS
If you encounter MySQL connection problems, ensure:
- MySQL server is running
- Credentials in settings.py are correct
- The database exists and is accessible
If image uploads fail:
- Check that the media directory exists and is writable
- Verify that Pillow is installed correctly
- Make sure the server has sufficient permissions