DarwinSalaz / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Country choice to be ordered by display #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the /edit/location/ view, the dropdown menu with countries is ordered by 
country code when it should be by display value.
It would make it easier for the user if it was ordered by display value.

As I don't like hacking/patching core codes I've overridden the location 
view passing it my "class CustomLocationForm(LocationForm)"
self.fields['country'].choices = sorted(COUNTRIES, key=lambda o: o[1])

This is on django-profile 0.6

Original issue reported on code.google.com by andre.mi...@gmail.com on 9 Nov 2009 at 4:47

GoogleCodeExporter commented 8 years ago
solved in r392

Original comment by stephane.angel on 2 Feb 2010 at 5:10