Review-Master is a Django-based web application similar to Yelp, where users can review various businesses and services. This README will guide you through setting up and running the project on your local machine.
To run Review-Master, you need the following installed on your system:
- Python (latest version)
- Homebrew (for macOS users)
- PostgreSQL (version 14)
- Fork this repository on GitHub to make your own copy.
- Clone the repository to your local machine:
git clone https://github.com/ilong4rennes/review-master.git cd review-master
-
Install Python (if not already installed):
brew install python
Note:
pip
, Python’s package manager, will be installed automatically. -
Install Virtualenv (if not already installed):
pip3 install virtualenv
-
Install PostgreSQL 14:
brew install postgresql@14
-
Start the PostgreSQL service:
brew services start postgresql@14
-
Create a PostgreSQL Database and User:
-
Open the PostgreSQL interactive terminal:
psql postgres
-
Run the following commands in the terminal to set up your database and user:
CREATE DATABASE mydb; CREATE USER myuser WITH PASSWORD 'mypassword'; ALTER ROLE myuser SET client_encoding TO 'utf8'; ALTER ROLE myuser SET default_transaction_isolation TO 'read committed'; ALTER ROLE myuser SET timezone TO 'UTC'; GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser;
-
Exit the PostgreSQL terminal by typing
\q
.
-
-
Create and Activate a Virtual Environment:
virtualenv venv source venv/bin/activate
-
Install the Required Dependencies:
pip install -r requirements.txt
-
Configure the Database Settings:
- In the Django project directory, open
settings.py
. - Update the database configuration to match the PostgreSQL setup:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mydb', 'USER': 'myuser', 'PASSWORD': 'mypassword', 'HOST': 'localhost', 'PORT': '', } }
- In the Django project directory, open
-
Run Database Migrations:
python manage.py migrate
To access the Django admin panel, create a superuser:
python manage.py createsuperuser
Follow the prompts to set up an admin account.
-
Start the server:
python manage.py runserver
-
Open a browser and navigate to
http://127.0.0.1:8000/reviewmaster
to view the application.
To access the admin panel, go to http://127.0.0.1:8000/admin
and log in with the superuser credentials you created.
This completes the setup for Review-Master.