Skip to content

Commit 268fbf5

Browse files
Heroku Production
1 parent 40570f4 commit 268fbf5

File tree

10 files changed

+109
-8
lines changed

10 files changed

+109
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33

44
# Byte-compiled / optimized / DLL files
55
__pycache__/
6+
/__pycache__
67
*.py[cod]
78
*$py.class
9+
*.pyc
810

911
# C extensions
1012
*.so
0 Bytes
Binary file not shown.

db.sqlite3

-176 KB
Binary file not shown.
0 Bytes
Binary file not shown.
86 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

django_blog/settings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import os
1414
import json
15+
import django_heroku
1516

1617
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1718
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -26,7 +27,7 @@
2627
# SECURITY WARNING: don't run with debug turned on in production!
2728
DEBUG = True
2829

29-
ALLOWED_HOSTS = ['andrewbaldwin-django-blogger.herokuapp.com']
30+
ALLOWED_HOSTS = ['localhost', 'andrewbaldwin-django-blogger.herokuapp.com']
3031

3132

3233
# Application definition
@@ -124,6 +125,10 @@
124125
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
125126
STATIC_URL = '/static/'
126127

128+
STATICFILES_DIRS = (
129+
os.path.join(BASE_DIR, 'static'),
130+
)
131+
127132
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
128133
MEDIA_URL = '/media/'
129134

@@ -139,3 +144,5 @@
139144
EMAIL_HOST_USER = os.environ.get('EMAIL_USER')
140145
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASS')
141146
DEFAULT_FROM_EMAIL = 'CodingWithAndrewTeam <noreply@codingwithandrew.com>'
147+
148+
django_heroku.settings(locals())

requirements.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
certifi==2018.1.18
1+
asgiref==3.2.10
2+
certifi==2020.6.20
23
chardet==3.0.4
3-
Django==3.0.5
4-
django-crispy-forms==1.9.0
4+
dj-database-url==0.5.0
5+
Django==3.1.1
6+
django-crispy-forms==1.9.2
7+
django-heroku==0.3.1
58
gunicorn==20.0.4
6-
idna==2.6
7-
Pillow==7.1.1
8-
requests==2.20.0
9-
urllib3==1.22
9+
idna==2.10
10+
Pillow==7.2.0
11+
psycopg2==2.7.5
12+
psycopg2-binary==2.8.6
13+
pytz==2020.1
14+
requests==2.24.0
15+
sqlparse==0.3.1
16+
urllib3==1.25.10
17+
whitenoise==5.2.0

static/blog/main.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
body {
2+
background: #fafafa;
3+
color: #333333;
4+
margin-top: 5rem;
5+
}
6+
7+
h1, h2, h3, h4, h5, h6 {
8+
color: #444444;
9+
}
10+
11+
ul {
12+
margin: 0;
13+
}
14+
15+
.bg-steel {
16+
background-color: #5f788a;
17+
}
18+
19+
.site-header .navbar-nav .nav-link {
20+
color: #cbd5db;
21+
}
22+
23+
.site-header .navbar-nav .nav-link:hover {
24+
color: #ffffff;
25+
}
26+
27+
.site-header .navbar-nav .nav-link.active {
28+
font-weight: 500;
29+
}
30+
31+
.content-section {
32+
background: #ffffff;
33+
padding: 10px 20px;
34+
border: 1px solid #dddddd;
35+
border-radius: 3px;
36+
margin-bottom: 20px;
37+
}
38+
39+
.article-title {
40+
color: #444444;
41+
}
42+
43+
a.article-title:hover {
44+
color: #428bca;
45+
text-decoration: none;
46+
}
47+
48+
.article-content {
49+
white-space: pre-line;
50+
}
51+
52+
.article-img {
53+
height: 65px;
54+
width: 65px;
55+
margin-right: 16px;
56+
}
57+
58+
.article-metadata {
59+
padding-bottom: 1px;
60+
margin-bottom: 4px;
61+
border-bottom: 1px solid #e3e3e3
62+
}
63+
64+
.article-metadata a:hover {
65+
color: #333;
66+
text-decoration: none;
67+
}
68+
69+
.article-svg {
70+
width: 25px;
71+
height: 25px;
72+
vertical-align: middle;
73+
}
74+
75+
.account-img {
76+
height: 125px;
77+
width: 125px;
78+
margin-right: 20px;
79+
margin-bottom: 16px;
80+
}
81+
82+
.account-heading {
83+
font-size: 2.5rem;
84+
}

0 commit comments

Comments
 (0)