Notification logic in main SoC is capable of getting constructor parameters.
--- a/app/soc/logic/models/notification.py Sat Aug 01 16:22:10 2009 -0700
+++ b/app/soc/logic/models/notification.py Sun Aug 02 15:20:00 2009 +0530
@@ -36,11 +36,12 @@
"""Logic methods for the Notification model.
"""
- def __init__(self):
+ def __init__(self, model=soc.models.notification.Notification,
+ base_model=None, scope_logic=user_logic):
"""Defines the name, key_name and model for this entity.
"""
- super(Logic, self).__init__(model=soc.models.notification.Notification,
- base_model=None, scope_logic=user_logic)
+ super(Logic, self).__init__(model=model, base_model=base_model,
+ scope_logic=scope_logic)
def _onCreate(self, entity):
"""Sends out a message if there is only one unread notification.