Commits

David Jean Louis committed 3b6ea5c

Fixed some module instanciation issues (fixes #65, thanks deschler!)

  • Participants
  • Parent commits 676fdc6

Comments (0)

Files changed (1)

admin_tools/dashboard/modules.py

     """
 
     template = 'admin_tools/dashboard/modules/model_list.html'
+    models = None
+    exclude = None
+    include_list = None
+    exclude_list = None
 
     def __init__(self, title=None, models=None, exclude=None, **kwargs):
         self.models = list(models or [])
     title = _('Recent Actions')
     template = 'admin_tools/dashboard/modules/recent_actions.html'
     limit = 10
+    include_list = None
+    exclude_list = None
 
-    def __init__(self, title=None, limit=None,
-                 include_list=None, exclude_list=None, **kwargs):
+    def __init__(self, title=None, limit=10, include_list=None,
+                 exclude_list=None, **kwargs):
         self.include_list = include_list or []
         self.exclude_list = exclude_list or []
-        self.limit = self.__class__.limit or limit
+        kwargs.update({'limit': limit})
         super(RecentActions, self).__init__(title, **kwargs)
 
     def init_with_context(self, context):