[billreminder] Added new method that may be used to provide users with a few default categories.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [billreminder] Added new method that may be used to provide users with a few default categories.
- Date: Sat, 18 Dec 2010 19:49:24 +0000 (UTC)
commit 2478dec596aa1173121518cb087a918ba9691fa9
Author: Og B. Maciel <ogmaciel gnome org>
Date: Sat Dec 18 14:43:01 2010 -0500
Added new method that may be used to provide users with a few default categories.
src/lib/actions.py | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/lib/actions.py b/src/lib/actions.py
index 4c21d33..95abc19 100644
--- a/src/lib/actions.py
+++ b/src/lib/actions.py
@@ -22,6 +22,29 @@ class Actions(object):
self.dal = databaselayer
+ def default_categories(self):
+ categories = [
+ ("Utilities", '#f8bcffff0db4'),
+ ("Food & Dining", '#cccc00000000'),
+ ("Mortgage", '#4e4e9a9a0606'),
+ ("Rent", '#c4c4a0a00000'),
+ ("Medical", '#34346565a4a4'),
+ ("Educational", '#757550507b7b'),
+ ("Donation", '#060698209a9a'),
+ ("Credit Card", '#d3d3d7d7cfcf'),
+ ("Gifts", '#555557575353'),
+ ("Books", '#efef29292929'),
+ ("Online Services", '#8a8ae2e23434'),
+ ("Insurance", '#fcfce9e94f4f'),
+ ("Auto & Transport", '#72729f9fcfcf'),
+ ("Home", '#adad7f7fa8a8'),
+ ("Gas & Fuel", '#3434e2e2e2e2'),
+ ("Electronics", '#eeeeeeeeecec'),
+ ]
+
+ for category in categories:
+ self.add(Category(category[0], category[1]))
+
def get_interval_bills(self, start=None, end=None, paid=None):
"""
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]