-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
32 lines (25 loc) · 907 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
# models
from google.appengine.ext import db
import aetycoon
import hashlib
# Create your models here.
class Squeezed(db.Model):
created=db.DateTimeProperty(auto_now_add=True)
lemons=db.StringListProperty()
class Juice(db.Model):
image=db.LinkProperty()
download=db.LinkProperty()
created=db.DateTimeProperty(auto_now_add=True)
class Bottled(db.Model):
image=db.StringProperty()
download=db.StringProperty()
created=db.DateTimeProperty(auto_now_add=True)
class StaticContent(db.Model):
body = db.BlobProperty()
content_type = db.StringProperty(required=True)
status = db.IntegerProperty(required=True, default=200)
etag = aetycoon.DerivedProperty(lambda x: hashlib.sha1(x.body).hexdigest())
headers = db.StringListProperty()
created=db.DateTimeProperty(auto_now_add=True)
modified=db.DateTimeProperty(auto_now=True)