1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| ~$ django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile helloworld ~$ cd helloworld ~$ git init ~$ git add -A ~$ git commit -am "Initial commit" ~$ heroku git:remote -a lcy-web-srv set git remote heroku to https://git.heroku.com/lcy-web-srv.git ~$ git push heroku master Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done. [...] remote: https://lcy-web-srv.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/lcy-web-srv.git * [new branch] master -> master ~$ heroku run python manage.py migrate Running python manage.py migrate on ⬢ lcy-web-srv... up, run.6377 (Free) /app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html
Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK [...] Applying sessions.0001_initial... OK
~$ pip install django_heroku dj-database-url ~$ python manage.py migrate Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Applying contenttypes.0001_initial... OK [...] Applying sessions.0001_initial... OK
~$ python manage.py createsuperuser Username (leave blank to use 'michael'): xxx Email address: xxxxx@gmail.com Password: Password (again): Superuser created successfully.
~$ heroku run python manage.py createsuperuser Username (leave blank to use 'michael'): xxx Email address: xxxxx@gmail.com Password: Password (again): Superuser created successfully.
|