This commit is contained in:
starschen
2015-07-21 09:32:48 +08:00
commit 7d22fdf57f
40 changed files with 20163 additions and 0 deletions

2
game/__init__.py Normal file
View File

@@ -0,0 +1,2 @@
import models
import views

11
game/models.py Normal file
View File

@@ -0,0 +1,11 @@
#encoding: utf8
import sys
sys.path.append('..')
from db import db
class Game(db.Document):
name = db.StringField(verbose_name=u'赛事名称')
def __unicode__(self):
return self.name

9
game/views.py Normal file
View File

@@ -0,0 +1,9 @@
#encoding: utf8
from flask.ext.admin.contrib.mongoengine import ModelView
class GameAdmin(ModelView):
page_size = 15
column_labels = {
'name': u'赛事名称',
}