init
This commit is contained in:
2
game/__init__.py
Normal file
2
game/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
import models
|
||||
import views
|
||||
11
game/models.py
Normal file
11
game/models.py
Normal 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
9
game/views.py
Normal 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'赛事名称',
|
||||
}
|
||||
Reference in New Issue
Block a user