realms-wiki/reimagine/models.py
Matthew Scragg 613d1c6ca3 fixed rename
2013-10-01 23:32:53 -05:00

27 lines
496 B
Python

from rethinkORM import RethinkModel
from reimagine import conn
class BaseModel(RethinkModel):
def __init__(self, **kwargs):
if not kwargs.get('conn'):
kwargs['conn'] = conn
super(BaseModel, self).__init__(**kwargs)
@classmethod
def create(cls, **kwargs):
return super(BaseModel, cls).create(**kwargs)
class Site(BaseModel):
table = 'sites'
class User(BaseModel):
table = 'users'
def login(self, login, password):
pass