예제 #1
0
파일: forms.py 프로젝트: sbuggay/soletrakr
    def save(self):
        """
        Save function to activate the given device once the device and user
        info have been validated.
        """
        user = User.objects.get(email__exact=self.cleaned_data['user'])
        device = Device.objects.get(serial_number__exact=self.cleaned_data['device'])

        return DeviceManager.activate_device(device=device, user=user)
예제 #2
0
파일: forms.py 프로젝트: sbuggay/soletrakr
    def save(self):
        """
        Save function to activate the given device once the device and user
        info have been validated.
        """
        user = User.objects.get(email__exact=self.cleaned_data['user'])
        device = Device.objects.get(
            serial_number__exact=self.cleaned_data['device'])

        return DeviceManager.activate_device(device=device, user=user)
예제 #3
0
파일: forms.py 프로젝트: sbuggay/soletrakr
 def save(self):
     """
 	Overwritten save method to create new device
 	using the device manager.
 	"""
     return DeviceManager.create_device(
         serial_number=self.cleaned_data['serial_number'],
         sim_serial_number=self.cleaned_data['sim_serial_number'],
         date_manufactured=self.cleaned_data['date_manufactured'],
         phone_number=self.cleaned_data['phone_number'])
예제 #4
0
파일: forms.py 프로젝트: sbuggay/soletrakr
 def save(self):
 	"""
 	Overwritten save method to create new device
 	using the device manager.
 	"""
 	return DeviceManager.create_device (
 		serial_number = self.cleaned_data['serial_number'],
 		sim_serial_number = self.cleaned_data['sim_serial_number'],
 		date_manufactured = self.cleaned_data['date_manufactured'],
 		phone_number = self.cleaned_data['phone_number']
 	)