Skip to content

Commit

Permalink
Merge pull request #330 from EsupPortail/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ptitloup authored Sep 10, 2020
2 parents 13b83fb + 5f29ac9 commit 8b5694a
Show file tree
Hide file tree
Showing 13 changed files with 308 additions and 221 deletions.
5 changes: 5 additions & 0 deletions pod/authentication/populatedCASbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
"affiliations": "eduPersonAffiliation"
})

CAS_FORCE_LOWERCASE_USERNAME = getattr(
settings, 'CAS_FORCE_LOWERCASE_USERNAME', False)

# search scope
BASE = 'BASE'
LEVEL = 'LEVEL'
Expand All @@ -75,6 +78,8 @@ def populateUser(tree):
username_element = tree.find(
'.//{http://www.yale.edu/tp/cas}%s' % AUTH_CAS_USER_SEARCH)
username = username_element.text
if CAS_FORCE_LOWERCASE_USERNAME:
username = username.lower()
user, user_created = User.objects.get_or_create(username=username)
owner, owner_created = Owner.objects.get_or_create(user=user)
owner.auth_type = 'CAS'
Expand Down
45 changes: 45 additions & 0 deletions pod/custom/settings_local.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ SECRET_KEY = 'A_CHANGER'
"""
DEBUG = True

"""
Pour forcer le https
"""
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True

"""
# Une liste de chaînes représentant des noms de domaine/d’hôte que ce site Django peut servir.
# C’est une mesure de sécurité pour empêcher les attaques d’en-tête Host HTTP,
Expand Down Expand Up @@ -842,3 +849,41 @@ SHIB_URL = ""
# URL de déconnexion à votre instance Shibboleth
"""
SHIB_LOGOUT_URL = ""

"""
# Forcer le passage en minuscule du nom d'utilisateur CAS (permet de prévenir des doubles créations de comptes dans certain cas).
"""
CAS_FORCE_LOWERCASE_USERNAME = False

"""
# permettre l'usage du oembed, partage dans moodle, facebook, twitter etc.
"""
OEMBED = True

"""
# Activer les commentaires au niveau de la plateforme
"""
ACTIVE_VIDEO_COMMENT = True

"""
# Transcription
"""
USE_TRANSCRIPTION = True

"""
# decoupage de l'audio pour la transcription
"""
AUDIO_SPLIT_TIME = 300

"""
# paramétrage de deepspeech pour le modele
"""
DS_PARAM = {
'fr': {
# le modèle deepspeech
'model': "/usr/local/django_projects/transcription/model_tensorflow_fr/output_graph.pbmm",
'scorer': "/usr/local/django_projects/transcription/model_tensorflow_fr/kenlm.scorer",

}
}

2 changes: 1 addition & 1 deletion pod/enrichment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def video_enrichment(request, slug, slug_c=None,
raise SuspiciousOperation('Invalid video id')

return render_video(request, id, slug_c, slug_t, slug_private,
template_video, None)
template_video)


"""
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 8b5694a

Please sign in to comment.