예제 #1
0
파일: forms.py 프로젝트: AbelMon/librarian
 def render(self):
     return html.vinput(self.name,
                        {},
                        _type='password',
                        _id=self._id_prefix + self.name,
                        **self.kwargs)
예제 #2
0
파일: forms.py 프로젝트: AbelMon/librarian
 def render(self):
     return html.vinput(self.name,
                        {self.name: self.value},
                        _type='text',
                        _id=self._id_prefix + self.name,
                        **self.kwargs)
예제 #3
0
def test_vinput_value():
    s = mod.vinput('foo', {'foo': '12'})
    assert_value(s, '12')
예제 #4
0
def test_vinput_override_id():
    s = mod.vinput('foo', {}, _id='bar')
    assert_attr(s, 'id', 'bar')
예제 #5
0
def test_vinput():
    s = mod.vinput('foo', {})
    assert_tag(s, 'input')
    assert_name(s, 'foo')
    assert_attr(s, 'id', 'foo')
예제 #6
0
 def render(self):
     return html.vinput(self.name,
                        {},
                        _type='file',
                        _id=self._id_prefix + self.name,
                        **self.options)
예제 #7
0
 def render(self):
     return html.vinput(self.name,
                        {self.name: self.value},
                        _type='email',
                        _id=self._id_prefix + self.name,
                        **self.options)