]>
asedeno.scripts.mit.edu Git - bluechips.git/log
Scott Torborg [Mon, 2 Nov 2009 20:51:22 +0000 (10:51 -1000)]
brought up to date with latest sqlalchemy conventions
Evan Broder [Tue, 28 Jul 2009 04:35:00 +0000 (21:35 -0700)]
Merge branch 'master' into fix-authz
Evan Broder [Tue, 28 Jul 2009 04:33:54 +0000 (21:33 -0700)]
When settling debts, always re-sort the debt list after every
transaction is calculated.
Without doing this, certain cases can result in more transfers than
are actually necessary.
Evan Broder [Mon, 8 Jun 2009 04:16:38 +0000 (21:16 -0700)]
Merge branch 'master' into fix-authz
Evan Broder [Mon, 8 Jun 2009 04:16:06 +0000 (21:16 -0700)]
When ordering expenditures and transfers, by default order by the time
they were entered within a single day.
Evan Broder [Sun, 7 Jun 2009 17:28:23 +0000 (10:28 -0700)]
Add a note in the deployment.ini template about the "MySQL server has
gone away" bug.
Evan Broder [Sun, 7 Jun 2009 17:26:25 +0000 (10:26 -0700)]
Revert "Fix the random 403 bug." Trying to pass the option in
bluechips.config.environment didn't seem to be taking effect, so
instead I'm going to change the deployment.ini template to have a
useful note about the issue.
This reverts commit
22bb3f405f829419b9f598ab5bbf3e534b623746 .
Evan Broder [Thu, 4 Jun 2009 06:56:35 +0000 (23:56 -0700)]
Fix the random 403 bug.
403s were being caused by the "MySQL server has gone away" bug in
MySQLdb, so pass the pool_recycle argument to keep that from
triggering.
Evan Broder [Wed, 3 Jun 2009 00:15:08 +0000 (17:15 -0700)]
Try a different approach to catching non-existant users.
Maybe this one will actually log useful errors instead of random 403s.
Evan Broder [Sun, 31 May 2009 18:48:51 +0000 (11:48 -0700)]
Add a .gitignore.
Evan Broder [Sun, 31 May 2009 04:25:13 +0000 (21:25 -0700)]
Add a test for negative expenditures.
Evan Broder [Sun, 31 May 2009 04:05:25 +0000 (21:05 -0700)]
Allow for negative expenditures.
Evan Broder [Sat, 30 May 2009 16:12:58 +0000 (09:12 -0700)]
When splitting up an expenditure, if subtracting pennies instead of
adding them, be sure to count them up correctly.
Evan Broder [Sat, 30 May 2009 05:52:40 +0000 (22:52 -0700)]
Why don't we stick that code block in only once?
Evan Broder [Sat, 30 May 2009 05:48:30 +0000 (22:48 -0700)]
Fix a long-standing bug in handing splits.
Evan Broder [Sat, 25 Apr 2009 23:35:42 +0000 (19:35 -0400)]
Apparently authkit.authorize still thinks it needs authkit.authenticate.
It's wrong. Let's convince it as such.
Evan Broder [Sat, 13 Sep 2008 03:24:16 +0000 (03:24 +0000)]
Don't add debits for users who have a share of 0
Evan Broder [Fri, 25 Jul 2008 07:09:05 +0000 (07:09 +0000)]
Fix wrong exception in split edit template
Evan Broder [Fri, 25 Jul 2008 07:07:19 +0000 (07:07 +0000)]
Add a link to the split edit page from the expenditure edit page
Evan Broder [Fri, 25 Jul 2008 07:07:10 +0000 (07:07 +0000)]
Add a form to change an expenditure's split
Evan Broder [Fri, 25 Jul 2008 07:07:02 +0000 (07:07 +0000)]
Fix indentation on base template
Evan Broder [Fri, 25 Jul 2008 07:06:55 +0000 (07:06 +0000)]
Move common title generating code into base template
Evan Broder [Fri, 25 Jul 2008 05:19:59 +0000 (05:19 +0000)]
Make navigation links work with edit pages
Evan Broder [Fri, 25 Jul 2008 04:26:32 +0000 (04:26 +0000)]
Add edit links for transfers and expenditures
Evan Broder [Fri, 25 Jul 2008 04:26:26 +0000 (04:26 +0000)]
Add edit function for transfers
Evan Broder [Fri, 25 Jul 2008 04:26:17 +0000 (04:26 +0000)]
Add edit function for expenditures
Evan Broder [Fri, 25 Jul 2008 04:26:08 +0000 (04:26 +0000)]
Add split function that redistributes old percentages with new total
Evan Broder [Fri, 25 Jul 2008 04:26:01 +0000 (04:26 +0000)]
Add ToscaWidgets' valid function for when you don't want the decorator
Evan Broder [Fri, 25 Jul 2008 04:25:55 +0000 (04:25 +0000)]
Move title into controller to encourage template reuse
Evan Broder [Fri, 25 Jul 2008 02:07:57 +0000 (02:07 +0000)]
Stop lazily loading anything to fix double-counting of transfers
Evan Broder [Fri, 25 Jul 2008 02:07:51 +0000 (02:07 +0000)]
Add an __init__ method for Transfer objects
Evan Broder [Fri, 25 Jul 2008 02:07:45 +0000 (02:07 +0000)]
Add an __init__ method for Subitem objects
Evan Broder [Fri, 25 Jul 2008 02:07:38 +0000 (02:07 +0000)]
Add and use an __init__ method for Expenditure objects
Evan Broder [Fri, 25 Jul 2008 02:07:30 +0000 (02:07 +0000)]
Add and use an __init__ method for Split objects
Evan Broder [Fri, 25 Jul 2008 02:07:23 +0000 (02:07 +0000)]
Add and use an __init__ method for User objects
Evan Broder [Sun, 20 Jul 2008 14:53:35 +0000 (14:53 +0000)]
Fix a few of the more sane pylint warnings
Evan Broder [Sun, 20 Jul 2008 14:53:17 +0000 (14:53 +0000)]
Make the distribution test actually do something
Evan Broder [Sun, 20 Jul 2008 14:53:07 +0000 (14:53 +0000)]
Add another test for testing uneven splits
Evan Broder [Sun, 20 Jul 2008 14:52:54 +0000 (14:52 +0000)]
Use self.assert* functions in tests instead of normal assertion
Evan Broder [Sat, 19 Jul 2008 18:45:59 +0000 (18:45 +0000)]
Test Currency.__str_no_dollar__
Evan Broder [Sat, 19 Jul 2008 18:45:50 +0000 (18:45 +0000)]
Changing location of minus sign in Currency broke __str_no_dollar__
Evan Broder [Sat, 19 Jul 2008 17:53:09 +0000 (17:53 +0000)]
Add tests for Currency string conversion
Evan Broder [Sat, 19 Jul 2008 17:53:00 +0000 (17:53 +0000)]
Move negative sign for Currency
Evan Broder [Sat, 19 Jul 2008 17:52:52 +0000 (17:52 +0000)]
SuperSubclass isn't smart enough to do the __new__ correctly
Evan Broder [Sat, 19 Jul 2008 17:52:42 +0000 (17:52 +0000)]
Pull more things into their own tests for Currency
Evan Broder [Sat, 19 Jul 2008 17:52:33 +0000 (17:52 +0000)]
Use the right model module in package-level test setUp
Apparently other imports can override the one in test/__init__.py
Evan Broder [Sat, 19 Jul 2008 17:52:26 +0000 (17:52 +0000)]
More tests for the Currency type
Evan Broder [Sat, 19 Jul 2008 17:52:17 +0000 (17:52 +0000)]
Add an __init__.py for tests/model/
Evan Broder [Sat, 19 Jul 2008 10:05:58 +0000 (10:05 +0000)]
Start writing tests for Currency objects
Evan Broder [Sat, 19 Jul 2008 10:05:50 +0000 (10:05 +0000)]
Split tests aren't testing a controller, so don't use TestController
Evan Broder [Sat, 19 Jul 2008 10:05:40 +0000 (10:05 +0000)]
Make Currency objects (and others using the SuperSubclass) immutable
Evan Broder [Sat, 19 Jul 2008 10:05:31 +0000 (10:05 +0000)]
Test some predefined expenditures
Evan Broder [Sat, 19 Jul 2008 10:05:21 +0000 (10:05 +0000)]
Support specifying how many users/expenditures to create
Evan Broder [Sat, 19 Jul 2008 05:05:11 +0000 (05:05 +0000)]
Move genereically useful functions out of specific modules
Evan Broder [Sat, 19 Jul 2008 05:05:01 +0000 (05:05 +0000)]
Restructure to accurately reflect parent-child relations
Also cascade deletes
Evan Broder [Sat, 19 Jul 2008 05:04:52 +0000 (05:04 +0000)]
Attempt to test that splits are distributed evenly
Evan Broder [Fri, 18 Jul 2008 17:15:43 +0000 (17:15 +0000)]
Rename setup and teardown functions in test suite
setUp seems to be more correct than setup
Evan Broder [Fri, 18 Jul 2008 17:15:36 +0000 (17:15 +0000)]
Don't multiple the pennies that need to be distributed by 100
Evan Broder [Fri, 18 Jul 2008 17:15:28 +0000 (17:15 +0000)]
Start writing tests for splits
* bluechips.tests.split.test_random:TestSplitRandom.test_splitTotal
currently fails, which means the system currently leaks money
Evan Broder [Fri, 18 Jul 2008 17:15:19 +0000 (17:15 +0000)]
Keep the entered_time fields as UTC stamps instead of local
Evan Broder [Fri, 18 Jul 2008 17:15:00 +0000 (17:15 +0000)]
Add some documentation to the Currency type
Evan Broder [Fri, 18 Jul 2008 07:51:47 +0000 (07:51 +0000)]
Switch from using Decimal to using a new Currency class
* Include the SmartSubclass metaclass for making an object that is
itself but acts like something else
* Derive a Currency class from that
* Use it EVERYWHERE!
Evan Broder [Fri, 18 Jul 2008 04:03:52 +0000 (04:03 +0000)]
Don't import meta.Session directly; import meta instead
Evan Broder [Fri, 18 Jul 2008 02:59:03 +0000 (02:59 +0000)]
Move functions for splitting expenditures into Expenditure model
Evan Broder [Fri, 18 Jul 2008 02:58:54 +0000 (02:58 +0000)]
Move model classes into their own files
Evan Broder [Fri, 18 Jul 2008 02:58:45 +0000 (02:58 +0000)]
Make the built-in tests actually pass
Evan Broder [Fri, 18 Jul 2008 02:58:36 +0000 (02:58 +0000)]
"True" is not a valid where clause for sqlite
Evan Broder [Fri, 18 Jul 2008 02:58:28 +0000 (02:58 +0000)]
Tests against an in-memory database don't work; make a real one
Evan Broder [Thu, 17 Jul 2008 18:31:49 +0000 (18:31 +0000)]
Use the fake authentication in the testing config
Evan Broder [Thu, 17 Jul 2008 18:31:34 +0000 (18:31 +0000)]
Build in fakeauth into the fake authkit.authenticate module
Evan Broder [Thu, 17 Jul 2008 17:47:49 +0000 (17:47 +0000)]
We're not i18ning anything else right now; drop the one place we are
Evan Broder [Thu, 17 Jul 2008 17:47:39 +0000 (17:47 +0000)]
Use the fake auth middleware if testing (in test.ini)
Evan Broder [Thu, 17 Jul 2008 17:47:29 +0000 (17:47 +0000)]
Create a fake auth midleware component for testing
Evan Broder [Thu, 17 Jul 2008 17:47:19 +0000 (17:47 +0000)]
Only display 10 most recent of each type of transaction on home page
Evan Broder [Thu, 17 Jul 2008 17:47:07 +0000 (17:47 +0000)]
Add navigation bar
Evan Broder [Thu, 17 Jul 2008 17:46:59 +0000 (17:46 +0000)]
Display user's transactions on home page
Evan Broder [Thu, 17 Jul 2008 17:46:46 +0000 (17:46 +0000)]
Add history controller to display old transactions
Evan Broder [Thu, 17 Jul 2008 17:46:32 +0000 (17:46 +0000)]
Reconfigure some models for convenience
* Add a default sort on expenditures and transfers, since that's
almost always what's wanted
* Eagerly load users related to expenditures and transfers, since
it's cheap and generally wanted
Evan Broder [Wed, 16 Jul 2008 08:18:04 +0000 (08:18 +0000)]
Display all totals with currency formatting
Evan Broder [Wed, 16 Jul 2008 08:16:38 +0000 (08:16 +0000)]
Display some aggregate numbers on spending
Evan Broder [Wed, 16 Jul 2008 07:51:26 +0000 (07:51 +0000)]
Transfers weren't being totaled correctly
Evan Broder [Wed, 16 Jul 2008 07:36:07 +0000 (07:36 +0000)]
Use the correct object for datetime.now
This is why my commit bit should automatically be revoked if I'm in a
hurry
Evan Broder [Wed, 16 Jul 2008 07:34:53 +0000 (07:34 +0000)]
Change from using sa.func.now to datetime.now
Evan Broder [Wed, 16 Jul 2008 07:09:24 +0000 (07:09 +0000)]
Change lib/totals.py:debt to use new convention for add_column
Evan Broder [Wed, 16 Jul 2008 07:04:56 +0000 (07:04 +0000)]
And output the outstanding debts on the home page
Evan Broder [Wed, 16 Jul 2008 07:04:46 +0000 (07:04 +0000)]
Only export the debt and settle functions in lib/totals.py
Evan Broder [Wed, 16 Jul 2008 07:04:39 +0000 (07:04 +0000)]
Expect the debts as an argument in settle (for efficiency)
Evan Broder [Wed, 16 Jul 2008 07:04:32 +0000 (07:04 +0000)]
Add bluechips.lib.totals:settle - outputs transfers needed to settle
Shamelessly stolen from the account.pl that Nelson Elhage wrote for our 2008
summer apartment, settle returns the minimal list of transfers amongst residents
needed to settle the books.
Evan Broder [Wed, 16 Jul 2008 07:04:25 +0000 (07:04 +0000)]
Start working towards calculating the system state - get total debts
Evan Broder [Wed, 16 Jul 2008 07:04:18 +0000 (07:04 +0000)]
Actually set a meaningful value for model/__init__.py:__all__
Evan Broder [Wed, 16 Jul 2008 05:30:06 +0000 (05:30 +0000)]
Import NotAuthenticatedError for permissions checks
Evan Broder [Wed, 16 Jul 2008 05:23:02 +0000 (05:23 +0000)]
Replace index page with index action of status controller
Evan Broder [Wed, 16 Jul 2008 05:06:15 +0000 (05:06 +0000)]
Change spend controller to use flash messages
Evan Broder [Wed, 16 Jul 2008 05:06:05 +0000 (05:06 +0000)]
Remember to commit when entering new transfers
Evan Broder [Wed, 16 Jul 2008 05:05:53 +0000 (05:05 +0000)]
When entering a split, only delete old splits from the same expense
Evan Broder [Wed, 16 Jul 2008 05:05:45 +0000 (05:05 +0000)]
Add code to commit new transfers, set a flash message, and redirect
Evan Broder [Wed, 16 Jul 2008 05:05:38 +0000 (05:05 +0000)]
Add support for Rails-like flash messages
Evan Broder [Wed, 16 Jul 2008 04:35:47 +0000 (04:35 +0000)]
Add the bare-bones CSS file from BlueRhapsody
Evan Broder [Wed, 16 Jul 2008 04:28:52 +0000 (04:28 +0000)]
Add controller for making transfers
Evan Broder [Wed, 16 Jul 2008 04:28:39 +0000 (04:28 +0000)]
Add a FieldsDontMatch validator