A social media for YOU
Find the Changlogs @docs/changelogs.md
- Python 3.8
- pip ( python default package manager)
- poetry ( Package and virtualenv manager |
pip install poetry
) - PostgreSQL (database | Check docs for full setup process)
- Setup a virtuial environment
-
install virtualenv using
pip install virtualenv
-
create a virtualenv in the repo base directory using
virtualenv .venv
- Activate virtualenv
- Windows
.venv\scripts\activate
- Linux
source .venv/bin/activate
- After all the mentioned dependencies are installed, run command:
poetry install
This will install all the required dependencies for the project using the poetry.lock file which are needed for the projects.
To check more dependencies enter command
poetry show
Open postgres terminal
- Windows
- On windows, after installation of Postgres open the
SQL Shell (psql)
app. (You can find it on search menu)
- Login to the shell by using default values (ie blanks) except the
password
. Use the password you had createed during postgres setup.
-
Run database script found @database sql script by copying everthing into the postgres shell
-
Use
\l
command to check databases.
if bumblebee
database appears, the database is set up.
- Linux
- After installation, open postgres in terminal using
sudo -u postgres psql
This opens the postgres shell using user postgres.
-
Run database script found @database sql script by copying everthing into the postgres shell
-
Use
\l
command to check databases.
if bumblebee
database appears, the database is set up.
REMEMBER TO ACTIVATE VIRTUAL ENVIRONMENT
In order to setup django app tables, migations must be made. it can be done simply by the commands
python manage.py makemigrations
To apply migrations, use command.
python manage.py migrate
Then the migrations should be applied and the database is ready.
Note sometimes migrations may not work, and in such cases makemigrations should explicitly mention the apps explicitly like
python manage.py makemigrations activities, admin, auth, buzzes, comments, connections, contenttypes, feeds, notifications, profiles, sessions, token_blacklist, user