mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Make app names as module identifiers
- The last part of the module import path is the module name. This also becomes the Django app name. Apps names have to be unique. Hence, there is no scope for two different modules with same name but different load path to exist in the project. - Most uses of list of loaded modules are dealing with app names instead of full module load path. This is due to the fact that Django deals with app names and not module paths. - It is also somewhat clumsy to access a loaded module as we are re-importing every time to get access module. - Simplify all of the above by using app names are module identifiers and maintaing an ordered dictionary of app names to loadded modules. - Remove unused imports. - Minor styling fixes.
This commit is contained in:
32 files changed
+61
-91
No files matched your search
@@ -20,19 +20,13 @@ Plinth module for using Let's Encrypt.
|
||||
"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import json
|
||||
|
||||
from plinth import actions
|
||||
from plinth import action_utils
|
||||
from plinth import cfg
|
||||
from plinth import service as service_module
|
||||
from plinth.modules import names
|
||||
|
||||
|
||||
depends = [
|
||||
'plinth.modules.apps',
|
||||
'plinth.modules.names'
|
||||
]
|
||||
depends = ['apps', 'names']
|
||||
|
||||
service = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user