Browse Source

Adapt dsl_ldap module to new pluggable apps style

Jocelyn Delalande 7 years ago
parent
commit
c8a771a68d
3 changed files with 17 additions and 0 deletions
  1. 1 0
      coin/dsl_ldap/__init__.py
  2. 14 0
      coin/dsl_ldap/apps.py
  3. 2 0
      coin/dsl_ldap/models.py

+ 1 - 0
coin/dsl_ldap/__init__.py

@@ -0,0 +1 @@
+default_app_config = 'coin.dsl_ldap.apps.DSLLDAPConfig'

+ 14 - 0
coin/dsl_ldap/apps.py

@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.apps import AppConfig
+import coin.apps
+
+from . import urls
+
+
+class DSLLDAPConfig(AppConfig, coin.apps.AppURLs):
+    name = 'coin.dsl_ldap'
+    verbose_name = "xDSL (LDAP)"
+
+    exported_urlpatterns = [('dsl_ldap', urls.urlpatterns)]

+ 2 - 0
coin/dsl_ldap/models.py

@@ -45,6 +45,7 @@ class RadiusGroup(models.Model):
     class Meta:
         verbose_name = _("radius group")
         verbose_name_plural = _("radius groups")
+        db_table = "dsl_ldap_radiusgroup"
 
 
 class DSLConfiguration(CoinLdapSyncMixin, Configuration):
@@ -137,6 +138,7 @@ class DSLConfiguration(CoinLdapSyncMixin, Configuration):
     class Meta:
         verbose_name = _("DSL line")
         verbose_name_plural = _("DSL lines")
+        db_table = "dsl_ldap_dslconfiguration"
 
 
 class LdapDSLConfig(ldapdb.models.Model):