My favorites
▼
|
Sign in
habr-gae-helloworld
A helloworld application for GAE written for habrahabr.ru
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
model.py
‹r2
r5
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
#!/usr/bin/env python
# encoding: utf-8
"""
model.py
$Id$
Created by Roman Kirillov on 2010-01-25.
"""
import datetime
from google.appengine.ext import db
from google.appengine.api import users
class Visitor(db.Model):
'''
Simple object which uses Google DataStore persistence model
'''
'''UserProperty encapsulates information about a Google's
user account available to application. It is set to
use current user as a default user automatically
whever new object is created'''
user = db.UserProperty(required = True, auto_current_user_add = True)
'''DateTimeProperty uses standard underlying datetime.datetime
and is set to auto-update to now() whenever record is saved'''
lastVisit = db.DateTimeProperty(auto_now = True)
'''Very simple integer property with default value of 0'''
hits = db.IntegerProperty(default = 0)
Show details
Hide details
Change log
r4
by sigizmund on Jan 25, 2010
Diff
Id tags added
Go to:
/trunk/app.yaml
/trunk/controller.py
/trunk/index.yaml
/trunk/main.py
/trunk/model.py
/trunk/view.py
Project members,
sign in
to write a code review
Older revisions
r2
by sigizmund on Jan 25, 2010
Diff
Initial import
All revisions of this file
File info
Size: 892 bytes, 30 lines
View raw file
File properties
svn:keywords
Id
Powered by
Google Project Hosting