Merge lp:~daker/loco-team-portal/fix.706742 into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 643
Merged at revision: 641
Proposed branch: lp:~daker/loco-team-portal/fix.706742
Merge into: lp:loco-team-portal
Diff against target: 43 lines (+9/-5)
2 files modified
loco_directory/meetings/forms.py (+8/-4)
loco_directory/meetings/models.py (+1/-1)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.706742
Reviewer Review Type Date Requested Status
LoCo Team Portal Developers Pending
Review via email: mp+158829@code.launchpad.net

Commit message

Fixed bug 706742, props svwilliams

To post a comment you must log in.
642. By Adnane Belmadiaf

Reverted a stupid ctrl+v

643. By Adnane Belmadiaf

Fixed the help text

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/meetings/forms.py'
2--- loco_directory/meetings/forms.py 2013-02-17 01:44:52 +0000
3+++ loco_directory/meetings/forms.py 2013-04-14 23:41:24 +0000
4@@ -67,8 +67,9 @@
5 'channel',
6 'minutes',
7 'chair',
8+ 'logs'
9 )
10- exclude = ('teams', 'date_created', 'logs')
11+ exclude = ('teams', 'date_created')
12
13 def __init__(self, teams=None, *args, **kargs):
14 super(TeamMeetingForm, self).__init__(*args, **kargs)
15@@ -107,9 +108,12 @@
16
17 def save(self):
18 start_date = self.cleaned_data['date_begin']
19- self.instance.logs = 'http://irclogs.ubuntu.com/%(date)s/%(channel)s.html#t%(time)s' % {'date': start_date.strftime('%Y/%m/%d'),
20- 'channel': urllib.quote(u'%s' % self.cleaned_data['channel'].encode('ascii', 'ignore')),
21- 'time': start_date.strftime('%H:%M')}
22+ if self.instance.logs is None or "http://irclogs.ubuntu.com" in self.instance.logs:
23+ self.instance.logs = 'http://irclogs.ubuntu.com/%(date)s/%(channel)s.html#t%(time)s' % {
24+ 'date': start_date.strftime('%Y/%m/%d'),
25+ 'channel': urllib.quote(u'%s' % self.cleaned_data['channel'].encode('ascii', 'ignore')),
26+ 'time': start_date.strftime('%H:%M')
27+ }
28 return super(TeamMeetingForm, self).save()
29
30
31
32=== modified file 'loco_directory/meetings/models.py'
33--- loco_directory/meetings/models.py 2012-12-12 23:47:58 +0000
34+++ loco_directory/meetings/models.py 2013-04-14 23:41:24 +0000
35@@ -17,7 +17,7 @@
36 date_begin = models.DateTimeField(help_text=_('Local date and time that the meeting starts'), verbose_name=_('Begins'), db_index=True)
37 date_end = models.DateTimeField(help_text=_('Local date and time that the meeting ends'), verbose_name=_('Ends'), db_index=True)
38 channel = models.CharField(max_length=150, verbose_name=_('Meeting Channel'), help_text=_('Channel that the meeting will be held in. Ex. #ubuntu-us-fl'), null=True)
39- logs = models.URLField(verbose_name=_('Meeting Log'), help_text=_('After the meeting, add a link to the meeting log'), max_length=200, verify_exists=False, blank=True, null=True)
40+ logs = models.URLField(verbose_name=_('Meeting Log'), help_text=_('After the meeting, add a link to the meeting log (leave blank to use the built-in irclog.ubuntu.com'), max_length=200, verify_exists=False, blank=True, null=True)
41 minutes = models.URLField(verbose_name=_('Meeting Minutes'), help_text=_('After the meeting, add a link to the meeting minutes'), max_length=200, verify_exists=False, blank=True, null=True)
42 date_created = models.DateTimeField(help_text=_('the date and time when the event was created'), default=datetime.datetime.now(), db_index=True)
43 chair = models.ForeignKey(UserProfile, verbose_name=_('Meeting Chair'), blank=True, null=True)

Subscribers

People subscribed via source and target branches