Move production deps out of requirements.txt

This commit is contained in:
Martin Pépin 2019-11-22 21:58:56 +08:00
parent a3ca2e66bf
commit 481cb5e478
No known key found for this signature in database
GPG key ID: E7520278B1774448
4 changed files with 28 additions and 7 deletions

View file

@ -2,12 +2,18 @@ from django.conf import settings
from django.db.models import Q
from django.http import Http404
from django.shortcuts import render
from ldap3 import Connection
from gestioncof.models import User
from kfet.decorators import teamkfet_required
from kfet.models import Account
if getattr(settings, "LDAP_SERVER_URL", None):
from ldap3 import Connection
else:
# shared.tests.testcases.TestCaseMixin.mockLDAP needs
# Connection to be defined in order to mock it.
Connection = None
class Clipper(object):
def __init__(self, clipper, fullname):