Created
October 16, 2014 15:29
-
-
Save theacodes/2b63c0bbe87a34084296 to your computer and use it in GitHub Desktop.
Ferris 3 todo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ferris3 | |
| from google.appengine.ext import ndb | |
| class Todo(ndb.Model): | |
| text = ndb.StringProperty(default='', indexed=False) | |
| done = ndb.BooleanProperty(default=False) | |
| created = ndb.DateTimeProperty(auto_now_add=True) | |
| @ferris3.auto_service | |
| class TodoService(ferris3.Service): | |
| get = ferris3.hvild.get(Todo) | |
| list = ferris3.hvild.paginated_list(Todo, query=Todo.query().order(-Todo.created)) | |
| insert = ferris3.hvild.insert(Todo) | |
| update = ferris3.hvild.update(Todo) | |
| dlete = ferris3.hvild.delete(Todo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment