Exemplo n.º 1
0
Arquivo: tasks.py Projeto: h1ds/h1ds
def update_from_shot_slug(device_slug, shot_slug):
    from h1ds_summary.db import SummaryTable
    device = Device(slug=device_slug)
    db = SummaryTable(device)
    for shot in parse_shot_slug(device, shot_slug):
        db.add_or_update_shot(shot)
Exemplo n.º 2
0
Arquivo: forms.py Projeto: h1ds/h1ds
 def get_cleaned_data_for_device(self, device):
     cleaned_data = self.clean()
     cleaned_data['shots'] = parse_shot_slug(device, cleaned_data['shots'])
     cleaned_data['attributes'] = parse_attr_str(device, cleaned_data['attributes'])
     return cleaned_data