Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
fix: update code block semantics (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Sep 21, 2023
1 parent 6e8732d commit fcf3ec4
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ It offers multiple plans, but usually the free tier is more than enough for expe
7. create a **deployment.sh** file

```bash
~deployment.sh
#$ file: deployment.sh
#!/bin/bash
python manage.py makemigrations
python manage.py migrate
Expand All @@ -57,14 +57,14 @@ It offers multiple plans, but usually the free tier is more than enough for expe
8. create **Procfile** to specify executed commands by Heroku app

```
~Procfile
#$ file: Procfile
migrate: bash deployment.sh
web: gunicorn your_project_name.wsgi
```

*Note* - **Procfile** without an extension, is an essential file for your Heroku app and must be placed in the app's root directory to explicitly declare a **process type** from a variety you can choose from. For more information, visit [Heroku's article about Procfile](https://devcenter.heroku.com/articles/procfile)

9. get your [**.gitignore** file](https://rebrand.ly/DjangoGitIgnore) before you commit anything
9. get your [**.gitignore** file](https://github.com/github/gitignore/blob/main/Python.gitignore) before you commit anything

### PART B • Python Virtual Environment

Expand Down Expand Up @@ -97,7 +97,7 @@ Another reason to use this is so that other people could recreate the exact envi
6. Create a text file called **requirements** and copy all dependencies in the code block below

```
~requirements.txt
#$ file: requirements.txt
astroid==2.0.4
autopep8==1.4.2
certifi==2018.8.24
Expand Down Expand Up @@ -151,7 +151,7 @@ Another reason to use this is so that other people could recreate the exact envi
3. Add and modify these lines in your project's settings file
```python
~project/settings.py
#$ file: project/settings.py
import os
import dj_database_url
Expand Down Expand Up @@ -195,7 +195,7 @@ Another reason to use this is so that other people could recreate the exact envi
- 23 → to set the global template in your root directory as a folder called 'template'
```python
~project/settings.py#92
#$ file: project/settings.py#92
# If Using Heroku Environment, then Use Database Setting on Heroku
if PRODUCTION:
DATABASES['default'] = dj_database_url.config()
Expand All @@ -204,7 +204,7 @@ Another reason to use this is so that other people could recreate the exact envi
- Set Database to Heroku's

```python
~project/settings.py#130
#$ file: project/settings.py#130
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
# Static files (CSS, JavaScript, Images)
Expand All @@ -228,7 +228,7 @@ Another reason to use this is so that other people could recreate the exact envi
4. Add the path to your app in your project's urls file
```python
~project/urls.py
#$ file: project/urls.py
from django.contrib import admin
from django.urls import include, path
Expand All @@ -247,7 +247,7 @@ Another reason to use this is so that other people could recreate the exact envi
5. modify these files in your apps
```python
~project/urls.py
#$ file: project/urls.py
from django.urls import path
from .views import *
Expand All @@ -257,7 +257,7 @@ Another reason to use this is so that other people could recreate the exact envi
```
```python
~project/views.py
#$ file: project/views.py
from django.shortcuts import render
def called_name(request):
Expand Down

0 comments on commit fcf3ec4

Please sign in to comment.