Update Project

1 parent 29b3ff3d
...@@ -14,7 +14,7 @@ pyramid.debug_notfound = true ...@@ -14,7 +14,7 @@ pyramid.debug_notfound = true
pyramid.debug_routematch = true pyramid.debug_routematch = true
pyramid.debug_templates = true pyramid.debug_templates = true
default_locale_name = id default_locale_name = id
sqlalchemy.url = postgresql://aagusti:a@localhost:5432/demo sqlalchemy.url = postgresql://aagusti:a@localhost:5432/ciamis
; pbb.url = oracle+oracledb://pbb:A@10.8.50.62:1521/simpbb ; pbb.url = oracle+oracledb://pbb:A@10.8.50.62:1521/simpbb
pbb.url = oracle://pbb:A@10.8.50.62:1521/simpbb pbb.url = oracle://pbb:A@10.8.50.62:1521/simpbb
; lib_dir = C:\app\instantclient_11_2 ; lib_dir = C:\app\instantclient_11_2
...@@ -41,7 +41,7 @@ session.type = ext:database ...@@ -41,7 +41,7 @@ session.type = ext:database
session.secret = s0s3cr3ts session.secret = s0s3cr3ts
session.cookie_expires = true session.cookie_expires = true
session.key = WhatEver session.key = WhatEver
session.url = postgresql://aagusti:a@localhost:5432/demo session.url = postgresql://aagusti:a@localhost:5432/ciamis
session.timeout = 3000 session.timeout = 3000
session.lock_dir = %(here)s/tmp session.lock_dir = %(here)s/tmp
;login_tpl = opensipkd.samsat.jabar.views:templates/login.pt ;login_tpl = opensipkd.samsat.jabar.views:templates/login.pt
...@@ -64,7 +64,7 @@ localization = English_Australia.1252 ...@@ -64,7 +64,7 @@ localization = English_Australia.1252
;center.email_password = ;center.email_password =
;center.smtp_server = ;center.smtp_server =
; ;
;#_host = http://localhost:5432/demo2 ;#_host = http://localhost:5432/ciamis2
; ;
unoconv_py = C:\Program Files\LibreOffice\program\python.exe unoconv_py = C:\Program Files\LibreOffice\program\python.exe
unoconv_bin = C:\product\venv-lates\Scripts\unoconv unoconv_bin = C:\product\venv-lates\Scripts\unoconv
...@@ -169,22 +169,22 @@ format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s ...@@ -169,22 +169,22 @@ format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
[alembic_ziggurat] [alembic_ziggurat]
script_location = ziggurat_foundations:migrations script_location = ziggurat_foundations:migrations
sqlalchemy.url = postgresql://aagusti:a@localhost:5432/demo sqlalchemy.url = postgresql://aagusti:a@localhost:5432/ciamis
# End logging configuration # End logging configuration
[alembic_base] [alembic_base]
script_location = opensipkd.base:alembic script_location = opensipkd.base:alembic
sqlalchemy.url = postgresql://aagusti:a@localhost:5432/demo sqlalchemy.url = postgresql://aagusti:a@localhost:5432/ciamis
[alembic_models] [alembic_models]
script_location = opensipkd.models:alembic script_location = opensipkd.models:alembic
sqlalchemy.url = postgresql://aagusti:a@localhost:5432/demo sqlalchemy.url = postgresql://aagusti:a@localhost:5432/ciamis
[alembic_pjdl] [alembic_pjdl]
script_location = opensipkd.pjdl.models:alembic script_location = opensipkd.pjdl.models:alembic
sqlalchemy.url = postgresql://aagusti:a@localhost:5432/demo sqlalchemy.url = postgresql://aagusti:a@localhost:5432/ciamis
[pytest] [pytest]
......
...@@ -445,9 +445,9 @@ def _set_routes1(config, app_id): ...@@ -445,9 +445,9 @@ def _set_routes1(config, app_id):
q = DBSession.query(Route).filter(Route.path != None, q = DBSession.query(Route).filter(Route.path != None,
Route.module == None, Route.status == 1) Route.module == None, Route.status == 1)
if not app_id: if not app_id:
q.filter(or_(Route.app_id == 0, None == Route.app_id)) q = q.filter(or_(Route.app_id == 0, None == Route.app_id))
else: else:
q.filter(Route.app_id == app_id) q = q.filter(Route.app_id == app_id)
for route in q: for route in q:
if route.type == 0: if route.type == 0:
...@@ -814,9 +814,22 @@ class BaseApp(): ...@@ -814,9 +814,22 @@ class BaseApp():
else: else:
if p["children"]: if p["children"]:
self.route_children(p["children"], row) self.route_children(p["children"], row)
def get_files(self, get_file, paket):
file_name = "routes.csv"
if type(get_file) == str:
my_module = importlib.import_module(get_file)
folders = os.path.dirname(my_module.__file__)
folders = os.path.dirname(folders)
file_name = os.path.join(folders, "scripts", "data", file_name)
return open(file_name, "r", encoding="utf-8")
else:
return get_file(file_name)
def route_from_csv(self, config, get_file=get_route_file, paket="opensipkd.base.views"): def route_from_csv(self, config, get_file=get_route_file, paket="opensipkd.base.views"):
with get_file("routes.csv") as f: if type(get_file) == str:
paket = get_file
with self.get_files(get_file, paket) as f:
rows = csv.DictReader(f) rows = csv.DictReader(f)
new_routes = [] new_routes = []
for row in rows: for row in rows:
......
[build-system] [build-system]
requires = ['setuptools >= 64', 'wheel'] requires = ['setuptools >= 64']
build-backend = 'setuptools.build_meta'
[tool.setuptools]
packages = ["opensipkd", "opensipkd.detable", "opensipkd.base"]
[tool.mypy]
exclude = [
'base',
'report',
'external',
'developers',
]
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"opensipkd.base.*",
"opensipkd.models.*",
"opensipkd.detable.*",
"opensipkd.jsonrpc_auth.*",
]
warn_unused_ignores = true
strict = true
[project] [project]
name = 'opensipkd-base' name = 'opensipkd-base'
...@@ -57,37 +32,32 @@ dependencies = [ ...@@ -57,37 +32,32 @@ dependencies = [
'google', 'google',
'pyjwt', 'pyjwt',
] ]
requires-python = '>= 3.8' requires-python = '>= 3.9'
authors = [ authors = [
{name='Agus Gustiana', email='aa.gustiana@gmail.com'}, {name='Agus Gustiana', email='aa.gustiana@gmail.com'},
{ email = "opensipkd@gmail.com" },] ]
maintainers = [ maintainers = [
{ name = "Ari", email = "ariagungprasetiyo@gmail.com" }, {name="Ari", email="ariagungprasetiyo@gmail.com"},
{ name = "Owo Sugiana", email = "sugiana@gmail.com" }] {name="Owo Sugiana", email="sugiana@gmail.com"},
]
description = 'Framwork Aplikasi openSIPKD' description = 'Framework Aplikasi openSIPKD'
readme = 'README.rst' readme = 'README.rst'
license = {text='Apache Software License'} license = {text='Apache Software License'}
keywords = ["openSIPKD"]
classifiers = [ classifiers = [
#'Development Status :: 4 - Beta", 'Development Status :: 4 - Beta',
#'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
#'Operating System :: OS Independent', 'Operating System :: OS Independent',
#'Framework :: Pylons', 'Framework :: Pylons',
#'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP',
#'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
] ]
[project.optional-dependencies]
dev = [
'pyramid_debugtoolbar',
'pytest', 'webtest']
[project.entry-points."paste.app_factory"] [project.entry-points."paste.app_factory"]
main = 'opensipkd.base:main' main = 'opensipkd.base:main'
[tool.setuptools.packages.find]
include = ['opensipkd.*']
[project.scripts] [project.scripts]
initialize_opensipkd_db = 'opensipkd.base.scripts.initializedb:main' initialize_opensipkd_db = 'opensipkd.base.scripts.initializedb:main'
import_log = 'opensipkd.base.scripts.import_log:main' import_log = 'opensipkd.base.scripts.import_log:main'
\ No newline at end of file \ No newline at end of file
[build-system]
requires = ['setuptools >= 64', 'wheel']
build-backend = 'setuptools.build_meta'
[tool.setuptools]
packages = ["opensipkd", "opensipkd.detable", "opensipkd.base"]
[tool.mypy]
exclude = [
'base',
'report',
'external',
'developers',
]
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"opensipkd.base.*",
"opensipkd.models.*",
"opensipkd.detable.*",
"opensipkd.jsonrpc_auth.*",
]
warn_unused_ignores = true
strict = true
[project]
name = 'opensipkd-base'
version = '4.2'
dependencies = [
'sqlalchemy',
'colander',
'pyramid',
'pyramid_tm',
"pyramid_beaker",
"pyramid_mailer",
'SQLAlchemy',
'transaction',
'waitress',
'pyramid_beaker',
'pyramid_mailer',
'ziggurat-foundations',
'zope.sqlalchemy',
'pytz',
'deform',
'psycopg2-binary',
'pyramid_chameleon',
'pyramid_rpc',
'requests',
'sqlalchemy-datatables',
'py3o.template',
'wheezy.captcha',
'icecream',
'google-api-python-client',
'google',
'pyjwt',
]
requires-python = '>= 3.8'
authors = [
{name='Agus Gustiana', email='aa.gustiana@gmail.com'},
{ email = "opensipkd@gmail.com" },]
maintainers = [
{ name = "Ari", email = "ariagungprasetiyo@gmail.com" },
{ name = "Owo Sugiana", email = "sugiana@gmail.com" }]
description = 'Framwork Aplikasi openSIPKD'
readme = 'README.rst'
license = {text='Apache Software License'}
keywords = ["openSIPKD"]
classifiers = [
#'Development Status :: 4 - Beta",
#'Programming Language :: Python :: 3',
#'Operating System :: OS Independent',
#'Framework :: Pylons',
#'Topic :: Internet :: WWW/HTTP',
#'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
]
[project.optional-dependencies]
dev = [
'pyramid_debugtoolbar',
'pytest', 'webtest']
[project.entry-points."paste.app_factory"]
main = 'opensipkd.base:main'
[project.scripts]
initialize_opensipkd_db = 'opensipkd.base.scripts.initializedb:main'
import_log = 'opensipkd.base.scripts.import_log:main'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!