diff --git a/suitablephones/management/commands/fetchphones.py b/suitablephones/management/commands/fetchphones.py index e7db805..4785ae6 100644 --- a/suitablephones/management/commands/fetchphones.py +++ b/suitablephones/management/commands/fetchphones.py @@ -32,11 +32,13 @@ class Command(BaseCommand): for subkey, subvalue in value.items(): setattr(bt, subkey, subvalue) bt.save() + dev.bluetooth = bt #for subkey, subvalue in value.items(): # setattr(bt, subkey, subvalue) # bt.save() -# elif key == "cameras": -# cam = [] + elif key == "cameras": + print('camera') +# cam = [] # for c in Camera.objects.filter(*value.items()) # cam.append(c) # if not cam.exists(): diff --git a/suitablephones/models.py b/suitablephones/models.py index fb85dea..f6960e4 100644 --- a/suitablephones/models.py +++ b/suitablephones/models.py @@ -8,7 +8,7 @@ class Bluetooth(models.Model): profiles = models.CharField(max_length=100) def __str__(self): - return f"Bluetooth: {self.spec - self.profiles}" + return f"Bluetooth: {self.spec} - {self.profiles}" class Camera(models.Model):