Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.66 KB

README.md

File metadata and controls

48 lines (36 loc) · 1.66 KB

AlumniTrackingSystem

Run this command in your terminal first: sudo apt install python3-venv postgresql postgresql-contrib

Then,

  1. sudo -u postgres psql

A new type of terminal will open with postgres=# starting tag.

Next in that terminal,

  1. CREATE DATABASE <project_name>;
  2. CREATE USER <project_user> WITH PASSWORD '<user_password>';
  3. ALTER ROLE <project_user> SET client_encoding TO 'utf8';
  4. ALTER ROLE <project_user> SET default_transaction_isolation TO 'read committed';
  5. ALTER ROLE <project_user> SET timezone TO 'UTC';
  6. GRANT ALL PRIVILEGES ON DATABASE <project_name> TO <project_user>;
  7. \q

You will be back to the original terminal.

  1. mkdir SIH && cd SIH
  2. git clone https://github.com/chiragagarwal54/AlumniTrackingSystem.git
  3. python3 -m venv venv
  4. source venv/bin/activate
  5. cd AlumniTrackingSystem
  6. pip install -r requirements.txt
  7. cp .env.example .env
  8. Add your database name, user and password to the .env file. Keep host as localhost and port as null.
  9. python manage.py makemigrations
  10. python manage.py migrate
  11. python manage.py runserver

The website is now up and running at http://localhost:8000/

To Check the reak-time chat function you need to install redis. Steps to install redis are as follows:

  1. sudo apt install redis-server
  2. sudo nano /etc/redis/redis.conf
  3. Inside the file find the supervised directive and change it to systemd. It should be set to no by default.
  4. sudo systemctl restart redis.service

To check if redis is working or not:

  1. Type in redis-cli
  2. Type ping
  3. If it returns PONG, then your redis-broker server is running fine.