Skip to content

Commit

Permalink
add extra fields for create meeting
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji246 committed Nov 21, 2012
1 parent 3e11a43 commit a74b7b0
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 14 deletions.
Binary file modified bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo
Binary file not shown.
55 changes: 42 additions & 13 deletions bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,79 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-19 21:11+0800\n"
"POT-Creation-Date: 2012-11-21 21:47+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"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 "密码"

Expand Down Expand Up @@ -154,9 +186,6 @@ msgstr "成功创建会议%s"
#~ msgid "invite_url"
#~ msgstr "邀请链接"

#~ msgid "start_time"
#~ msgstr "开始时间"

#~ msgid "end_time"
#~ msgstr "结束时间"

Expand Down
18 changes: 17 additions & 1 deletion bbb_django/bbb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from hashlib import sha1
import xml.etree.ElementTree as ET
import random
import datetime

def parse(response):
try:
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a74b7b0

Please sign in to comment.