@@ -17,9 +17,9 @@ web: python manage.py runserver 0.0.0.0:$PORT
1717
18183 . Heroku requires you that your project is in a git repository in a standard
1919way: The ` Procfile ` , ` Pipfile ` (or ` requirements.txt ` ), and ` manage.py ` are all
20- at the "top level" next to ` README.md ` and ` .git ` , etc.^ [ Check the location of
21- the ` .git ` directory with ` ls -a ` .] Refer to the ` djtestproj ` example project
22- if you are uncertain what it should look like.
20+ at the "top level" next to ` README.md ` and ` .git ` , etc. Check the location of
21+ the ` .git ` directory with ` ls -a ` . Refer to the ` djtestproj ` example project if
22+ you are uncertain what it should look like.
2323
24244 . Allow Django to be served on any domain, by changing the list called
2525` ALLOWED_HOSTS ` in your ` settings.py ` , as such:
@@ -28,33 +28,33 @@ if you are uncertain what it should look like.
2828ALLOWED_HOSTS = [" *" ]
2929```
3030
31- 8 . Login to Heroku (should only have to do this once):
31+ 5 . Login to Heroku (should only have to do this once):
3232
3333``` bash
3434heroku login
3535```
3636
37- 8 . Create a new Heroku Application on your account for your project:
37+ 6 . Create a new Heroku Application on your account for your project:
3838
3939```
4040heroku create
4141```
4242
43- 9 . Configure this Heroku app to skip a step which likely will break:
43+ 7 . Configure this Heroku app to skip a step which likely will break:
4444
4545``` bash
4646heroku config:set DISABLE_COLLECTSTATIC=1
4747```
4848
49- 10 . Do do a git add and git commit. You will have to do this before every launch
49+ 8 . Do do a git add and git commit. You will have to do this before every launch
5050to Heroku:
5151
5252``` bash
5353git add -A
5454git comit -m " your commit note goes here...."
5555```
5656
57- 11 . Launch your site on Heroku:
57+ 9 . Launch your site on Heroku:
5858``` bash
5959git push heroku master
6060```
@@ -84,13 +84,14 @@ see your application live for the world to see.
8484* If stuff still isn't working, use the ` heroku logs ` command to see error
8585 messages.
8686
87- * Consider using the Heroku online interface to change the app name
88- from the random nonsense name to be something more appropriate.
87+ * Consider using the Heroku online interface to change the app name from the
88+ random nonsense name to be something more appropriate.
89+
8990
9091## Tip: Postgres on Heroku
9192
9293By default, Django is set-up to use SQLite. This has a big drawback: Every time
93- you push to Heroku, it might clear your data . You may want to choose to use
94+ you push to Heroku, it will clear your database . You may want to choose to use
9495Postgres instead.
9596
9697
@@ -106,13 +107,15 @@ the similarly random name your app got when you created it.
106107
1071082 . Creating a new Heroku Postgres Database (only need to do this once per
108109Heroku):
110+
109111``` bash
110112heroku create # Create a Heroku app (only run this if you haven't already)
111113heroku addons:create heroku-postgresql:hobby-dev --app pure-crag-68
112114```
113115
1141163 . Confirm that the database is working by connecting to it with the
115117command-line client:
118+
116119``` bash
117120heroku pg:psql --app pure-crag-68
118121```
@@ -123,8 +126,9 @@ heroku pg:psql --app pure-crag-68
123126* * If you used ` django-admin startproject ` * , then follow this guide:
124127 [ ` devcenter.heroku.com/articles/django-app-configuration ` ] ( https://devcenter.heroku.com/articles/django-app-configuration )
125128
126- * Once Heroku & Django is properly configured for Django, you'll need to run the
127- migrations on the remote Postgres database. That can be done as follows:
129+ * Once Heroku & Django is properly configured for Django, you'll need to run
130+ the migrations on the remote Postgres database. That can be done as follows:
131+
128132``` bash
129133heroku run python manage.py migrate
130134```
0 commit comments