From d2b018cf3f23e7873e5a6b8cab077a1b22bb7d8a Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Sat, 18 May 2024 01:57:39 +0200 Subject: [PATCH] [FIX] Sorting the list of tld's in alphabetical order instead of dumping the database in the page --- tldtest/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tldtest/views.py b/tldtest/views.py index e32e2ba..6fe8c79 100644 --- a/tldtest/views.py +++ b/tldtest/views.py @@ -12,7 +12,7 @@ class Index(ListView): Tutorial for this is on https://learndjango.com/tutorials/django-search-tutorial When writing more optimized search things, might be good reference """ - object_list = TLD.objects.all() + object_list = TLD.objects.all().order_by('tld') return object_list