Skip to content

OtmaneTouhami/film_reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Film Reference Application

A Django web application for managing a collection of films with details like title, director, year, genre, and poster images.

Project Overview

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

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.9+
  • pip (Python package manager)
  • MySQL Server 8.0+
  • Git

Installation

  1. Clone the repository
git clone https://github.com/otmanetouhami/film_reference.git
cd film_reference
  1. 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
  1. Install required dependencies
pip install -r requirements.txt

Database Setup

  1. Create a MySQL database
CREATE DATABASE film_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  1. 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
  1. Apply migrations
python manage.py migrate
  1. Create a superuser for admin access
python manage.py createsuperuser

Running the Application

  1. Start the development server
python manage.py runserver
  1. Access the application

Project Structure

  • 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)

Features

  • 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

Troubleshooting

Database Connection Issues

If you encounter MySQL connection problems, ensure:

  • MySQL server is running
  • Credentials in settings.py are correct
  • The database exists and is accessible

Image Upload Problems

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

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors