PostIt is a Django-based web application for creating and managing posts, aimed at helping those who hand out job slips at traffic robots in South Africa by providing a self-service platform to share their slips. Users can create, edit, delete their own posts, and view everyone's posts.
Project state -> In Product Development.
- Python 3.x
python --version
# or
python3 --version
- Django 3.x or higher
django --version
- Postgres (@14 or higher)
postgres --version
- Git
Mac/Linux
-
Clone the repository:
git clone https://github.com/yourusername/postit.git cd postit
-
Create a PostgreSQL database:
psql CREATE DATABASE postit_db; CREATE postit_user database WITH PASSWORD 'yourpassword'; ALTER ROLE postit_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE postit_user SET timezone TO 'UTC'; ALTER DATABASE postit_db OWNER TO postit_user;
-
Create a virtual environment:
python -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000/
to see the application in action.
Windows
-
Clone the repository:
git clone https://github.com/yourusername/postit.git cd postit
-
Create a PostgreSQL database:
psql CREATE DATABASE postit_db; CREATE postit_user database WITH PASSWORD 'yourpassword'; ALTER ROLE postit_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE postit_user SET timezone TO 'UTC'; ALTER DATABASE postit_db OWNER TO postit_user;
-
Create a virtual environment:
python -m venv venv source venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000/
to see the application in action.
-
Install Python:
- Download and install Python from python.org.
-
Install Pip:
- Pip comes pre-installed with Python 3.4 and later. To upgrade Pip, run:
python -m pip install --upgrade pip
-
Install Django:
pip install django
-
Install PostgreSQL:
- For macOS, you can use Homebrew:
brew install postgresql brew services start postgresql
- For Linux, use your package manager:
sudo apt-get update sudo apt-get install postgresql postgresql-contrib
-
Install Python:
- Download and install Python from python.org. Ensure you check the box to add Python to your PATH during installation.
-
Install Pip:
- Pip comes pre-installed with Python 3.4 and later. To upgrade Pip, run:
python -m pip install --upgrade pip
-
Install Django:
pip install django
-
Install PostgreSQL:
- Download and install PostgreSQL from postgresql.org. During installation, you can set the password for the PostgreSQL superuser (postgres) and choose the components you want to install. Ensure that "pgAdmin 4" is selected.
- After installation, start the PostgreSQL service using
pgAdmin 4
or the PostgreSQL shell.
- Database: Default is PostgreSQL. For production, configure the database settings in
postit/settings.py
. - Static files: Collect static files using
python manage.py collectstatic
.