IMS
1.0.0
create database sims;
create user simsadmin with encrypted password 'password';
grant all privileges on database sims to simsadmin;
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[X] 0003_logentry_add_action_flag_choices
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
[X] 0010_alter_group_name_max_length
[X] 0011_update_proxy_permissions
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
home
[X] 0001_initial
sessions
[X] 0001_initial
create view home_SupplierProductCostView as
select b.id, b.sname, sum(a.quantity*a.selling_price) as price
from home_inventory as a right join home_supplier as b
on a.supplier_id = b.id
group by a.supplier_id,b.id
order by b.id;
select * from home_SupplierProductCostView;
다음을 설치하십시오
다음 줄을 사용하여 프로젝트 루트에 Create Procfile을 설치한 후:
web: gunicorn project_name.wsgi
web: python project/manage.py runserver 0.0.0.0:$PORT
settings.py에 다음 줄을 추가하세요.
import django_heroku
Django-Heroku를 활성화합니다.
django_heroku.settings(locals())
그런 다음 DEBUG = False로 설정하십시오.
마지막으로 프로젝트 루트 디렉터리에서 다음 명령을 실행합니다.
heroku login
heroku create app-name
git add .
git commit -m "msg"
git push heroku master
heroku ps:scale web=1
heroku run bash
cd SIMS
python3 manage.py migrate
python3 manage.py loaddata supplier
python3 manage.py loaddata inventory
python3 manage.py createsuperuser
heroku open