Пример #1
0
def contact_fields():
    """Return contact fields"""
    return Fields(
        TextField('Name', required, maxlength=80),
        TextField('Title', required, MinimumLength(3)),
        DateField('Date', format='%A %b %d, %Y'),
        RadioField('Status', values=statuses),
        EditField('Notes'),
    )
Пример #2
0
def page_fields():
    """Return page fields"""
    return Fields(
        TextField('Title', required, maxlength=80),
        # TextField('Name', maxlength=80),
        TextField('Path', maxlength=80),
        # TextField('Template'),
        # TextField('Title', required, MinimumLength(3)),
        MemoField('Description'),
        MarkdownField('Body', browse=False),
        # DateField('Publish Date', format='%A %b %d, %Y'),
    )
Пример #3
0
def snippet_fields():
    """Return snippet fields"""
    return Fields(
        TextField('Name', required, maxlength=80),
        # TextField('Title', required, MinimumLength(3)),
        # DateField('Date', format='%A %b %d, %Y'),
        # RadioField('Status', values=statuses),
        EditField('Body'),
    )
Пример #4
0
def person_fields():
    return Fields(
        TextField('Name', required),
        TextField('Address'),
        DecimalField('Salary'),
    )