Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(0)  |  Derive(14)  |  Import(2)

src/f/l/flask-mongorest-HEAD/example/app.py   flask-mongorest(Download)
from flask.ext.mongorest import MongoRest
from flask.ext.mongorest.views import ResourceView
from flask.ext.mongorest.resources import Resource
from flask.ext.mongorest import operators as ops
from flask.ext.mongorest.methods import *
class UserResource(Resource):
    document = User
    filters = {
        'datetime': [ops.Exact]
    }
class ContentResource(Resource):
    document = Content
 
class Post(db.Document):
    title = db.StringField(max_length=120, required=True)
class PostResource(Resource):
    document = Post
    related_resources = {
        'content': ContentResource,
        'sections': ContentResource, #nested complex objects
class LimitedPostResource(Resource):
    document = Post
    related_resources = {
        'content': ContentResource,
    }

src/f/l/Flask-MongoRest-0.1.1/flask_mongorest/views.py   Flask-MongoRest(Download)
from werkzeug.routing import NotFound
from werkzeug.exceptions import Unauthorized
from flask.ext.mongorest.resources import Resource
from flask.ext.mongorest.utils import MongoEncoder
from flask.ext.mongorest.exceptions import ValidationError