示例#1
0
 class Meta:
     model = models.EventLog
     allowed_char = SocialNetworks.get_max_char()
     widgets = {
         'msg': Textarea(attrs={'cols': math.ceil(allowed_char / 2.0),
                                'rows': 2,
                                'maxlength': allowed_char})
     }
示例#2
0
 class Meta:
     model = models.Event
     allowed_char = SocialNetworks.get_max_char()
     widgets = {
         'services': CheckboxSelectMultiple(),
         'msg': Textarea(attrs={'cols': math.ceil(allowed_char / 2.0),
                                'rows': 2,
                                'maxlength': allowed_char})
     }
示例#3
0
 def test_11_get_max_char_ok(self):
     sn = SocialNetworks()
     self.assertEqual(sn.get_max_char(), 42)
示例#4
0
 def test_11_get_max_char_ok(self):
     sn = SocialNetworks()
     self.assertEqual(sn.get_max_char(), 42)