GitHunt
HA

harshkanani014/Stock-Tracker-Web

Stock Tracker web using Django, Django celery for task management, Django channels for real time update of stock price and redis. And also using library yahoo-fin to fetch stocks data.

Stock Tracker Web

STEP-1 : Install PostgreSQl with pgAdmin

How to install PostgreSQL?

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

STEP-2 : Set Up Database

Open PgAdmin and Create a database with name stock_tracker in PgAdmin.

STEP-3 : Clone this repository

STEP-4 : Creating Virtual environment

Use following command to set up virtual environment

py -m venv <env-name>

Activate environment

<env-name>\Scripts\activate.bat

STEP-5 Install requirements.txt

pip install -r requirements.txt

STEP-6 : Go to stock_tracker/settings.py

Replace database_name, database_user and database_password in following code
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'your-database-name',
        'USER': 'your-user-name',
        'PASSWORD': 'your-password',
        'HOST': 'localhost'
    }
} 

STEP-7 : Run following commands

python manage.py makemigrations

python manage.py migrate

python manage.py runserver

STEP-8 : Open new command prompt and run following command to start celery worker

celery -A stock_tracker.celery worker --pool=solo -l info

STEP-9 : Open new command prompt and run following command to start celery beat

celery -A stock_tracker beat -l INFO

Hurrah your website is running

Thank you