Beispiel #1
0
 def import_terminal(self, row):
     try:
         Terminal.objects.get(description=row[0])
         print('Terminal', row[0], 'already registered')
     except ObjectDoesNotExist:
         terminal = Terminal()
         terminal.description = row[0]
         terminal.save()
Beispiel #2
0
 def import_terminal(self, row):
     """
     This method is used for creating the objects of terminals.
     """
     try:
         Terminal.objects.get(description=row[0])
         print('Terminal', row[0], 'already registered')
     except ObjectDoesNotExist:
         terminal = Terminal()
         terminal.description = row[0]
         terminal.save()
Beispiel #3
0
 def import_terminal(self, row):
     """
     This method is used for creating the objects of terminals.
     """
     try:
         Terminal.objects.get(description=row[0])
         print('Terminal', row[0], 'already registered')
     except ObjectDoesNotExist:
         terminal = Terminal()
         terminal.description = row[0]
         terminal.save()