1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-22 12:34:17 +00:00

py-i2phosts-*: do imports from system-wide pyi2phosts

This commit is contained in:
Hidden Z 2010-11-03 20:28:08 +00:00
parent 9efdb0dfc1
commit 0819e15db8
6 changed files with 16 additions and 16 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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'):

View File

@ -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)

View File

@ -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)