Created
July 11, 2012 18:27
-
-
Save luizdepra/3092183 to your computer and use it in GitHub Desktop.
DataBase
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
from google.appengine.ext import db | |
class Post(db.Model): | |
title = db.StringProperty() | |
slug = db.StringProperty() | |
date = db.DateTimeProperty(auto_now_add=True) | |
author = db.StringProperty() | |
content = db.TextProperty() | |
category = db.ReferenceProperty(Category, collection_name='posts') | |
tags = db.ListProperty(db.Key) | |
class Page(db.Model): | |
title = db.StringProperty() | |
slug = db.StringProperty() | |
content = db.TextProperty() | |
class Tag(db.Model): | |
title = db.StringProperty() | |
slug = db.StringProperty() | |
class Category(db.Model): | |
title = db.StringProperty() | |
slug = db.StringProperty() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment