From a74b7b03bdf4ee2ec18e3cf9814183a45ce7a8b7 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Wed, 21 Nov 2012 21:48:58 +0800 Subject: [PATCH] add extra fields for create meeting --- .../bbb/locale/zh_CN/LC_MESSAGES/django.mo | Bin 2187 -> 2491 bytes .../bbb/locale/zh_CN/LC_MESSAGES/django.po | 55 +++++++++++++----- bbb_django/bbb/models.py | 18 +++++- 3 files changed, 59 insertions(+), 14 deletions(-) diff --git a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo index ba9d796f8d183b70d5051e8b746e48af14e29799..1b29141827d69ef1d5c426681edafd33cc6f4f59 100644 GIT binary patch delta 1079 zcmXxjT}YEr7{KvoI_E6Y)Uwp9ciM;4MQ$omL0xrG*hP0r-H0xFrERq~yNY!oAq@I( z$&fy;vMZ4m7St$$D1r!sB&h7_HN4czy6OLHPlrA4?|sfWJLl}2vuwl5rp$7qe_AMA z#17)DPoxj;Rq&u(tP~lR+Im$nmBT6;C4?joyB!|qYf0ImwL<`K%Hm^8B<2Ae$2dL^%G{+oU-;A^D*i;1*8N9XlhKhxa#Sv-hLb5L<;J3tj$d$N zI@p1#bTATjBH_cm{e>r0y}nS`o4>h|Utnx+^7`u3Ly1^LPj|VZ@I5f-3(#eC`gJZ6 iJk;(Lr@hGq@m^i?X0uwKebQPi0_vi!69>>Ide~Dxie=Cdy(8zG;ruBacZZk&$)hC#)EQ&8N9|L z?DacWi#J%0_sGw^@+il54B)5vh1JAA7{n@G$|zPimve12l+c4A9KtFbFD1BXj1kXa z7iKYmyV!~+sQ+DJ7;iCx52%UWkcr#}YMyUYeu&jZncqcds3U<&7{oeE;TT^djZ4Ja zjF!enR9+vW%29I)wSall#2M>fG1shr)7+NK?{+L<-^`;1IyO(Sk@(!a!zl5y#b2oW zT6Up{TTu&(Sv+8lSbxf##hiA!U\n" "Language-Team: LANGUAGE \n" @@ -16,39 +16,71 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: models.py:26 models.py:164 +#: models.py:26 +msgid "unlimited" +msgstr "无限制" + +#: models.py:27 +msgid "15 min" +msgstr "15分钟" + +#: models.py:28 +msgid "30 min" +msgstr "30分钟" + +#: models.py:29 +msgid "1 hour" +msgstr "1小时" + +#: models.py:30 +msgid "2 hour" +msgstr "2小时" + +#: models.py:36 models.py:177 msgid "meeting name" msgstr "会议名称" -#: models.py:27 models.py:165 +#: models.py:37 models.py:178 msgid "attendee password" msgstr "会议密码" -#: models.py:28 models.py:167 +#: models.py:38 models.py:180 msgid "moderator password" msgstr "管理员密码" -#: models.py:29 models.py:169 +#: models.py:39 models.py:182 msgid "welcome message" msgstr "欢迎信息" -#: models.py:35 +#: models.py:48 msgid "meeting" msgstr "会议" -#: models.py:36 +#: models.py:49 msgid "meetings" msgstr "会议列表" -#: models.py:169 +#: models.py:182 msgid "Welcome!" msgstr "欢迎!" -#: models.py:182 +#: models.py:183 +msgid "record" +msgstr "录制" + +#: models.py:184 +msgid "duration" +msgstr "时长" + +#: models.py:185 +msgid "start time" +msgstr "开始时间" + +#: models.py:198 msgid "Your name" msgstr "姓名" -#: models.py:183 +#: models.py:199 msgid "password" msgstr "密码" @@ -154,9 +186,6 @@ msgstr "成功创建会议%s" #~ msgid "invite_url" #~ msgstr "邀请链接" -#~ msgid "start_time" -#~ msgstr "开始时间" - #~ msgid "end_time" #~ msgstr "结束时间" diff --git a/bbb_django/bbb/models.py b/bbb_django/bbb/models.py index 40210e3..b365567 100755 --- a/bbb_django/bbb/models.py +++ b/bbb_django/bbb/models.py @@ -9,6 +9,7 @@ from hashlib import sha1 import xml.etree.ElementTree as ET import random +import datetime def parse(response): try: @@ -21,12 +22,24 @@ def parse(response): except: return None +MEETING_DURATION = ( + (0, _('unlimited')), + (15, _('15 min')), + (30, _('30 min')), + (60, _('1 hour')), + (120, _('2 hour')), +) + class Meeting(models.Model): + name = models.CharField(max_length=100, verbose_name=_('meeting name')) attendee_password = models.CharField(max_length=50, verbose_name=_('attendee password')) moderator_password = models.CharField(max_length=50, verbose_name=_('moderator password')) welcome = models.CharField(max_length=100, verbose_name=_('welcome message')) + record = models.BooleanField(default=False) + duration = models.IntegerField(default=0, choices=MEETING_DURATION) + start_time = models.DateTimeField() #def __unicode__(self): # return self.name @@ -167,7 +180,10 @@ class CreateForm(forms.Form): moderator_password = forms.CharField(label=_('moderator password'), widget=forms.PasswordInput(render_value=False)) welcome = forms.CharField(label=_('welcome message'), initial=_('Welcome!')) - + record = forms.BooleanField(label=_('record')) + duration = forms.ChoiceField(label=_('duration'), choices=MEETING_DURATION) + start_time = forms.DateTimeField(label=_('start time'), initial=datetime.date.today()) + def clean(self): data = self.cleaned_data