[billreminder/fresh] Provide standard name and color for Category instance with no parameters.



commit ff4c318b73314501d042560866b4c58812c3b474
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Mon Jan 25 22:13:48 2010 -0500

    Provide standard name and color for Category instance with no parameters.

 src/db/entities.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/db/entities.py b/src/db/entities.py
index 3d938d3..fb33acb 100644
--- a/src/db/entities.py
+++ b/src/db/entities.py
@@ -1,3 +1,5 @@
+from lib import i18n
+
 from sqlalchemy import Column, Integer, String, Numeric, Text, Date, DateTime, Boolean, ForeignKey
 from sqlalchemy.orm import relation, backref
 from sqlalchemy.ext.declarative import declarative_base
@@ -11,7 +13,7 @@ class Category(Base):
     name = Column(String(length=255, convert_unicode=True))
     color = Column(String(length=6, convert_unicode=True))
 
-    def __init__(self, name, color=None):
+    def __init__(self, name=_("None"), color="#d3d7cf"):
         self.name = name
         if color:
             self.color = color



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]