コード例 #1
0
ファイル: modules.py プロジェクト: KomaR1/video_library
 def _prepare_children(self):
     # computes ids for children: generates them if they are not set
     # and then prepends them with this group's id
     seen = set()
     for id, module in enumerate(self.children):
         proposed_id = "%s_%s" % (self.id, module.id or id + 1)
         module.id = uniquify(proposed_id, seen)
         module._prepare_children()
コード例 #2
0
ファイル: modules.py プロジェクト: Lh4cKg/django-admin-tools
 def _prepare_children(self):
     # computes ids for children: generates them if they are not set
     # and then prepends them with this group's id
     seen = set()
     for id, module in enumerate(self.children):
         proposed_id = "%s_%s" % (self.id, module.id or id+1)
         module.id = uniquify(proposed_id, seen)
         module._prepare_children()
コード例 #3
0
ファイル: dashboards.py プロジェクト: AMHZR/appartments
 def _prepare_children(self):
     """ Enumerates children without explicit id """
     seen = set()
     for id, module in enumerate(self.children):
         module.id = uniquify(module.id or str(id+1), seen)
         module._prepare_children()
コード例 #4
0
 def _prepare_children(self):
     """ Enumerates children without explicit id """
     seen = set()
     for id, module in enumerate(self.children):
         module.id = uniquify(module.id or str(id + 1), seen)
         module._prepare_children()