You are right, I wasn't even thinking about it like that. This is bad news as the information is coming across as "District 45" from another source and so I don't have just a district number to go off of. State government data is always terrible to work with.
On Jun 9, 10:04 am, Scott Gould <zinck...@gmail.com> wrote: > If you're ordering on "District 1", "District 2", etc. then the number > is part of a string and will be sorted alphabetically. I image your > only recourse will be to use the numeric field directly, and deal with > prepending "District " to it in some other fashion. > > On Jun 9, 10:38 am, Nick <nickt...@gmail.com> wrote: > > > Has anyone come across an ordering issue with the regroup tag whereby > > if the field that is being ordered is an integer you get the following > > problem: > > > say you have the grouped field "District" and the following groupings > > > District 1 > > District 2 > > District 3 > > District 10 > > District 14 > > District 20 > > District 29 > > District 30 > > > Their ordering will come out: > > > District 1 > > District 10 > > District 14 > > District 2 > > District 20 > > District 29 > > District 3 > > District 30 > > > I can see why this is happening, but how do I tell the regroup tag to > > sort as though 1 were 01, etc. Adding a 0 to the front isn't really an > > option as their are thousands of records that reach from 1 - 250 > > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.