\n"
-"Language: \n"
+"POT-Creation-Date: 2018-10-29 11:52+0300\n"
+"Last-Translator: Dmitry Novikov nerosketch@gmail.com\n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -20,27 +17,35 @@ msgstr ""
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
-#: forms.py:16 tests.py:119
+#: forms.py:19
msgid "Can be only one default gateway"
msgstr "Может быть только один сервер доступа по умолчанию"
-#: models.py:12 templates/nas_app/nasmodel_list.html:25
+#: models.py:12 templates/gw_app/nasmodel_list.html:25
msgid "Title"
msgstr "Название"
-#: models.py:13 templates/nas_app/nasmodel_list.html:26
+#: models.py:13 templates/gw_app/nasmodel_list.html:26
msgid "Ip address"
msgstr "IP адрес"
-#: models.py:14 templates/nas_app/nasmodel_list.html:27
+#: models.py:14 templates/gw_app/nasmodel_list.html:27
msgid "Port"
msgstr "Порт"
+#: models.py:15 templates/gw_app/nasmodel_list.html:28
+msgid "Auth login"
+msgstr "Логин для входа"
+
+#: models.py:16 templates/gw_app/nasmodel_list.html:29
+msgid "Auth password"
+msgstr "Пароль для входа"
+
#: models.py:17
msgid "Type"
msgstr "Тип"
-#: models.py:18 templates/nas_app/nasmodel_list.html:31
+#: models.py:18 templates/gw_app/nasmodel_list.html:31
msgid "Is default"
msgstr "По умолчанию"
@@ -48,49 +53,45 @@ msgstr "По умолчанию"
msgid "One of nas types implementation is not found"
msgstr "Не найден тип реализации NAS"
-#: models.py:49
+#: models.py:48
msgid "Network access server. Gateway"
msgstr "Сервер доступа в интернет(NAS, Шлюз)"
-#: models.py:50
+#: models.py:49
msgid "Network access servers. Gateways"
msgstr "Серверы доступа в интернет"
-#: models.py:63 tests.py:194
+#: models.py:59
msgid "You cannot remove default server"
msgstr "Вы не можете удалить шлюз по умолчанию"
-#: nas_managers/mod_mikrotik.py:166
+#: nas_managers/mod_mikrotik.py:171
msgid "Mikrotik NAS"
msgstr ""
-#: nas_managers/mod_mikrotik.py:491
-msgid "You cannot disable last session"
-msgstr "Вы не можете выключить последнюю сессию"
-
-#: templates/nas_app/nasmodel_add.html:8 templates/nas_app/nasmodel_list.html:7
-#: templates/nas_app/nasmodel_update.html:8
+#: templates/gw_app/nasmodel_add.html:7 templates/gw_app/nasmodel_list.html:7
+#: templates/gw_app/nasmodel_update.html:7
msgid "Network access servers"
msgstr "Серверы доступа в интернет(NAS)"
-#: templates/nas_app/nasmodel_add.html:9 templates/nas_app/nasmodel_add.html:20
+#: templates/gw_app/nasmodel_add.html:8 templates/gw_app/nasmodel_add.html:19
msgid "Add gateway"
msgstr "Добавить шлюз"
-#: templates/nas_app/nasmodel_add.html:14
+#: templates/gw_app/nasmodel_add.html:13
msgid "Add new gateway"
msgstr "Добавить новый шлюз"
-#: templates/nas_app/nasmodel_add.html:26
-#: templates/nas_app/nasmodel_update.html:27
+#: templates/gw_app/nasmodel_add.html:25
+#: templates/gw_app/nasmodel_update.html:26
msgid "Save"
msgstr "Сохранить"
-#: templates/nas_app/nasmodel_confirm_delete.html:9
+#: templates/gw_app/nasmodel_confirm_delete.html:9
msgid "Remove NAS"
msgstr "Удалить NAS"
-#: templates/nas_app/nasmodel_confirm_delete.html:14
+#: templates/gw_app/nasmodel_confirm_delete.html:14
msgid ""
"If you remove this server, then all users than has been attached to them "
"will lost parent NAS server."
@@ -98,73 +99,61 @@ msgstr ""
"Если вы удалите этот сервер, тогда все пользователи которые его используют "
"потеряют интернет от этого сервера"
-#: templates/nas_app/nasmodel_list.html:12
+#: templates/gw_app/nasmodel_list.html:12
msgid "Gateways"
msgstr "Шлюзы"
-#: templates/nas_app/nasmodel_list.html:28
-msgid "Auth login"
-msgstr "Логин для входа"
-
-#: templates/nas_app/nasmodel_list.html:29
-msgid "Auth password"
-msgstr "Пароль для входа"
-
-#: templates/nas_app/nasmodel_list.html:30
+#: templates/gw_app/nasmodel_list.html:30
msgid "NAS type"
msgstr "Тип NAS"
-#: templates/nas_app/nasmodel_list.html:41
+#: templates/gw_app/nasmodel_list.html:41
msgid "View"
msgstr "Посмотреть"
-#: templates/nas_app/nasmodel_list.html:49
+#: templates/gw_app/nasmodel_list.html:49
msgid "You don't have gateways"
msgstr "У вас нет шлюзов"
-#: templates/nas_app/nasmodel_list.html:55
+#: templates/gw_app/nasmodel_list.html:55
msgid "Add"
msgstr "Добавить"
-#: templates/nas_app/nasmodel_update.html:9
+#: templates/gw_app/nasmodel_update.html:8
msgid "Edit gateway"
msgstr "Редактировать шлюз"
-#: templates/nas_app/nasmodel_update.html:14
+#: templates/gw_app/nasmodel_update.html:13
msgid "Change gateways"
msgstr "Изменить шлюзы"
-#: templates/nas_app/nasmodel_update.html:20
+#: templates/gw_app/nasmodel_update.html:19
msgid "Change gateway"
msgstr "Изменить шлюз"
-#: templates/nas_app/nasmodel_update.html:31
-#: templates/nas_app/nasmodel_update.html:35
+#: templates/gw_app/nasmodel_update.html:30
+#: templates/gw_app/nasmodel_update.html:34
msgid "Delete"
msgstr "Удалить"
-#: templates/nas_app/nasmodel_update.html:34
+#: templates/gw_app/nasmodel_update.html:33
msgid "Permission denied"
msgstr "Не достаточно прав"
-#: tests.py:72 views.py:33
+#: views.py:44
msgid "New NAS has been created"
msgstr "Новый NAS добавлен"
-#: tests.py:86
-#, python-format
+#: views.py:63
+msgid "Server successfully removed"
+msgstr "Информация о сервере успешно удалена"
+
+#: views.py:81
+msgid "Update successfully"
+msgstr "Обновлено успешно"
+
msgid "Ensure this value is less than or equal to %(limit_value)s."
msgstr "Убедитесь что значение меньше или равно %(limit_value)s."
-#: tests.py:104 tests.py:131
-#, python-format
msgid "%(model_name)s with this %(field_label)s already exists."
msgstr "%(model_name)s с таким %(field_label)s уже существует."
-
-#: tests.py:154 views.py:65
-msgid "Update successfully"
-msgstr "Обновлено успешно"
-
-#: tests.py:182 views.py:47
-msgid "Server successfully removed"
-msgstr "Информация о сервере успешно удалена"
diff --git a/nas_app/migrations/0001_initial.py b/gw_app/migrations/0001_initial.py
similarity index 100%
rename from nas_app/migrations/0001_initial.py
rename to gw_app/migrations/0001_initial.py
diff --git a/nas_app/__init__.py b/gw_app/migrations/__init__.py
similarity index 100%
rename from nas_app/__init__.py
rename to gw_app/migrations/__init__.py
diff --git a/nas_app/models.py b/gw_app/models.py
similarity index 95%
rename from nas_app/models.py
rename to gw_app/models.py
index 4512695..78793d3 100644
--- a/nas_app/models.py
+++ b/gw_app/models.py
@@ -5,7 +5,7 @@ from django.shortcuts import resolve_url
from django.utils.translation import gettext_lazy as _
from django.db import models
from djing.lib import MyChoicesAdapter
-from nas_app.nas_managers import NAS_TYPES
+from gw_app.nas_managers import NAS_TYPES
class NASModel(models.Model):
@@ -38,7 +38,7 @@ class NASModel(models.Model):
return o
def get_absolute_url(self):
- return resolve_url('nas_app:edit', self.pk)
+ return resolve_url('gw_app:edit', self.pk)
def __str__(self):
return self.title
diff --git a/gw_app/nas_managers/__init__.py b/gw_app/nas_managers/__init__.py
new file mode 100644
index 0000000..3fe5d7f
--- /dev/null
+++ b/gw_app/nas_managers/__init__.py
@@ -0,0 +1,9 @@
+from gw_app.nas_managers.mod_mikrotik import MikrotikTransmitter
+from gw_app.nas_managers.core import NasNetworkError, NasFailedResult
+from gw_app.nas_managers.structs import SubnetQueue
+
+# Указываем какие реализации шлюзов у нас есть, это будет использоваться в
+# web интерфейсе
+NAS_TYPES = (
+ ('mktk', MikrotikTransmitter),
+)
diff --git a/nas_app/nas_managers/core.py b/gw_app/nas_managers/core.py
similarity index 91%
rename from nas_app/nas_managers/core.py
rename to gw_app/nas_managers/core.py
index 7563447..d50e9d2 100644
--- a/nas_app/nas_managers/core.py
+++ b/gw_app/nas_managers/core.py
@@ -1,20 +1,20 @@
from abc import ABC, abstractmethod, abstractproperty
from typing import Iterator, Tuple, Optional
from djing import ping
-from nas_app.nas_managers.structs import SubnetQueue, VectorQueue
+from gw_app.nas_managers.structs import SubnetQueue, VectorQueue
-# Raised if NAS has returned failed result
+# Raised if gw has returned failed result
class NasFailedResult(Exception):
pass
-# Raised when is no connection to the NAS
+# Raised when is no connection to the gw
class NasNetworkError(Exception):
pass
-# Communicate with NAS
+# Communicate with gw
class BaseTransmitter(ABC):
@abstractproperty
def description(self):
@@ -34,7 +34,7 @@ class BaseTransmitter(ABC):
@abstractmethod
def add_user_range(self, queue_list: VectorQueue):
- """add subscribers list to NAS
+ """add subscribers list to gateway
:param queue_list: Vector of instances of subscribers
"""
diff --git a/nas_app/nas_managers/mod_mikrotik.py b/gw_app/nas_managers/mod_mikrotik.py
similarity index 99%
rename from nas_app/nas_managers/mod_mikrotik.py
rename to gw_app/nas_managers/mod_mikrotik.py
index b761863..30e13a0 100644
--- a/nas_app/nas_managers/mod_mikrotik.py
+++ b/gw_app/nas_managers/mod_mikrotik.py
@@ -9,8 +9,8 @@ from typing import Iterable, Optional, Tuple, Generator, Dict, Iterator
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from djing.lib.decorators import LazyInitMetaclass
-from nas_app.nas_managers import core
-from nas_app.nas_managers import structs as i_structs
+from gw_app.nas_managers import core
+from gw_app.nas_managers import structs as i_structs
DEBUG = getattr(settings, 'DEBUG', False)
diff --git a/nas_app/nas_managers/structs.py b/gw_app/nas_managers/structs.py
similarity index 100%
rename from nas_app/nas_managers/structs.py
rename to gw_app/nas_managers/structs.py
diff --git a/nas_app/templates/nas_app/nasmodel_add.html b/gw_app/templates/gw_app/nasmodel_add.html
similarity index 82%
rename from nas_app/templates/nas_app/nasmodel_add.html
rename to gw_app/templates/gw_app/nasmodel_add.html
index 3a72f37..08396d1 100644
--- a/nas_app/templates/nas_app/nasmodel_add.html
+++ b/gw_app/templates/gw_app/nasmodel_add.html
@@ -4,7 +4,7 @@
{% block breadcrumb %}
- - {% trans 'Network access servers' %}
+ - {% trans 'Network access servers' %}
- {% trans 'Add gateway' %}
{% endblock %}
@@ -19,7 +19,7 @@
{% trans 'Add gateway' %}
-