This is a repository for final project Easy Buddy
- Python3 and pip must be installed
- Postgres with a local deployment must be installed locally
- Create an .env file in root directory after cloning the repository
DB_NAME="easy_buddy"
DB_USER="postgres"
DB_PASSWORD="postgres"
DB_HOST="localhost"
DB_PORT=5432
- Create Virtual env and activate
python3 -m venv .venv
source .venv/bin/activate
- Install pip requirements
pip3 install -r requirements.txt
- Make and run migrations if done changes to models
python3 manage.py makemigrations
python3 manage.py migrate
- If database is not created follow below steps
sudo su postgres
psql
postgres-# \l
#---------Lists databases available, if database is not created create one
postgres-# create database easy_buddy;
postgres-# \l
#---------Verify database is created
postgres-# \q
exit
- Make and run migrations if done changes to models
python3 manage.py makemigrations <appname>
python3 manage.py migrate
- Run server
python3 manage.py runserver
- Navigate to http://127.0.0.1:8000/ signup and signin
- Create a superuser to access admin panel and manage users
python3 manage.py createsuperuser
Username (leave blank to use 'dci-student'): admin
Email address: [email protected]
Password:
Password (again):
The password is too similar to the username.
This password is too short. It must contain at least 8 characters.
This password is too common.
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
- Navigate to http://127.0.0.1:8000/admin. username admin and password admin