-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.py
More file actions
28 lines (23 loc) · 775 Bytes
/
common.py
File metadata and controls
28 lines (23 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
import os
from . import settings
from ..planetstore.common import logger
try:
from ..planetstore.models import db
except ImportError:
raise
from py4web import DAL
# connect to db
db = DAL(settings.DB_URI,
folder=settings.DB_FOLDER, pool_size=settings.DB_POOL_SIZE,
lazy_tables=False, migrate=False, fake_migrate=False,
check_reserved=False
)
from geopbf import settings as gpbfsettings
if hasattr(gpbfsettings, "SHARE_DB") and gpbfsettings.SHARE_DB:
from geopbf.pbfpp import common as pbfcommon
pbfcommon.db = db
from geopbf.pbfpp import Prototizerpp as PbfPrototizer
from kilimanjaro.frameworks.py4web.controller import WebWrapper
webWrapper = WebWrapper()
pbfWebWrapper = PbfPrototizer()