damned-lies r1503 - in trunk: . stats
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1503 - in trunk: . stats
- Date: Mon, 16 Mar 2009 22:19:00 +0000 (UTC)
Author: claudep
Date: Mon Mar 16 22:18:59 2009
New Revision: 1503
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1503&view=rev
Log:
2009-03-16 Claude Paroz <claude 2xlibre net>
* settings_sample.py: SERVER_EMAIL is still needed (server error mail).
* stats/forms.py: Reverse branch order, fix initial order of popup.
* stats/models.py: get_branches may be reverse sorted.
Modified:
trunk/ChangeLog
trunk/settings_sample.py
trunk/stats/forms.py
trunk/stats/models.py
Modified: trunk/settings_sample.py
==============================================================================
--- trunk/settings_sample.py (original)
+++ trunk/settings_sample.py Mon Mar 16 22:18:59 2009
@@ -40,6 +40,7 @@
EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX = '[Damned Lies]'
DEFAULT_FROM_EMAIL = 'gnomeweb gnome org'
+SERVER_EMAIL = 'gnomeweb gnome org'
# When in STRINGFREEZE, where to send notifications (gnome-i18n gnome org) on any POT changes
NOTIFICATIONS_TO = ['gnome-i18n gnome org']
Modified: trunk/stats/forms.py
==============================================================================
--- trunk/stats/forms.py (original)
+++ trunk/stats/forms.py Mon Mar 16 22:18:59 2009
@@ -12,7 +12,7 @@
def __init__(self, module, *args, **kwargs):
super(ModuleBranchForm, self).__init__(*args, **kwargs)
self.branch_fields = []
- for branch in module.get_branches():
+ for branch in module.get_branches(reverse=True):
categs = branch.category_set.order_by('name', 'release__name')
if len(categs):
for cat in categs:
@@ -26,8 +26,7 @@
# Branch is not linked to any release
self.fields[branch.name] = ReleaseField(queryset=Release.objects.all(),
label=branch.name)
- self.fields[branch.name+'_cat'] = forms.ChoiceField(choices=CATEGORY_CHOICES,
- initial=cat.name)
+ self.fields[branch.name+'_cat'] = forms.ChoiceField(choices=CATEGORY_CHOICES)
self.branch_fields.append((branch.name, branch.name+'_cat'))
self.fields['new_branch'] = forms.CharField(required=False)
Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py (original)
+++ trunk/stats/models.py Mon Mar 16 22:18:59 2009
@@ -99,9 +99,9 @@
else:
return self.bugs_base
- def get_branches(self):
+ def get_branches(self, reverse=False):
branches = list(self.branch_set.all())
- branches.sort()
+ branches.sort(reverse=reverse)
return branches
def get_head_branch(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]