Skip to content

Commit eb3c707

Browse files
authored
2018 updates (#549)
* Heroku changes * Release Phase (#4) * 2to3 (#5) * update fixture for mentor to include image (#6) * Allow s3 static & media files (#7) * python to python3 for tasks * Allow s3 static & media files * Add Heroku generated app.json * remove SECRET_KEY (#8) * http -> https (#9) * Django SSL (#10) * Use Django Admin to check in/out students/mentors (#11) Closes #545 * Fixed read_only admin error & added django-environ (#12) * Removing defaults and converting types. (#13) * fix environment variables (#14) * Review Apps fixes (#15) * Update app.json requirements * Fix json
1 parent 0df779a commit eb3c707

File tree

258 files changed

+5236
-11320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+5236
-11320
lines changed

.env

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
DEBUG=True
2+
ENABLE_DEV_FIXTURES=True
23

4+
SITE_NAME=CoderDojoChi
35
SITE_URL=http://localhost
4-
SECRET_KEY="e^u3u$pukt$s=6#&9oi9&jj5ow6563fuka%y9t7i*2laalk^l$"
6+
SECRET_KEY=
7+
SECURE_SSL_REDIRECT=False
58

69
# Database
710
POSTGRES_HOST=db
@@ -11,7 +14,6 @@ POSTGRES_USER=postgres
1114
POSTGRES_PASSWORD=mysecretpassword
1215

1316
# Email
14-
DEBUG_EMAIL=True
1517
DEFAULT_FROM_EMAIL=info@coderdojochi.org
1618
CONTACT_EMAIL=info@coderdojochi.org
1719
MANDRILL_API_KEY=
@@ -22,5 +24,9 @@ EMAIL_HOST_USER=
2224
# AWS
2325
AWS_ACCESS_KEY_ID=
2426
AWS_SECRET_ACCESS_KEY=
25-
AWS_STATIC_BUCKET_NAME=static.staging.coderdojochi.org
26-
AWS_STORAGE_BUCKET_NAME=media.staging.coderdojochi.org
27+
AWS_STORAGE_BUCKET_NAME=
28+
29+
# PayPal
30+
PAYPAL_RECEIVER_EMAIL=
31+
PAYPAL_BUSINESS_ID=
32+
PAYPAL_TEST=False

.gitignore

Lines changed: 17 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,27 @@
1-
# ------------------------------
2-
# Miscellaneous
3-
# ------------------------------
4-
*.DS_Store
5-
_internal/
6-
src/
7-
static/avatars/**/*
8-
coderdojochi/static/avatars/**/*
9-
coderdojochi/static/css/*.css
10-
coderdojochi/static/css/*.css.map
11-
coderdojochi/static/js/*.min.js
12-
coderdojochi/static/js/*.min.map
13-
coderdojochi/static/images/sprites/**/*
14-
coderdojochi/static/*.jpg
15-
coderdojochi/static/*.png
16-
coderdojochi/static/*.gif
1+
# Created by https://www.gitignore.io/api/django
172

18-
# ------------------------------
19-
# Grunt/Bower
20-
# ------------------------------
21-
.sass-cache/
22-
node_modules/
23-
24-
# ------------------------------
25-
# Django
26-
# ------------------------------
3+
### Django ###
274
*.log
285
*.pot
296
*.pyc
7+
__pycache__/
308
local_settings.py
31-
test_settings.py
32-
production_settings.py
33-
34-
# ------------------------------
35-
# Python
36-
# ------------------------------
37-
*.py[cod]
38-
39-
# C extensions
40-
*.so
41-
42-
# Packages
43-
*.egg
44-
*.egg-info
45-
dist
46-
47-
48-
# build
49-
50-
9+
db.sqlite3
10+
media
5111

52-
eggs
53-
parts
54-
bin
55-
var
56-
sdist
57-
develop-eggs
58-
.installed.cfg
59-
lib
60-
lib64
61-
__pycache__
12+
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
13+
# in your Git repository. Update and uncomment the following line accordingly.
14+
staticfiles/
6215

63-
# Installer logs
64-
pip-log.txt
16+
# env file
17+
.env
18+
.env.*
6519

66-
# Unit test / coverage reports
67-
.coverage
68-
.tox
69-
nosetests.xml
70-
71-
# Translations
72-
*.mo
73-
74-
# Mr Developer
75-
.mr.developer.cfg
76-
.project
77-
.pydevproject
78-
79-
# Django Development
80-
*.bak
81-
*.sqlite3
82-
test_settings.py
83-
84-
local_settings.py
85-
/media
86-
87-
# Elastic Beanstalk Files
88-
.elasticbeanstalk/*
89-
!.elasticbeanstalk/*.cfg.yml
90-
!.elasticbeanstalk/*.global.yml
20+
# psql dump files
21+
*.dump
22+
*.sql
9123

92-
#############################
93-
# docker deployment and aws #
94-
#############################
95-
.elasticbeanstalk
96-
.tmp-deploy
24+
# End of https://www.gitignore.io/api/django
9725

98-
*.sql
26+
# notes
27+
_notes/*

.jshintrc

Lines changed: 0 additions & 30 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"PeterJausovec.vscode-docker",
5+
"thebarkman.vscode-djaneiro",
6+
"Zignd.html-css-class-completion"
7+
]
8+
}

.vscode/settings.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"editor.trimAutoWhitespace": true,
3+
"files.exclude": {
4+
"**/.git": true,
5+
"**/.DS_Store": true,
6+
"**/*.pyc": true,
7+
"**/__pycache__": true,
8+
"staticfiles": true,
9+
},
10+
"files.associations": {
11+
"*.html": "django-html",
12+
},
13+
"python.linting.enabled": true,
14+
"python.linting.ignorePatterns": [
15+
".vscode/*.py",
16+
"**/site-packages/**/*.py",
17+
"**/migrations/**",
18+
],
19+
"python.linting.pylintEnabled": false,
20+
"python.linting.pep8Enabled": true,
21+
"python.linting.pep8Path": "pycodestyle",
22+
"python.linting.pep8Args": [
23+
"--max-line-length=120",
24+
],
25+
"python.pythonPath": "/usr/local/bin/python3",
26+
"[python]": {
27+
"editor.rulers": [120],
28+
},
29+
"[git-commit]": {
30+
"editor.rulers": [72],
31+
},
32+
"[json]": {
33+
"editor.quickSuggestions": {
34+
"strings": true,
35+
},
36+
},
37+
"[markdown]": {
38+
"editor.wordWrap": "on",
39+
"editor.quickSuggestions": false,
40+
"editor.trimAutoWhitespace": false,
41+
},
42+
}

Dockerfile

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
FROM python:2.7-stretch
1+
FROM kennethreitz/pipenv
22

3-
RUN apt-get update \
4-
&& apt-get install -y curl memcached python-memcache
5-
6-
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
7-
&& apt-get install -y nodejs
8-
9-
ENV DIR_BUILD /build
10-
ENV DIR_SRC /src
11-
12-
RUN mkdir -p $DIR_BUILD \
13-
&& mkdir -p $DIR_SRC
14-
15-
WORKDIR $DIR_SRC
16-
17-
COPY package.json $DIR_SRC/package.json
18-
RUN npm install
19-
20-
COPY requirements.txt $DIR_SRC/
21-
RUN pip install --upgrade pip && pip install -r requirements.txt
22-
23-
COPY gulp $DIR_SRC/gulp
24-
COPY gulpfile.js $DIR_SRC/
25-
COPY manage.py $DIR_SRC/
26-
COPY coderdojochi $DIR_SRC/coderdojochi
27-
COPY fixtures $DIR_SRC/fixtures
28-
29-
COPY gunicorn.conf.py $DIR_BUILD/gunicorn.conf.py
30-
COPY logging.conf $DIR_BUILD/logging.conf
31-
COPY memcached.conf /etc/memcached.conf
32-
COPY deploy.sh $DIR_SRC/deploy.sh
33-
34-
CMD $DIR_SRC/deploy.sh
3+
COPY . /app

Pipfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
Django = "*"
8+
invoke = "*"
9+
gunicorn = "*"
10+
arrow = "*"
11+
"boto3" = "*"
12+
Pillow = "*"
13+
mock = "*"
14+
"psycopg2-binary" = "*"
15+
django-allauth = "*"
16+
django-appconf = "*"
17+
"django-bootstrap3" = "*"
18+
django-cleanup = "*"
19+
django-common-helpers = "*"
20+
django-cron = "*"
21+
django-debug-toolbar = "*"
22+
django-heroku = "*"
23+
"django-html5" = "*"
24+
django-import-export = "*"
25+
django-loginas = "*"
26+
django-nose = "*"
27+
django-paypal = "*"
28+
django-stdimage = "*"
29+
django-storages = "*"
30+
djrill = "*"
31+
factory_boy = "*"
32+
icalendar = "*"
33+
json-logging-py = "*"
34+
35+
[dev-packages]
36+
pylint = "*"
37+
"autopep8" = "*"
38+
39+
[requires]
40+
python_version = "3.6"

0 commit comments

Comments
 (0)