[Answered ]-Django From Choices Tuple Concatnation

2👍

Have you tried using lists instead of tuples?

sites = [(s.site_code, s.site_code) for s in Site.objects.all().order_by('site_code')]
SITE_CHOICES = [('All', 'All')] + sites

Hope that helps.

👤alecxe

Leave a comment