From e10566749eeb32e7344d9852bcf3d6f8f74c3b38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Sun, 29 Sep 2019 20:51:22 +0200
Subject: [PATCH] misc: use relative imports (#36518)

---
 auquotidien/auquotidien.py                    | 56 +++++++++----------
 auquotidien/modules/abelium_domino_synchro.py | 12 ++--
 auquotidien/modules/abelium_domino_ui.py      | 10 ++--
 .../modules/abelium_domino_workflow.py        | 13 ++---
 auquotidien/modules/admin.py                  | 14 ++---
 auquotidien/modules/agenda.py                 |  8 +--
 auquotidien/modules/announces.py              | 18 +++---
 auquotidien/modules/announces_ui.py           | 18 +++---
 auquotidien/modules/backoffice.py             |  8 +--
 auquotidien/modules/categories_admin.py       | 10 ++--
 auquotidien/modules/clicrdv.py                |  8 +--
 auquotidien/modules/connectors.py             |  4 +-
 auquotidien/modules/events_ui.py              | 18 +++---
 auquotidien/modules/formpage.py               | 10 ++--
 auquotidien/modules/links_ui.py               | 16 +++---
 auquotidien/modules/myspace.py                | 24 ++++----
 auquotidien/modules/payments.py               | 10 ++--
 auquotidien/modules/payments_ui.py            | 16 +++---
 auquotidien/modules/root.py                   | 48 ++++++++--------
 auquotidien/modules/strongbox_ui.py           | 12 ++--
 tests/test_admin_pages.py                     |  2 +-
 tests/test_backoffice_pages.py                |  2 +-
 tests/test_user_pages.py                      |  2 +-
 tests/utilities.py                            |  2 +-
 24 files changed, 170 insertions(+), 171 deletions(-)

diff --git a/auquotidien/auquotidien.py b/auquotidien/auquotidien.py
index ce74c28..b090e86 100644
--- a/auquotidien/auquotidien.py
+++ b/auquotidien/auquotidien.py
@@ -1,25 +1,25 @@
 from quixote import get_publisher
 
-from qommon import _
-from qommon.publisher import get_publisher_class, get_request
-from qommon.misc import get_cfg
-
-import modules.admin
-import modules.backoffice
-import modules.links_ui
-import modules.announces_ui
-import modules.categories_admin
-import modules.events_ui
-import modules.payments_ui
-import modules.strongbox_ui
-import modules.formpage
-import modules.template
-import modules.root
-import modules.payments
-import modules.connectors
-import modules.abelium_domino_ui
-import modules.abelium_domino_vars
-import modules.abelium_domino_synchro
+from wcs.qommon import _
+from wcs.qommon.publisher import get_publisher_class, get_request
+from wcs.qommon.misc import get_cfg
+
+from .modules import admin
+from .modules import backoffice
+from .modules import links_ui
+from .modules import announces_ui
+from .modules import categories_admin
+from .modules import events_ui
+from .modules import payments_ui
+from .modules import strongbox_ui
+from .modules import formpage
+from .modules import template
+from .modules import root
+from .modules import payments
+from .modules import connectors
+from .modules import abelium_domino_ui
+from .modules import abelium_domino_vars
+from .modules import abelium_domino_synchro
 
 get_publisher_class().register_translation_domain('auquotidien')
 get_publisher_class().default_configuration_path = 'au-quotidien-wcs-settings.xml'
@@ -28,28 +28,28 @@ rdb = get_publisher_class().backoffice_directory_class
 
 rdb.items = []
 
-rdb.register_directory('announces', modules.announces_ui.AnnouncesDirectory())
+rdb.register_directory('announces', announces_ui.AnnouncesDirectory())
 rdb.register_menu_item('announces/', _('Announces'))
 
-rdb.register_directory('links', modules.links_ui.LinksDirectory())
+rdb.register_directory('links', links_ui.LinksDirectory())
 rdb.register_menu_item('links/', _('Links'))
 
-rdb.register_directory('events', modules.events_ui.EventsDirectory())
+rdb.register_directory('events', events_ui.EventsDirectory())
 rdb.register_menu_item('events/', _('Events'))
 
-rdb.register_directory('payments', modules.payments_ui.PaymentsDirectory())
+rdb.register_directory('payments', payments_ui.PaymentsDirectory())
 rdb.register_menu_item('payments/', _('Payments'))
 
-rdb.register_directory('strongbox', modules.strongbox_ui.StrongboxDirectory())
+rdb.register_directory('strongbox', strongbox_ui.StrongboxDirectory())
 rdb.register_menu_item('strongbox/', _('Strongbox'))
 
-rdb.register_directory('settings', modules.admin.SettingsDirectory())
+rdb.register_directory('settings', admin.SettingsDirectory())
 
 import wcs.admin.forms
-wcs.admin.forms.FormsDirectory.categories = modules.categories_admin.CategoriesDirectory()
+wcs.admin.forms.FormsDirectory.categories = categories_admin.CategoriesDirectory()
 
 import wcs.admin.settings
-wcs.admin.settings.SettingsDirectory.domino = modules.abelium_domino_ui.AbeliumDominoDirectory()
+wcs.admin.settings.SettingsDirectory.domino = abelium_domino_ui.AbeliumDominoDirectory()
 wcs.admin.settings.SettingsDirectory._q_exports.append('domino')
 
 import wcs.categories
diff --git a/auquotidien/modules/abelium_domino_synchro.py b/auquotidien/modules/abelium_domino_synchro.py
index 7e42a74..2c0e96e 100644
--- a/auquotidien/modules/abelium_domino_synchro.py
+++ b/auquotidien/modules/abelium_domino_synchro.py
@@ -3,16 +3,16 @@ from datetime import datetime
 import collections
 from decimal import Decimal
 
-from qommon import _
-from qommon.cron import CronJob
-from qommon.publisher import get_publisher_class
-from qommon import get_logger
+from wcs.qommon import _
+from wcs.qommon.cron import CronJob
+from wcs.qommon.publisher import get_publisher_class
+from wcs.qommon import get_logger
 
 from wcs.users import User
 
-from abelium_domino_ui import (get_client, is_activated, get_invoice_regie,
+from .abelium_domino_ui import (get_client, is_activated, get_invoice_regie,
         abelium_domino_ws)
-from payments import Invoice, Transaction
+from .payments import Invoice, Transaction
 
 DOMINO_ID_PREFIX = 'DOMINO-'
 
diff --git a/auquotidien/modules/abelium_domino_ui.py b/auquotidien/modules/abelium_domino_ui.py
index e297e8e..1fe45e7 100644
--- a/auquotidien/modules/abelium_domino_ui.py
+++ b/auquotidien/modules/abelium_domino_ui.py
@@ -2,13 +2,13 @@ from quixote import get_publisher, redirect, get_request
 from quixote.directory import Directory, AccessControlled
 from quixote.html import TemplateIO, htmltext
 
-from qommon import _
-from qommon import get_cfg, get_logger
-from qommon.form import Form, StringWidget, CheckboxWidget, SingleSelectWidget
-from qommon.backoffice.menu import html_top
+from wcs.qommon import _
+from wcs.qommon import get_cfg, get_logger
+from wcs.qommon.form import Form, StringWidget, CheckboxWidget, SingleSelectWidget
+from wcs.qommon.backoffice.menu import html_top
 from quixote.html import htmltext
 
-from payments import Regie
+from .payments import Regie
 
 
 # constants
diff --git a/auquotidien/modules/abelium_domino_workflow.py b/auquotidien/modules/abelium_domino_workflow.py
index 144470b..6595755 100644
--- a/auquotidien/modules/abelium_domino_workflow.py
+++ b/auquotidien/modules/abelium_domino_workflow.py
@@ -4,17 +4,16 @@ import time
 from quixote import get_request, get_publisher, get_session
 from quixote.directory import Directory
 
-from qommon import _
-from qommon.substitution import Substitutions
-from qommon.form import Form, ValidatedStringWidget
-import qommon.misc
-from qommon import get_logger
+from wcs.qommon import _
+from wcs.qommon.substitution import Substitutions
+from wcs.qommon.form import Form, ValidatedStringWidget
+from wcs.qommon import get_logger
 
 from wcs.workflows import Workflow, WorkflowStatusJumpItem, register_item_class
 from wcs.forms.common import FormStatusPage
 
-from abelium_domino_ui import (is_activated, abelium_domino_ws, get_client, get_family)
-import abelium_domino_ws
+from .abelium_domino_ui import (is_activated, abelium_domino_ws, get_client, get_family)
+from . import abelium_domino_ws
 
 class InternalCodeStringWidget(ValidatedStringWidget):
     regex = '\d*'
diff --git a/auquotidien/modules/admin.py b/auquotidien/modules/admin.py
index 5b92e0a..d027249 100644
--- a/auquotidien/modules/admin.py
+++ b/auquotidien/modules/admin.py
@@ -8,18 +8,18 @@ import wcs.admin.root
 import wcs.root
 from wcs.roles import get_user_roles
 
-from qommon import _
-from qommon import errors, get_cfg
-from qommon.form import *
+from wcs.qommon import _
+from wcs.qommon import errors, get_cfg
+from wcs.qommon.form import *
 
 import wcs.admin.settings
 from wcs.formdef import FormDef
 from wcs.categories import Category
-from qommon.backoffice.menu import html_top
+from wcs.qommon.backoffice.menu import html_top
 
-from events import get_default_event_tags
+from .events import get_default_event_tags
 import re
-from abelium_domino_ui import AbeliumDominoDirectory
+from .abelium_domino_ui import AbeliumDominoDirectory
 
 
 class PanelDirectory(Directory):
@@ -288,4 +288,4 @@ class SettingsDirectory(wcs.admin.settings.SettingsDirectory):
             return PanelDirectory()
         return super(SettingsDirectory, self)._q_lookup(component)
 
-import categories_admin
+from . import categories_admin
diff --git a/auquotidien/modules/agenda.py b/auquotidien/modules/agenda.py
index 6f82c9b..5d9f56c 100644
--- a/auquotidien/modules/agenda.py
+++ b/auquotidien/modules/agenda.py
@@ -6,11 +6,11 @@ from quixote.directory import Directory
 from quixote import get_publisher, get_request, redirect, get_session, get_response
 from quixote.html import htmltext, TemplateIO
 
-from qommon import _
-from qommon import misc, template, errors, get_cfg
-from qommon.form import *
+from wcs.qommon import _
+from wcs.qommon import misc, template, errors, get_cfg
+from wcs.qommon.form import *
 
-from events import Event, RemoteCalendar, get_default_event_tags
+from .events import Event, RemoteCalendar, get_default_event_tags
 
 
 class TagDirectory(Directory):
diff --git a/auquotidien/modules/announces.py b/auquotidien/modules/announces.py
index 80b54d8..a849db4 100644
--- a/auquotidien/modules/announces.py
+++ b/auquotidien/modules/announces.py
@@ -4,15 +4,15 @@ from quixote import get_publisher
 
 from quixote.html import htmlescape
 
-from qommon import _
-from qommon.storage import StorableObject
-from qommon import get_cfg, get_logger
-from qommon import errors
-from qommon import misc
-
-from qommon import emails
-from qommon.sms import SMS
-from qommon.admin.emails import EmailsDirectory
+from wcs.qommon import _
+from wcs.qommon.storage import StorableObject
+from wcs.qommon import get_cfg, get_logger
+from wcs.qommon import errors
+from wcs.qommon import misc
+
+from wcs.qommon import emails
+from wcs.qommon.sms import SMS
+from wcs.qommon.admin.emails import EmailsDirectory
 
 class AnnounceSubscription(StorableObject):
     _names = 'announce-subscriptions'
diff --git a/auquotidien/modules/announces_ui.py b/auquotidien/modules/announces_ui.py
index d916a3b..38c18ad 100644
--- a/auquotidien/modules/announces_ui.py
+++ b/auquotidien/modules/announces_ui.py
@@ -4,15 +4,15 @@ from quixote.html import htmltext, TemplateIO
 
 import wcs
 
-from qommon import _
-from qommon.backoffice.menu import html_top
-from qommon.admin.menu import command_icon
-from qommon import get_cfg
-from qommon import errors
-from qommon.form import *
-from qommon.afterjobs import AfterJob
-
-from announces import Announce, AnnounceSubscription
+from wcs.qommon import _
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon.admin.menu import command_icon
+from wcs.qommon import get_cfg
+from wcs.qommon import errors
+from wcs.qommon.form import *
+from wcs.qommon.afterjobs import AfterJob
+
+from .announces import Announce, AnnounceSubscription
 
 
 class SubscriptionDirectory(Directory):
diff --git a/auquotidien/modules/backoffice.py b/auquotidien/modules/backoffice.py
index 5e9549c..8a17e85 100644
--- a/auquotidien/modules/backoffice.py
+++ b/auquotidien/modules/backoffice.py
@@ -4,16 +4,16 @@ from quixote import get_publisher, redirect
 from quixote.directory import Directory
 from quixote.html import TemplateIO, htmltext
 
-from qommon import _
-from qommon.publisher import get_publisher_class
+from wcs.qommon import _
+from wcs.qommon.publisher import get_publisher_class
 
 import wcs.backoffice.management
 import wcs.root
 from wcs.categories import Category
 from wcs.formdef import FormDef
 
-from qommon import get_cfg, errors
-from qommon.form import *
+from wcs.qommon import get_cfg, errors
+from wcs.qommon.form import *
 
 CURRENT_USER = object()
 
diff --git a/auquotidien/modules/categories_admin.py b/auquotidien/modules/categories_admin.py
index 8fc3aa5..a8933cd 100644
--- a/auquotidien/modules/categories_admin.py
+++ b/auquotidien/modules/categories_admin.py
@@ -18,12 +18,12 @@ from quixote import redirect
 from quixote.directory import Directory
 from quixote.html import TemplateIO, htmltext
 
-from qommon import _
-from qommon import misc
+from wcs.qommon import _
+from wcs.qommon import misc
 from wcs.categories import Category
-from qommon.form import *
-from qommon.backoffice.menu import html_top
-from qommon.admin.menu import command_icon, error_page
+from wcs.qommon.form import *
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon.admin.menu import command_icon, error_page
 import wcs.admin.categories
 
 class CategoryUI:
diff --git a/auquotidien/modules/clicrdv.py b/auquotidien/modules/clicrdv.py
index f718da9..b850f28 100644
--- a/auquotidien/modules/clicrdv.py
+++ b/auquotidien/modules/clicrdv.py
@@ -10,10 +10,10 @@ except ImportError:
 import time
 import vobject
 
-from qommon import _
-from qommon import get_cfg
-from qommon.misc import format_time
-from qommon.form import *
+from wcs.qommon import _
+from wcs.qommon import get_cfg
+from wcs.qommon.misc import format_time
+from wcs.qommon.form import *
 
 from wcs.data_sources import register_data_source_function
 from wcs.formdata import Evolution
diff --git a/auquotidien/modules/connectors.py b/auquotidien/modules/connectors.py
index 271312e..bfd89c6 100644
--- a/auquotidien/modules/connectors.py
+++ b/auquotidien/modules/connectors.py
@@ -1,2 +1,2 @@
-import clicrdv
-import abelium_domino_workflow
+from . import clicrdv
+from . import abelium_domino_workflow
diff --git a/auquotidien/modules/events_ui.py b/auquotidien/modules/events_ui.py
index 5773b76..8e87b4d 100644
--- a/auquotidien/modules/events_ui.py
+++ b/auquotidien/modules/events_ui.py
@@ -7,15 +7,15 @@ from quixote.html import TemplateIO, htmltext
 import wcs
 import wcs.admin.root
 
-from qommon import _
-from qommon.backoffice.menu import html_top
-from qommon.admin.menu import command_icon
-from qommon import get_cfg
-from qommon import errors, misc
-from qommon.form import *
-from qommon.misc import strftime
-
-from events import Event, RemoteCalendar, get_default_event_tags
+from wcs.qommon import _
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon.admin.menu import command_icon
+from wcs.qommon import get_cfg
+from wcs.qommon import errors, misc
+from wcs.qommon.form import *
+from wcs.qommon.misc import strftime
+
+from .events import Event, RemoteCalendar, get_default_event_tags
 
 
 
diff --git a/auquotidien/modules/formpage.py b/auquotidien/modules/formpage.py
index 7905e84..b9ed994 100644
--- a/auquotidien/modules/formpage.py
+++ b/auquotidien/modules/formpage.py
@@ -7,13 +7,13 @@ import os
 import wcs
 import wcs.forms.root
 import wcs.forms.preview
-from qommon import _
-from qommon import template
-from qommon import errors
-from qommon.form import *
+from wcs.qommon import _
+from wcs.qommon import template
+from wcs.qommon import errors
+from wcs.qommon.form import *
 from wcs.roles import logged_users_role
 
-from qommon import emails
+from wcs.qommon import emails
 
 OldFormPage = wcs.forms.root.FormPage
 
diff --git a/auquotidien/modules/links_ui.py b/auquotidien/modules/links_ui.py
index cccf59b..2be4f9a 100644
--- a/auquotidien/modules/links_ui.py
+++ b/auquotidien/modules/links_ui.py
@@ -5,14 +5,14 @@ from quixote.html import TemplateIO, htmltext
 import wcs
 import wcs.admin.root
 
-from qommon import _
-from qommon import errors
-from qommon.form import *
-from qommon.backoffice.menu import html_top
-from qommon.admin.menu import command_icon
-from qommon import get_cfg
-
-from links import Link
+from wcs.qommon import _
+from wcs.qommon import errors
+from wcs.qommon.form import *
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon.admin.menu import command_icon
+from wcs.qommon import get_cfg
+
+from .links import Link
 
 
 class LinkDirectory(Directory):
diff --git a/auquotidien/modules/myspace.py b/auquotidien/modules/myspace.py
index 1b26cb3..c0548d3 100644
--- a/auquotidien/modules/myspace.py
+++ b/auquotidien/modules/myspace.py
@@ -10,25 +10,24 @@ from quixote.directory import AccessControlled, Directory
 from quixote.html import TemplateIO, htmltext
 from quixote.util import StaticFile, FileStream
 
-from qommon import _
-from qommon import template
-from qommon.form import *
-from qommon import get_cfg, get_logger
-from qommon import errors
+from wcs.qommon import _
+from wcs.qommon import template
+from wcs.qommon.form import *
+from wcs.qommon import get_cfg, get_logger
+from wcs.qommon import errors
 from wcs.api import get_user_from_api_query_string
 
-import qommon.ident.password
-from qommon.ident.password_accounts import PasswordAccount
+import wcs.qommon.ident.password
+from wcs.qommon.ident.password_accounts import PasswordAccount
 
 from wcs.qommon.admin.texts import TextsDirectory
 
 from wcs.formdef import FormDef
 import wcs.myspace
-import root
 
-from announces import AnnounceSubscription
-from strongbox import StrongboxItem, StrongboxType
-from payments import Invoice, Regie, is_payment_supported
+from .announces import AnnounceSubscription
+from .strongbox import StrongboxItem, StrongboxType
+from .payments import Invoice, Regie, is_payment_supported
 
 class MyInvoicesDirectory(Directory):
     _q_exports = ['']
@@ -506,6 +505,7 @@ class MyspaceDirectory(wcs.myspace.MyspaceDirectory):
 
         if user_forms:
             r += htmltext('<h3 id="my-forms">%s</h3>') % _('My Forms')
+            from . import root
             r += root.FormsRootDirectory().user_forms(user_forms)
 
         return r.getvalue()
@@ -601,7 +601,7 @@ class MyspaceDirectory(wcs.myspace.MyspaceDirectory):
             return redirect('.')
 
         if form.is_submitted() and not form.has_errors():
-            qommon.ident.password.check_password(form, 'new_password')
+            wcs.qommon.ident.password.check_password(form, 'new_password')
             new_password = form.get_widget('new_password').parse()
             new2_password = form.get_widget('new2_password').parse()
             if new_password != new2_password:
diff --git a/auquotidien/modules/payments.py b/auquotidien/modules/payments.py
index b7d1316..b6d97a6 100644
--- a/auquotidien/modules/payments.py
+++ b/auquotidien/modules/payments.py
@@ -21,12 +21,12 @@ try:
 except ImportError:
     pass
 
-from qommon import _
-from qommon import errors, get_logger, get_cfg, emails
-from qommon.storage import StorableObject
-from qommon.form import htmltext, StringWidget, TextWidget, SingleSelectWidget, \
+from wcs.qommon import _
+from wcs.qommon import errors, get_logger, get_cfg, emails
+from wcs.qommon.storage import StorableObject
+from wcs.qommon.form import htmltext, StringWidget, TextWidget, SingleSelectWidget, \
     WidgetDict
-from qommon.misc import simplify
+from wcs.qommon.misc import simplify
 
 from wcs.formdef import FormDef
 from wcs.formdata import Evolution
diff --git a/auquotidien/modules/payments_ui.py b/auquotidien/modules/payments_ui.py
index e9ec149..24f0118 100644
--- a/auquotidien/modules/payments_ui.py
+++ b/auquotidien/modules/payments_ui.py
@@ -12,14 +12,14 @@ import wcs
 import wcs.admin.root
 from wcs.formdef import FormDef
 
-from qommon import _
-from qommon import errors, misc, template, get_logger
-from qommon.form import *
-from qommon.admin.emails import EmailsDirectory
-from qommon.backoffice.menu import html_top
-from qommon import get_cfg
-
-from payments import (eopayment, Regie, is_payment_supported, Invoice,
+from wcs.qommon import _
+from wcs.qommon import errors, misc, template, get_logger
+from wcs.qommon.form import *
+from wcs.qommon.admin.emails import EmailsDirectory
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon import get_cfg
+
+from .payments import (eopayment, Regie, is_payment_supported, Invoice,
         Transaction, notify_paid_invoice)
 
 from wcs.qommon.admin.texts import TextsDirectory
diff --git a/auquotidien/modules/root.py b/auquotidien/modules/root.py
index 50b040f..af5e24f 100644
--- a/auquotidien/modules/root.py
+++ b/auquotidien/modules/root.py
@@ -2,6 +2,7 @@ from quixote import get_publisher, get_response, get_request, redirect, get_sess
 from quixote.directory import Directory
 from quixote.html import TemplateIO, htmltext
 
+from wcs.qommon import _
 from wcs.qommon.misc import get_variadic_url, simplify
 
 import os
@@ -17,43 +18,42 @@ except ImportError:
 import wcs
 import wcs.root
 import qommon
-from qommon import _
-from qommon import get_cfg, get_logger
-from qommon import template
-from qommon import errors
-from qommon.form import *
-from qommon import logger
+from wcs.qommon import get_cfg, get_logger
+from wcs.qommon import template
+from wcs.qommon import errors
+from wcs.qommon.form import *
+from wcs.qommon import logger
 from wcs.roles import logged_users_role
 
-from qommon import emails
-from qommon.sms import SMS
+from wcs.qommon import emails
+from wcs.qommon.sms import SMS
 from wcs.categories import Category
 from wcs.formdef import FormDef
 from wcs.data_sources import NamedDataSource
-from qommon.tokens import Token
-from qommon.admin.emails import EmailsDirectory
+from wcs.qommon.tokens import Token
+from wcs.qommon.admin.emails import EmailsDirectory
 from wcs.qommon.admin.texts import TextsDirectory
 
-from links import Link
-from announces import Announce, AnnounceSubscription
-from myspace import MyspaceDirectory
-from agenda import AgendaDirectory
-from events import Event, get_default_event_tags
-from payments import PublicPaymentDirectory
-from payments_ui import InvoicesDirectory
+from .links import Link
+from .announces import Announce, AnnounceSubscription
+from .myspace import MyspaceDirectory
+from .agenda import AgendaDirectory
+from .events import Event, get_default_event_tags
+from .payments import PublicPaymentDirectory
+from .payments_ui import InvoicesDirectory
 
-import admin
+from . import admin
 
 import wcs.forms.root
 from wcs.workflows import Workflow
 from wcs.forms.preview import PreviewDirectory
 
-from saml2 import Saml2Directory
+from .saml2 import Saml2Directory
 
 OldRootDirectory = wcs.root.RootDirectory
 
-import qommon.ident.password
-import qommon.ident.idp
+import wcs.qommon.ident.password
+import wcs.qommon.ident.idp
 
 
 def category_get_homepage_position(self):
@@ -646,7 +646,7 @@ class AlternateRegisterDirectory(OldRegisterDirectory):
         else:
             method = 'password'
 
-        return qommon.ident.register(method)
+        return wcs.qommon.ident.register(method)
 
 OldLoginDirectory = wcs.root.LoginDirectory
 
@@ -685,7 +685,7 @@ class AlternateLoginDirectory(OldLoginDirectory):
         if len(ident_methods) == 1:
             method = ident_methods[0]
             try:
-                return qommon.ident.login(method)
+                return wcs.qommon.ident.login(method)
             except KeyError:
                 get_logger().error('failed to login with method %s' % method)
                 return errors.TraversalError()
@@ -702,7 +702,7 @@ class AlternateLoginDirectory(OldLoginDirectory):
             form.add(PasswordWidget, 'password', title = _('Password'), size=25, required=True)
             form.add_submit('submit', _('Connect'))
             if form.is_submitted() and not form.has_errors():
-                tmp = qommon.ident.password.MethodDirectory().login_submit(form)
+                tmp = wcs.qommon.ident.password.MethodDirectory().login_submit(form)
                 if not form.has_errors():
                     return tmp
 
diff --git a/auquotidien/modules/strongbox_ui.py b/auquotidien/modules/strongbox_ui.py
index f86a304..18702ee 100644
--- a/auquotidien/modules/strongbox_ui.py
+++ b/auquotidien/modules/strongbox_ui.py
@@ -7,13 +7,13 @@ from quixote.html import TemplateIO, htmltext
 import wcs
 import wcs.admin.root
 
-from qommon import _
-from qommon import errors, misc
-from qommon.form import *
-from qommon.backoffice.menu import html_top
-from qommon import get_cfg
+from wcs.qommon import _
+from wcs.qommon import errors, misc
+from wcs.qommon.form import *
+from wcs.qommon.backoffice.menu import html_top
+from wcs.qommon import get_cfg
 
-from strongbox import StrongboxType, StrongboxItem
+from .strongbox import StrongboxType, StrongboxItem
 
 
 
diff --git a/tests/test_admin_pages.py b/tests/test_admin_pages.py
index fcc2dee..3f39432 100644
--- a/tests/test_admin_pages.py
+++ b/tests/test_admin_pages.py
@@ -12,7 +12,7 @@ import pytest
 
 from quixote import cleanup, get_publisher
 from wcs.qommon import errors, sessions
-from qommon.ident.password_accounts import PasswordAccount
+from wcs.qommon.ident.password_accounts import PasswordAccount
 from wcs.qommon.http_request import HTTPRequest
 from wcs.qommon.template import get_current_theme
 from wcs.categories import Category
diff --git a/tests/test_backoffice_pages.py b/tests/test_backoffice_pages.py
index 95354ac..6be66bb 100644
--- a/tests/test_backoffice_pages.py
+++ b/tests/test_backoffice_pages.py
@@ -7,7 +7,7 @@ import pytest
 
 from quixote import cleanup, get_publisher
 from wcs.qommon import errors, sessions
-from qommon.ident.password_accounts import PasswordAccount
+from wcs.qommon.ident.password_accounts import PasswordAccount
 from wcs.qommon.http_request import HTTPRequest
 from wcs.qommon.template import get_current_theme
 from wcs.categories import Category
diff --git a/tests/test_user_pages.py b/tests/test_user_pages.py
index ebad7e9..25a8736 100644
--- a/tests/test_user_pages.py
+++ b/tests/test_user_pages.py
@@ -7,7 +7,7 @@ import pytest
 
 from quixote import cleanup, get_publisher
 from wcs.qommon import errors, sessions
-from qommon.ident.password_accounts import PasswordAccount
+from wcs.qommon.ident.password_accounts import PasswordAccount
 from wcs.qommon.http_request import HTTPRequest
 from wcs.qommon.template import get_current_theme
 from wcs.categories import Category
diff --git a/tests/utilities.py b/tests/utilities.py
index b81f507..364a6e3 100644
--- a/tests/utilities.py
+++ b/tests/utilities.py
@@ -6,7 +6,7 @@ from webtest import TestApp
 from quixote import cleanup, get_publisher
 from django.conf import settings
 
-from qommon.publisher import set_publisher_class
+from wcs.qommon.publisher import set_publisher_class
 import wcs
 import wcs.wsgi
 from wcs.qommon.http_request import HTTPRequest
-- 
2.23.0

