Skip to content

Instantly share code, notes, and snippets.

@xen
Created January 16, 2012 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xen/1622718 to your computer and use it in GitHub Desktop.
Save xen/1622718 to your computer and use it in GitHub Desktop.
from .models import Model, ModelRegistry
class User(Model):
__yaml__ = 'user.yaml'
john = User(**kw)
title: User
description: >
User profile with common fields used on various sites
fields:
- name: name
title: Name
type: string
length: 80
required: 1
- name: second
title: Second Name
type: string
length: 80
- name: bday
title: Birthday
type: date
required: 1
widget: date
- name: about
title: About
description: >
Some text about you here is welcome
db_name: about
widget:
name: wysiwyg
theme: simple
- name: friends
type: reference
reference_model: User
desription: >
List of your friends on site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment