-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from andela/ft-heroku-deployment-159396311
- Loading branch information
Showing
15 changed files
with
208 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
release: invoke migrate-db | ||
web: gunicorn wger.wsgi:application | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "wger-bs-staging", | ||
"scripts": {}, | ||
"env": {}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
"heroku-postgresql" | ||
], | ||
"buildpacks": [{ | ||
"url": "heroku/nodejs" | ||
}, | ||
{ | ||
"url": "https://github.com/solnsubuga/heroku-buildpack-python" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from wger.settings_global import * | ||
from decouple import config | ||
import dj_database_url | ||
import os | ||
|
||
# Use 'DEBUG = True' to get more details for server errors | ||
DEBUG = True | ||
TEMPLATES[0]['OPTIONS']['debug'] = True | ||
|
||
ADMINS = ( | ||
(os.environ.get('ADMIN_NAME'), os.environ.get('ADMIN_EMAIL')), | ||
) | ||
MANAGERS = ADMINS | ||
|
||
if os.environ.get("DB") == 'postgresql': | ||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql', | ||
'NAME': os.environ.get('WGER_NAME') or 'wger', | ||
'USER': os.environ.get('WGER_USER') or 'postgres', | ||
'PASSWORD': os.environ.get('WGER_PASSWORD') or '', | ||
'HOST': os.environ.get('WGER_HOST') or 'localhost', | ||
'PORT': os.environ.get('WGER_PORT') or '', | ||
} | ||
} | ||
|
||
if os.environ.get("DB") == "heroku": | ||
DATABASES = { | ||
'default': dj_database_url.config(default=config('DATABASE_URL')) | ||
} | ||
|
||
|
||
# Your reCaptcha keys | ||
RECAPTCHA_PUBLIC_KEY = '' | ||
RECAPTCHA_PRIVATE_KEY = '' | ||
NOCAPTCHA = True | ||
|
||
# The site's URL (e.g. http://www.my-local-gym.com or http://localhost:8000) | ||
# This is needed for uploaded files and images (exercise images, etc.) to be | ||
# properly served. | ||
SITE_URL = 'http://localhost:8000' | ||
|
||
# Path to uploaded files | ||
# Absolute filesystem path to the directory that will hold user-uploaded files. | ||
MEDIA_ROOT = '' | ||
MEDIA_URL = '/media/' | ||
|
||
# Allow all hosts to access the application. Change if used in production. | ||
ALLOWED_HOSTS = '*' | ||
|
||
# This might be a good idea if you setup memcached | ||
#SESSION_ENGINE = "django.contrib.sessions.backends.cache" | ||
|
||
# Configure a real backend in production | ||
if DEBUG: | ||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
|
||
# Sender address used for sent emails | ||
WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager <wger@example.com>' | ||
|
||
# Your twitter handle, if you have one for this instance. | ||
#WGER_SETTINGS['TWITTER'] = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
{% extends "base.html" %} | ||
{% load i18n staticfiles wger_extras django_bootstrap_breadcrumbs %} | ||
|
||
{% block title %}{% trans "User list" %}{% endblock %} | ||
{% block title %} | ||
<a href="{% url 'core:user:list'%}" id="active_users_link" | ||
style="visibility: hidden">Check</a> | ||
|
||
<a href="{% url 'core:user:list_filtered' filtered=True%}" id="inactive_users_link" | ||
style="visibility: hidden">Check</a> | ||
|
||
{% if user_table.active == False %} | ||
{% trans "Active Users" %} | ||
<span> | ||
<a id="active" class="btn btn-sm btn-primary" name={{ user_table.active }} | ||
role="button"> | ||
</a> | ||
</span> | ||
{% else %} | ||
{% trans "Inactive Users" %} | ||
<span> | ||
<a id="active" class="btn btn-sm btn-primary" name={{ user_table.active }} | ||
role="button"> | ||
</a> | ||
</span> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% include 'gym/partial_user_list.html' %} | ||
<script> | ||
active = document.getElementById('active') | ||
let active_users_link = document.getElementById('active_users_link') | ||
let inactive_users_link = document.getElementById('inactive_users_link') | ||
if (active.name == "True"){ | ||
active.setAttribute('href',active_users_link) | ||
active.innerHTML="View Active Users" | ||
} | ||
else{ | ||
active.setAttribute('href',inactive_users_link) | ||
active.innerHTML="View Inactive Users" | ||
} | ||
</script> | ||
{% endblock %} | ||
|
||
|
||
{% block sidebar %} | ||
|
||
{% endblock %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.