Skip to content

Commit

Permalink
Merge pull request #102 from Full-Tortuga/fix/#101-Settings-heroku
Browse files Browse the repository at this point in the history
Fix/#101 settings heroku
  • Loading branch information
JSnow11 authored Jan 9, 2022
2 parents ae871e3 + be77cb5 commit 6dd8de1
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 16 deletions.
12 changes: 6 additions & 6 deletions decide/administration/frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"files": {
"main.css": "/static/css/main.ba08e160.chunk.css",
"main.js": "/static/js/main.f6dc7108.chunk.js",
"main.js.map": "/static/js/main.f6dc7108.chunk.js.map",
"main.css": "/static/css/main.1487ac80.chunk.css",
"main.js": "/static/js/main.0b89869b.chunk.js",
"main.js.map": "/static/js/main.0b89869b.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.f05c28ad.js",
"runtime-main.js.map": "/static/js/runtime-main.f05c28ad.js.map",
"static/js/2.904b1e73.chunk.js": "/static/js/2.904b1e73.chunk.js",
"static/js/2.904b1e73.chunk.js.map": "/static/js/2.904b1e73.chunk.js.map",
"static/js/3.823c8247.chunk.js": "/static/js/3.823c8247.chunk.js",
"static/js/3.823c8247.chunk.js.map": "/static/js/3.823c8247.chunk.js.map",
"index.html": "/index.html",
"static/css/main.ba08e160.chunk.css.map": "/static/css/main.ba08e160.chunk.css.map",
"static/css/main.1487ac80.chunk.css.map": "/static/css/main.1487ac80.chunk.css.map",
"static/js/2.904b1e73.chunk.js.LICENSE.txt": "/static/js/2.904b1e73.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.f05c28ad.js",
"static/js/2.904b1e73.chunk.js",
"static/css/main.ba08e160.chunk.css",
"static/js/main.f6dc7108.chunk.js"
"static/css/main.1487ac80.chunk.css",
"static/js/main.0b89869b.chunk.js"
]
}
2 changes: 1 addition & 1 deletion decide/administration/frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Decide admin panel"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Decide Admin</title><link href="/static/css/main.ba08e160.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);p.length;)p.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"823c8247"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonpfrontend=this.webpackJsonpfrontend||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var l=0;l<a.length;l++)r(a[l]);var f=c;t()}([])</script><script src="/static/js/2.904b1e73.chunk.js"></script><script src="/static/js/main.f6dc7108.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Decide admin panel"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Decide Admin</title><link href="/static/css/main.1487ac80.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);p.length;)p.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"823c8247"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonpfrontend=this.webpackJsonpfrontend||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var l=0;l<a.length;l++)r(a[l]);var f=c;t()}([])</script><script src="/static/js/2.904b1e73.chunk.js"></script><script src="/static/js/main.0b89869b.chunk.js"></script></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion decide/authentication/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# from base.tests import BaseTestCase
from base import mods

from local_settings import AUTH_LDAP_SERVER_URI
from decide.settings import AUTH_LDAP_SERVER_URI

class AuthTestCase(APITestCase):

Expand Down
2 changes: 1 addition & 1 deletion decide/authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from django.db import models

import ldap
from local_settings import AUTH_LDAP_SERVER_URI, AUTH_LDAP_BIND_DN, AUTH_LDAP_BIND_PASSWORD
from decide.settings import AUTH_LDAP_SERVER_URI, AUTH_LDAP_BIND_DN, AUTH_LDAP_BIND_PASSWORD


class GetUserView(APIView):
Expand Down
12 changes: 12 additions & 0 deletions decide/decide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import os
import django_heroku
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand All @@ -30,6 +32,16 @@
LOGIN_URL = '/authentication/login_form/'
LOGIN_REDIRECT_URL = '/authentication/bienvenida/'

# LDAP
AUTH_LDAP_SERVER_URI = 'ldap://:389'

AUTH_LDAP_BIND_DN = 'cn=admin,dc=decide,dc=org'
AUTH_LDAP_BIND_PASSWORD = 'decide'
AUTH_LDAP_USER_SEARCH = LDAPSearch(
'ou=people,dc=decide,dc=org',
ldap.SCOPE_SUBTREE,
'(uid=%(user)s)',
)
# Application definition

INSTALLED_APPS = [
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ gunicorn
selenium==3.14.0
python-telegram-bot==13.9.0
python-dotenv
dnspython

0 comments on commit 6dd8de1

Please sign in to comment.