Skip to content

Commit 4867f49

Browse files
committed
tweaks
1 parent a4b7979 commit 4867f49

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

djangoadmin_startproject.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ web: python manage.py runserver 0.0.0.0:$PORT
1717

1818
3. Heroku requires you that your project is in a git repository in a standard
1919
way: 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

2424
4. 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.
2828
ALLOWED_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
3434
heroku 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
```
4040
heroku 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
4646
heroku 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
5050
to Heroku:
5151

5252
```bash
5353
git add -A
5454
git 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
5959
git 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

9293
By 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
9495
Postgres instead.
9596

9697

@@ -106,13 +107,15 @@ the similarly random name your app got when you created it.
106107

107108
2. Creating a new Heroku Postgres Database (only need to do this once per
108109
Heroku):
110+
109111
```bash
110112
heroku create # Create a Heroku app (only run this if you haven't already)
111113
heroku addons:create heroku-postgresql:hobby-dev --app pure-crag-68
112114
```
113115

114116
3. Confirm that the database is working by connecting to it with the
115117
command-line client:
118+
116119
```bash
117120
heroku 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
129133
heroku run python manage.py migrate
130134
```

0 commit comments

Comments
 (0)