Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
web-starter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0054706a
authored
Apr 01, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Gunakan register() ketimbang ZopeTransactionExtension()
1 parent
7c3c0421
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
40 deletions
CHANGES.txt
README.rst
setup.py
web_starter/models/__init__.py
CHANGES.txt
View file @
0054706
0.1.5 2020-04-01
----------------
- Mengganti ZopeTransactionExtension() dengan register().
- Tidak perlu lagi setup.py develop-use-pip. Sebagai gantinya gunakan pip
install -e .
0.1.4 2019-02-01
----------------
- Versi otomatis sesuai CHANGES.txt.
...
...
README.rst
View file @
0054706
...
...
@@ -15,7 +15,7 @@ Upgrade packaging tools::
Install required package::
$ ../env/bin/p
ython setup.py develop-use-pip
$ ../env/bin/p
ip install -e .
Copy configuration file::
...
...
setup.py
View file @
0054706
...
...
@@ -32,12 +32,9 @@ requires = [
'deform'
,
'pyramid_beaker'
,
'pyramid_mailer'
,
# 'opensipkd-jsonrpc @ git+https://git.opensipkd.com/sugiana/opensipkd-jsonrpc',
]
customs_require
=
[
# 'http://vpn.opensipkd.com/2019/01/opensipkd-jsonrpc-0.1.tgz',
]
tests_require
=
[
'WebTest >= 1.3.1'
,
# py3 compat
'pytest'
,
...
...
@@ -45,38 +42,6 @@ tests_require = [
]
def
run
(
cmd
):
if
subprocess
.
call
(
cmd
)
!=
0
:
sys
.
exit
()
def
pip_install
(
package
,
upgrade
=
False
):
cmd
=
[
pip
,
'install'
]
if
upgrade
:
cmd
+=
[
'--upgrade'
]
if
sys
.
argv
[
2
:]:
option
=
sys
.
argv
[
2
]
# Bisa untuk proxy
cmd
+=
[
option
]
cmd
+=
[
package
]
run
(
cmd
)
if
sys
.
argv
[
1
:]
and
sys
.
argv
[
1
]
==
'develop-use-pip'
:
bin_
=
os
.
path
.
split
(
sys
.
executable
)[
0
]
pip
=
os
.
path
.
join
(
bin_
,
'pip'
)
pip_install
(
'pip'
,
True
)
pip_install
(
'setuptools'
,
True
)
requires_
=
requires
+
customs_require
for
package
in
requires_
:
if
sys
.
argv
[
2
:]:
cmd
=
[
pip
,
'install'
,
sys
.
argv
[
2
],
package
]
else
:
cmd
=
[
pip
,
'install'
,
package
]
run
(
cmd
)
cmd
=
[
sys
.
executable
,
sys
.
argv
[
0
],
'develop'
]
subprocess
.
call
(
cmd
)
sys
.
exit
()
setup
(
name
=
'web_starter'
,
version
=
version
,
...
...
web_starter/models/__init__.py
View file @
0054706
...
...
@@ -3,11 +3,13 @@ from sqlalchemy.orm import (
scoped_session
,
)
from
sqlalchemy.ext.declarative
import
declarative_base
from
zope.sqlalchemy
import
ZopeTransactionExtension
import
zope.sqlalchemy
DBSession
=
scoped_session
(
sessionmaker
(
extension
=
ZopeTransactionExtension
()))
session_factory
=
sessionmaker
()
DBSession
=
scoped_session
(
session_factory
)
zope
.
sqlalchemy
.
register
(
DBSession
)
Base
=
declarative_base
()
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment