Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 1.44 KB

README.md

File metadata and controls

75 lines (51 loc) · 1.44 KB

FreeDjancer

A minimal clone of Freelancer.com Back-end

img.png

Setup Guide, step by step:

Clone the Repository

Create a Python Virtual Environment

python3.10 -m venv venv

Install the Packages

pip install -r requirements.txt

Create your database

Open your postgresql shell with psql command

Create Database

CREATE DATABASE <database_name>;

Create User

CREATE USER <username>;

Grant all privileges to FreeDjancer database user

GRANT ALL PRIVILEGES ON DATABASE <database_name> TO <username>;

Create a Password for your FreeDjancer database user

ALTER USER user_name WITH PASSWORD '<password>';

Create a .env file in root directory and add your created config:

SECRET_KEY='Your Secret Key generated by https://djecrety.ir'
DEBUG= 'Status of debug of the proejct'
ALLOWED_HOSTS= ''

DB_NAME= '<user_name>'
DB_USER= '<password>'
DB_PASSWORD= '<database_name>'
DB_HOST='localhost'
DB_PORT=5432

EMAIL_HOST_USER= '<your_email_host_user'
EMAIL_HOST_PASSWORD = '<your_email_host_password'

Migrate tables to the database

python manage.py migrate

if you see this error message:

django.db.utils.ProgrammingError: permission denied to create extension "citext"
HINT:  Must be superuser to create this extension.

Just enter this command to your database shell:

ALTER ROLE freedjancer SUPERUSER;