Fix: InitDB Console script added to setup.py
This commit is contained in:
parent
29b81cbd21
commit
adb7f25c9f
@ -139,22 +139,40 @@ def main(argv=sys.argv):
|
||||
for cost_centre in cost_centres:
|
||||
dbsession.add(cost_centre)
|
||||
|
||||
accounts = [Account(1, 'All Purchases', 2, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
|
||||
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), True),
|
||||
Account(1, 'Local Purchase', 9, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), True),
|
||||
Account(1, 'ESI/PF - Payable', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('42277912-cc18-854b-b134-9f4b00dba419'), True),
|
||||
Account(2, 'ESI/PF - Expense', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('d2a1a286-e900-764b-a1a5-9f4b00dbb940'), True),
|
||||
Account(1, 'Cash in Hand', 1, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('ed2341bb-80b8-9649-90db-f9aaca183bb3'), True),
|
||||
Account(1, 'Staff Salary', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('5c2b54d0-c174-004d-a0d5-92cdaadcefa7'), True),
|
||||
Account(2, 'Service Charges', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('b7eff754-e8ba-e047-ab06-9132c15c7640'), True),
|
||||
Account(1, 'Suspense', 4, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('3854e317-6f3b-5142-ab26-9c44d4cddd08'), True)]
|
||||
accounts = [
|
||||
Account(
|
||||
1, 'All Purchases', 2, False, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
|
||||
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), True
|
||||
),
|
||||
Account(
|
||||
1, 'Local Purchase', 9, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), True
|
||||
),
|
||||
Account(
|
||||
1, 'ESI/PF - Payable', 11, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('42277912-cc18-854b-b134-9f4b00dba419'), True
|
||||
),
|
||||
Account(
|
||||
2, 'ESI/PF - Expense', 7, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('d2a1a286-e900-764b-a1a5-9f4b00dbb940'), True
|
||||
),
|
||||
Account(
|
||||
1, 'Cash in Hand', 1, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('ed2341bb-80b8-9649-90db-f9aaca183bb3'), True
|
||||
),
|
||||
Account(
|
||||
1, 'Staff Salary', 7, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('5c2b54d0-c174-004d-a0d5-92cdaadcefa7'), True
|
||||
),
|
||||
Account(
|
||||
2, 'Service Charges', 11, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('b7eff754-e8ba-e047-ab06-9132c15c7640'), True
|
||||
),
|
||||
Account(
|
||||
1, 'Suspense', 4, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||
uuid.UUID('3854e317-6f3b-5142-ab26-9c44d4cddd08'), True
|
||||
)
|
||||
]
|
||||
|
||||
for account in accounts:
|
||||
dbsession.add(account)
|
||||
|
19
setup.py
19
setup.py
@ -16,18 +16,18 @@ requires = [
|
||||
'zope.sqlalchemy',
|
||||
'SQLAlchemy',
|
||||
'psycopg2-binary',
|
||||
]
|
||||
]
|
||||
|
||||
setup(name='brewman',
|
||||
version='6.0',
|
||||
description='brewman',
|
||||
long_description=README + '\n\n' + CHANGES,
|
||||
long_description=README + '\n\n' + CHANGES,
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
"Framework :: Pyramid",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
|
||||
],
|
||||
"Programming Language :: Python",
|
||||
"Framework :: Pyramid",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
|
||||
],
|
||||
author='Tanshu',
|
||||
author_email='brewman@tanshu.com',
|
||||
url='http://tanshu.com',
|
||||
@ -38,9 +38,10 @@ setup(name='brewman',
|
||||
install_requires=requires,
|
||||
tests_require=requires,
|
||||
test_suite="brewman",
|
||||
entry_points = """\
|
||||
entry_points="""\
|
||||
[paste.app_factory]
|
||||
main = brewman:main
|
||||
[console_scripts]
|
||||
initdb = brewman.scripts.initializedb:main
|
||||
""",
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user