I am trying to create a list of all the users on my Django setup in order to list who is working on a device, currently it pulls the usernames.
REPAIRED_BY = (
('BLANK', 'Not Assigned'),
('USER1', User.objects.all()),
)
but it does not allow me to list them in a string format (i.e. Joe Smith). I am able to get the first and last name using value_list but it appears as a tuple. ('Joe','Smith')
repaired_by = models.CharField(max_length=100, choices=REPAIRED_BY, default='BLANK')
It needs to be able to switch users to different devices. User 1 is working on computers 1 & 2 while user 2 is working on computer 3
Please let me know if you need more information.