From 0cbd39cc0df301b7e817faf0802e8014cb44056d Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 26 Apr 2018 09:19:10 +0200 Subject: [PATCH] Fix freeradius compatibility. --- freeradius_utils/auth.py | 11 ++++++----- preferences/aes_field.py | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/freeradius_utils/auth.py b/freeradius_utils/auth.py index aafa0a50..fcf55cfa 100644 --- a/freeradius_utils/auth.py +++ b/freeradius_utils/auth.py @@ -43,11 +43,6 @@ import radiusd # Module magique freeradius (radiusd.py is dummy) from django.core.wsgi import get_wsgi_application from django.db.models import Q -from machines.models import Interface, IpList, Nas, Domain -from topologie.models import Port, Switch -from users.models import User -from preferences.models import OptionalTopologie - proj_path = "/var/www/re2o/" # This is so Django knows where to find stuff. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "re2o.settings") @@ -59,6 +54,12 @@ os.chdir(proj_path) # This is so models get loaded. application = get_wsgi_application() +from machines.models import Interface, IpList, Nas, Domain +from topologie.models import Port, Switch +from users.models import User +from preferences.models import OptionalTopologie + + options, created = OptionalTopologie.objects.get_or_create() VLAN_NOK = options.vlan_decision_nok.vlan_id VLAN_OK = options.vlan_decision_ok.vlan_id diff --git a/preferences/aes_field.py b/preferences/aes_field.py index 1d3ffa54..302aa82b 100644 --- a/preferences/aes_field.py +++ b/preferences/aes_field.py @@ -1,3 +1,4 @@ +# coding:utf-8 # Re2o est un logiciel d'administration développé initiallement au rezometz. Il # se veut agnostique au réseau considéré, de manière à être installable en # quelques clics.