django4 fixes
This commit is contained in:
parent
4bd1b62e64
commit
e8fa8f6d13
5 changed files with 9 additions and 9 deletions
Binary file not shown.
|
|
@ -51,7 +51,7 @@ msgstr "WLAN-Präsenzerkennung einschalten"
|
|||
|
||||
#: forms.py:68
|
||||
msgid "Old password"
|
||||
msgstr "Neues Passwort"
|
||||
msgstr "Altes Passwort"
|
||||
|
||||
#: forms.py:69
|
||||
msgid "Enter your current password here."
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ def encrypt_ldap_password(cleartext_pw):
|
|||
|
||||
# do the encryption
|
||||
aes = AES.new(key, AES.MODE_CFB, iv)
|
||||
message = iv + aes.encrypt(cleartext_pw)
|
||||
message = iv + aes.encrypt(cleartext_pw.encode())
|
||||
return base64.b64encode(message).decode(), base64.b64encode(key).decode()
|
||||
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ def decrypt_ldap_password(message, key):
|
|||
|
||||
# decrypt it
|
||||
aes = AES.new(decoded_key, AES.MODE_CFB, iv)
|
||||
cleartext_pw = aes.decrypt(ciphertext)
|
||||
cleartext_pw = aes.decrypt(ciphertext).decode()
|
||||
return cleartext_pw
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ DEBUG = True
|
|||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
('smile', 'smile@c-base.org')
|
||||
# ('smile', 'smile@c-base.org')
|
||||
# ('Your Name', 'your_email@example.com'),
|
||||
)
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ TEMPLATES = [
|
|||
import ldap
|
||||
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
|
||||
|
||||
AUTH_LDAP_SERVER_URI = "ldap://lea.cbrp3.c-base.org"
|
||||
AUTH_LDAP_SERVER_URI = "ldaps://lea.cbrp3.c-base.org"
|
||||
AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=crew,dc=c-base,dc=org"
|
||||
AUTH_LDAP_START_TLS = True
|
||||
AUTH_LDAP_BIND_AS_AUTHENTICATING_USER = True
|
||||
|
|
@ -235,7 +235,7 @@ LOGGING = {
|
|||
'loggers': {
|
||||
'django.request': {
|
||||
'handlers': ['mail_admins'],
|
||||
'level': 'ERROR',
|
||||
'level': 'DEBUG',
|
||||
'propagate': True,
|
||||
},
|
||||
"django_auth_ldap": {"level": "DEBUG", "handlers": ["console"]}
|
||||
|
|
@ -245,7 +245,7 @@ LOGGING = {
|
|||
CRISPY_TEMPLATE_PACK = 'bootstrap'
|
||||
|
||||
# c-base specific settings
|
||||
CBASE_LDAP_URL = 'ldap://lea.cbrp3.c-base.org:389/'
|
||||
CBASE_LDAP_URL = 'ldaps://lea.cbrp3.c-base.org:389/'
|
||||
CBASE_BASE_DN = 'ou=crew,dc=c-base,dc=org'
|
||||
|
||||
# Set session cookie timeout to 10 minutes
|
||||
|
|
|
|||
4
guni.sh
4
guni.sh
|
|
@ -9,11 +9,11 @@ GROUP=cbmi
|
|||
ADDRESS=127.0.0.1:8000
|
||||
DJANGO_SETTINGS=cbmi.settings
|
||||
DJANGO_SETTINGS_MODULE=cbmi.settings
|
||||
source /home/cbmi/cbmi/bin/activate
|
||||
source /home/cbmi/cbmi/venv/bin/activate
|
||||
cd /home/cbmi/cbmi
|
||||
test -d $LOGDIR || mkdir -p $LOGDIR
|
||||
echo "foo"
|
||||
exec bin/gunicorn -w $NUM_WORKERS --bind=$ADDRESS \
|
||||
exec venv/bin/gunicorn -w $NUM_WORKERS --bind=$ADDRESS \
|
||||
--user=$USER --group=$GROUP --log-level=debug \
|
||||
cbmi.wsgi:application \
|
||||
--log-file=$LOGFILE 2>>$LOGFILE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue