PostIt is a simple application that allows friends and colleagues to create groups for notifications. This way one person can post notifications to everyone by sending a message once. The application allows people to create accounts, create groups add registered users to the groups, and then send messages to these groups whenever they want.
-
After cloning the repo, set up a virtual environment
python3 -m venv .venv -
Activate the virtual environment
. .venv/bin/activate -
Install the dependencies in requirements.txt
pip install -r requirements.txt -
Configure PostgresSQL i) Open the PostgresSQL command line interface
psql postgresii) From your terminal, create a database
CREATE DATABASE postit;iii) Create a user, feel free to replace the username and password
CREATE USER admin WITH PASSWORD 'password';iv) Modify the connection parameters for the created user
ALTER ROLE admin SET client_encoding TO 'utf8';ALTER ROLE admin SET default_transaction_isolation TO 'read committed';ALTER ROLE admin SET timezone TO 'UTC';v) Grant the user access rights to the database
GRANT ALL PRIVILEGES ON DATABASE postit TO admin;vi) Exit the postgres command line
\q -
Create a .env file at the root of the project and set the database configurations there
SECRET_KEY=your_secret_keyDB_NAME=postitDB_USER=adminDB_PASSWORD=your_passwordDB_HOST=localhostDB_PORT=5432 -
Make migrations
python manage.py makemigrations -
Migrate to create tables
python manage.py migrate -
Create a superuser
python manage.py createsuperuser -
Start the server
python manage.py runserver