Skip to content

Commit 77eca38

Browse files
committed
Add missing README file
1 parent 8b39f2e commit 77eca38

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

django-hosting-heroku/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# How to Host Your Django Project on Heroku
2+
3+
This is a companion project to a tutorial on Real Python. It's a bare-bones Django project without any views.
4+
5+
## Instructions
6+
7+
You should follow the step-by-step instructions in the tutorial to deploy this project to Heroku. Alternatively, you can run the finished project by following the instructions below.
8+
9+
Download the code by cloning the `materials` repository:
10+
11+
```shell
12+
$ git clone [email protected]:realpython/materials.git
13+
```
14+
15+
Create a new local Git repository:
16+
17+
```shell
18+
$ cd materials/django-hosting-heroku
19+
$ git init
20+
$ git add .
21+
$ git commit -m "Initial commit"
22+
```
23+
24+
Deploy the code to Heroku:
25+
26+
```shell
27+
$ heroku login
28+
$ heroku create
29+
$ heroku config:set DEBUG=True SECRET_KEY=$(date | base64)
30+
$ git push heroku master
31+
$ heroku open
32+
```
33+
34+
Optionally, for local development:
35+
36+
```shell
37+
$ python3 -m venv .venv
38+
$ source .venv/bin/activate
39+
$ python3 -m pip install -r requirements.txt
40+
$ heroku config -s > .env
41+
$ heroku local
42+
```
43+
44+
Navigate your web browser to <http://0.0.0.0:5000/>

0 commit comments

Comments
 (0)