- Install python
brew install python3
- Install postgres
brew install postgres brew install postgresql
- Start postgres
brew service start postgres
- Create db
createdb testdb
- Clone project
git clone https://github.com/immanuelraj/test-project.git cd django-project/ - Create virtualenv
brew install mkvirtualenv mkvirtualenv --python=/usr/local/bin/python3 test-project workon test-project
- Install packages
pip install -r requirements.txt
- To run the project
cd project python manage.py migrate python manage.py collectstatic python manage.py createsuperuser python manage.py runserver
- Install Python
Sudo apt install python3.7- Install postgres
sudo apt install postgresql postgresql-contrib
sudo su postgres
createdb testdb- Clone project
git clone https://github.com/immanuelraj/test-project.git
cd test-project/- Create virtualenv
sudo apt-get install python-pip
sudo pip install virtualenv
mkdir ~/.virtualenvs
sudo pip install virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
. /usr/local/bin/virtualenvwrapper.sh
mkvirtualenv test-project
workon test-project
pip install -r requirements.txt- To run the project
cd project
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
python manage.py runserver-
Create Cycle automatically
python manage.py purchase_cycle_auto_mode 1000
-
Create Cycle with commandline input
python manage.py purchase_cycle
-
Create Cycle component with commandline input
python manage.py create_chain python manage.py create_frame python manage.py create_handle_bar python manage.py create_seat python manage.py create_wheel
-
Admin page
http://127.0.0.1:8000/admin/
- Install Heroku
brew install heroku/brew/heroku
- To Login to Heroku
heroku login
- Create heroku App
heroku create django-test-project-app
- Install django-heroku package and add it in settings
- Add Procfile under root directory
- Add domain to allowed_host
- To push to Heroku
git push heroku master
- Basic Setup
heroku run python manage.py migrate heroku run python manage.py createsuperuser
- Add config
heroku config:set SECRET_KEY='key'