Пример #1
0
def home(view=None):
    """Redirect to application home.

    """
    if view:
        return redirect_to(url_for_page(view))
    return redirect_to(url_for_page())
Пример #2
0
class Person(CollectionModel):
    pass
    key = property(lambda self: zoom.utils.id_for(self.name))
    url = property(lambda self: url_for_page('people', self.key))
    # link = property(lambda self: self.name)
    link = property(lambda self: zoom.helpers.link_to(self.name, self.url))
Пример #3
0
def menu_item(name):
    return (name, url_for_page('fields', name.lower()))
Пример #4
0
                      hint='test hint'),
    MultiselectField('Multiselect',
                     options=['One', 'Two', 'Three'],
                     hint='test hint'),
    ChosenMultiselectField('Sizes',
                           options=['One', 'Two', 'Three', 'Four'],
                           hint='test hint',
                           placeholder='Choose as you wish'),
    RangeSliderField('Price', min=0, max=1500),
    ButtonField('Okay!', hint='test hint'),
    ButtonsField(['One', 'Two'], cancel='cancel', hint='test hint'),
    MemoField('Memo', hint='test hint'),
    MarkdownField('Markdown', hint='test hint'),
    EditField('Editor', hint='test hint'),
    ImageField('Photo'),
    ButtonField('Save', cancel=url_for_page('fields')))

sample = dict(
    name='Joey',
    email='*****@*****.**',
    postal_code='V8X 2P2',
    phone='2341231234',
    twitter='dsilabs',
    web='https://www.dsilabs.ca',
    password='******',
    number_of_things=123,
    count=456,
    size=1.2345,
    decimal=Decimal('1234132.234'),
    amount=Decimal('12341232.32432'),
    foreign_amount=Decimal('121232.432'),