Exemplo n.º 1
0
 def get_queryset(self):
     config_list = []
     for pid in TAP_MAP.keys():
         config_list.append(TapConfig(uuid=pid,
                                      location=TAP_MAP[pid]['location'],
                                      sdetail=TAP_MAP[pid]['sdetail']))
     return config_list
Exemplo n.º 2
0
 def get_queryset(self):
     config_list = []
     self.paginate_by = 0
     for pid in TAP_MAP.keys():
         config_list.append(
             TapConfig(
                 uuid=pid,
                 location=TAP_MAP[pid]["location"],
                 sdetail=TAP_MAP[pid]["sdetail"],
             ))
     return config_list
Exemplo n.º 3
0
 def restore_object(self, attrs, instance=None):
     if (instance is not None):
         instance.uuid = attrs.get('uuid', instance.uuid)
         instance.sdetail = attrs.get('sdetail', instance.sdetail)
         return instance
     return TapConfig(**attrs)
Exemplo n.º 4
0
 def restore_object(self, attrs, instance=None):
     if instance is not None:
         instance.uuid = attrs.get("uuid", instance.uuid)
         instance.sdetail = attrs.get("sdetail", instance.sdetail)
         return instance
     return TapConfig(**attrs)