Git Product home page Git Product logo

stocks-app's Introduction

stocks_app - Development Branch

Git Instructions

  • All changes will be made here
  • DO NOT merge to/from master, under any circumstance.
  • Always work on the dev branch
git checkout -b "dev"
git fetch --all --prune
git pull origin dev --rebase # ALWAYS use the --rebase option to avoid unecessary *pull* commits

Installation and Running

  • To install the dependencies
mkvirtualenv stocks_app --python python3.6
pipenv install
workon stocks_app
  • Optionally, you can use direnv. It loads various environemnt variables and (in this case) python environment(s) directly on cd-ing. The .envrc file has already been included. (Mind you, you will still have to install the environment as stated above, but will not need to manually workon stocks_app everytime you work on the project)
sudo apt install direnv
echo  'eval "$(direnv hook zsh)"' >> ~/.zshrc
source ~/.zshrc
cd $PROJECT_DIR
direnv allow

Database

Setup

  • We will be using postgres for the database. Postgres enables a lot of additional fields (JSONField, HStoreField, NumericRange, etc) that make storage and manipulation a lot easier.
  • You will have to create a postgres user called test, underwhich a database called stocks, password: test12345.
  • Keeping common credentials may involved slight more work initially, but later will help avoid unnecessary conflicts in the settings.py file.
$ sudo apt install postgres
$ sudo -u postgres -i
postgres> psql
postgres=# CREATE USER test with PASSWORD 'test12345';
postgres=# ^C
postgres> createdb stocks_app --password --owner=test
postgres> logout
  • Once you've set this up, you should be good to go. After we begin hosting, we will be migrating to a centralized database with the same credentials; this initial setup will enable you to migrate by just changing the HOST in the database configuration.

Migrations

  • Make the initial migrations (along with the single committed one) for the administrative tables and postgres special field support
./manage.py makemigrations
./manage.py migrate

stocks-app's People

Contributors

mayankrasu avatar pk13055 avatar

stocks-app's Issues

[Analytics] Addition of Google Analytics

We have two options for this:

  • Either we go with the default JS based Google analytics
  • Use a python package to have some control over the data from the Django backend

Filename mismatches

Since most of the data is received through the pkl files, you have to ensure that the files that are being fetched and the files being used for rendering are the same. Do change the new script to ensure that the filename to which it is dumping is the same as the one in views.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.