mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 04:24:15 +00:00
py-i2phosts-*: do imports from system-wide pyi2phosts
This commit is contained in:
parent
9efdb0dfc1
commit
0819e15db8
@ -35,8 +35,8 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.postkey.models import i2phost
|
||||
from web.lib.utils import validate_config
|
||||
from pyi2phosts.postkey.models import i2phost
|
||||
from pyi2phosts.lib.utils import validate_config
|
||||
|
||||
# validate config
|
||||
validate_config(config)
|
||||
|
@ -42,9 +42,9 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.postkey.models import i2phost
|
||||
from web.lib.utils import get_logger
|
||||
from web.lib.utils import validate_config
|
||||
from pyi2phosts.postkey.models import i2phost
|
||||
from pyi2phosts.lib.utils import get_logger
|
||||
from pyi2phosts.lib.utils import validate_config
|
||||
|
||||
# validate config
|
||||
validate_config(config)
|
||||
|
@ -41,9 +41,9 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.lib.utils import get_logger
|
||||
from web.lib.utils import validate_config
|
||||
from web.extsources.models import ExternalSource
|
||||
from pyi2phosts.lib.utils import get_logger
|
||||
from pyi2phosts.lib.utils import validate_config
|
||||
from pyi2phosts.extsources.models import ExternalSource
|
||||
|
||||
# validate config
|
||||
validate_config(config)
|
||||
|
@ -39,9 +39,9 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.postkey.models import i2phost
|
||||
from web.lib.validation import validate_hostname
|
||||
from web.lib.validation import validate_b64hash
|
||||
from pyi2phosts.postkey.models import i2phost
|
||||
from pyi2phosts.lib.validation import validate_hostname
|
||||
from pyi2phosts.lib.validation import validate_b64hash
|
||||
|
||||
# determine approve hosts or not
|
||||
if args.approve or config.as_bool('approve'):
|
||||
|
@ -43,9 +43,9 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.postkey.models import i2phost
|
||||
from web.lib.utils import get_logger
|
||||
from web.lib.utils import validate_config
|
||||
from pyi2phosts.postkey.models import i2phost
|
||||
from pyi2phosts.lib.utils import get_logger
|
||||
from pyi2phosts.lib.utils import validate_config
|
||||
|
||||
# validate config
|
||||
validate_config(config)
|
||||
|
@ -123,8 +123,8 @@ else:
|
||||
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
|
||||
sys.path.insert(1, DJANGO_PROJECT_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
|
||||
from web.lib.utils import get_logger
|
||||
from web.lib.utils import validate_config
|
||||
from pyi2phosts.lib.utils import get_logger
|
||||
from pyi2phosts.lib.utils import validate_config
|
||||
|
||||
# validate config
|
||||
validate_config(config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user