Fix: InitDB Console script added to setup.py
This commit is contained in:
@ -139,22 +139,40 @@ def main(argv=sys.argv):
|
|||||||
for cost_centre in cost_centres:
|
for cost_centre in cost_centres:
|
||||||
dbsession.add(cost_centre)
|
dbsession.add(cost_centre)
|
||||||
|
|
||||||
accounts = [Account(1, 'All Purchases', 2, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
|
accounts = [
|
||||||
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), True),
|
Account(
|
||||||
Account(1, 'Local Purchase', 9, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
1, 'All Purchases', 2, False, True, False, uuid.UUID('7b845f95-dfef-fa4a-897c-f0baf15284a3'),
|
||||||
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), True),
|
uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490'), 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(
|
||||||
Account(2, 'ESI/PF - Expense', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
1, 'Local Purchase', 9, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||||
uuid.UUID('d2a1a286-e900-764b-a1a5-9f4b00dbb940'), True),
|
uuid.UUID('d2b75912-505f-2548-9093-466dfff6a0f9'), 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(
|
||||||
Account(1, 'Staff Salary', 7, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
1, 'ESI/PF - Payable', 11, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||||
uuid.UUID('5c2b54d0-c174-004d-a0d5-92cdaadcefa7'), True),
|
uuid.UUID('42277912-cc18-854b-b134-9f4b00dba419'), True
|
||||||
Account(2, 'Service Charges', 11, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
),
|
||||||
uuid.UUID('b7eff754-e8ba-e047-ab06-9132c15c7640'), True),
|
Account(
|
||||||
Account(1, 'Suspense', 4, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
2, 'ESI/PF - Expense', 7, False, True, False, uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'),
|
||||||
uuid.UUID('3854e317-6f3b-5142-ab26-9c44d4cddd08'), True)]
|
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:
|
for account in accounts:
|
||||||
dbsession.add(account)
|
dbsession.add(account)
|
||||||
|
|||||||
7
setup.py
7
setup.py
@ -16,7 +16,7 @@ requires = [
|
|||||||
'zope.sqlalchemy',
|
'zope.sqlalchemy',
|
||||||
'SQLAlchemy',
|
'SQLAlchemy',
|
||||||
'psycopg2-binary',
|
'psycopg2-binary',
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(name='brewman',
|
setup(name='brewman',
|
||||||
version='6.0',
|
version='6.0',
|
||||||
@ -38,9 +38,10 @@ setup(name='brewman',
|
|||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
tests_require=requires,
|
tests_require=requires,
|
||||||
test_suite="brewman",
|
test_suite="brewman",
|
||||||
entry_points = """\
|
entry_points="""\
|
||||||
[paste.app_factory]
|
[paste.app_factory]
|
||||||
main = brewman:main
|
main = brewman:main
|
||||||
|
[console_scripts]
|
||||||
|
initdb = brewman.scripts.initializedb:main
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user