Merge lp:~mhall119/loco-team-portal/681981 into lp:~cjohnston/loco-team-portal/681981

Proposed by Michael Hall on 2010-11-27
Status: Merged
Approved by: Chris Johnston on 2010-11-27
Approved revision: 326
Merged at revision: 327
Proposed branch: lp:~mhall119/loco-team-portal/681981
Merge into: lp:~cjohnston/loco-team-portal/681981
Diff against target: 49 lines (+9/-1)
3 files modified
loco_directory/teams/models.py (+6/-0)
loco_directory/userprofiles/models.py (+3/-0)
loco_directory/venues/forms.py (+0/-1)
To merge this branch: bzr merge lp:~mhall119/loco-team-portal/681981
Reviewer Review Type Date Requested Status
Chris Johnston 2010-11-27 Pending
Review via email: mp+41991@code.launchpad.net

Description of the Change

Set default ordering on the Country model itself, rather than Venue forms. Also added default ordering for Continent and UserProfile to make things nicer all around.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/teams/models.py'
2--- loco_directory/teams/models.py 2010-09-30 11:17:29 +0000
3+++ loco_directory/teams/models.py 2010-11-27 02:49:56 +0000
4@@ -19,6 +19,9 @@
5 class Continent(models.Model):
6 name = models.TextField(_("Name"), max_length=50)
7
8+ class Meta:
9+ ordering = ('name',)
10+
11 def __unicode__(self):
12 return u'%s' % (self.name)
13
14@@ -38,6 +41,9 @@
15 name = models.TextField(_("Name"), max_length=100)
16 continents = models.ManyToManyField(Continent)
17
18+ class Meta:
19+ ordering = ('name',)
20+
21 def __unicode__(self):
22 return u'%s' % (self.name)
23
24
25=== modified file 'loco_directory/userprofiles/models.py'
26--- loco_directory/userprofiles/models.py 2010-08-28 17:43:41 +0000
27+++ loco_directory/userprofiles/models.py 2010-11-27 02:49:56 +0000
28@@ -20,6 +20,9 @@
29 aim = models.CharField(verbose_name=_('AOL IM Nick'), max_length=32, blank=True, null=True)
30 xmpp = models.CharField(verbose_name=_('XMPP IM Nick'), max_length=32, blank=True, null=True)
31
32+ class Meta:
33+ ordering = ('user__username',)
34+
35 def __unicode__(self):
36 try:
37 if self.realname:
38
39=== modified file 'loco_directory/venues/forms.py'
40--- loco_directory/venues/forms.py 2010-11-27 02:14:58 +0000
41+++ loco_directory/venues/forms.py 2010-11-27 02:49:56 +0000
42@@ -23,7 +23,6 @@
43 """
44 class Meta:
45 model = Venue
46- order_with_respect_to = 'Country'
47
48 class Media:
49 css = {'all': (

Subscribers

People subscribed via source and target branches

to all changes: