diff --git a/devapp/dev_types.py b/devapp/dev_types.py index 8a232a5..7baf5e0 100644 --- a/devapp/dev_types.py +++ b/devapp/dev_types.py @@ -516,7 +516,12 @@ class ZteOnuDevice(OnuDevice): ip = device.parent_dev.ip_address if ip: mac = str(device.mac_addr).encode() - sn = b"ZTEG%s" % b''.join(mac.split(b':')[-4:]).upper() + + # Format serial number from mac address + # because saved mac address was make from serial number + sn = (b'%.2X' % int(x, base=16) for x in mac.split(b':')[-4:]) + sn = b"ZTEG%s" % b''.join(sn) + telnet = extra_data.get('telnet') if telnet is None: raise DeviceConfigurationError('For ZTE configuration needed "telnet" section in extra_data') diff --git a/devapp/templates/devapp/custom_dev_page/olt_ztec320.html b/devapp/templates/devapp/custom_dev_page/olt_ztec320.html index ee910f1..d1e9a02 100644 --- a/devapp/templates/devapp/custom_dev_page/olt_ztec320.html +++ b/devapp/templates/devapp/custom_dev_page/olt_ztec320.html @@ -17,15 +17,9 @@ {% for fiber in dev_manager.get_fibers %}
{{ fiber.fb_name }} - {% if fiber.fb_onu_num > 0 %} - - {{ fiber.fb_onu_num }} - - {% else %} - - 0 - - {% endif %} + + {{ fiber.fb_onu_num }} +
{% empty %}

{% trans 'We have not received info, please check options :(' %}

diff --git a/djing/settings.py b/djing/settings.py index 8c24531..d8bbed9 100644 --- a/djing/settings.py +++ b/djing/settings.py @@ -126,12 +126,12 @@ SESSION_COOKIE_HTTPONLY = True # Internationalization # https://docs.djangoproject.com/en/1.11/topics/i18n/ -LANGUAGE_CODE = 'ru-RU' +LANGUAGE_CODE = 'ru' -#LANGUAGES = ( -# ('ru', _('Russian')), -# ('en', _('English')) -#) +LANGUAGES = ( + ('ru', _('Russian')), + #('en', _('English')) +) PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))