Esempio n. 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})
     }
Esempio n. 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})
     }
Esempio n. 3
0
 def test_11_get_max_char_ok(self):
     sn = SocialNetworks()
     self.assertEqual(sn.get_max_char(), 42)
Esempio n. 4
0
 def test_11_get_max_char_ok(self):
     sn = SocialNetworks()
     self.assertEqual(sn.get_max_char(), 42)