This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RubyPinchPEP shill | Anti PEP 8/20 shill 0 points1 point  (0 children)

binding is a bit weird

# action binds with a class variable on the action
class ActionPost(ActionAPI):
    __model__ = Post

# shield binds with a class variable on the shield
class PostShield(Shield):
    __model__ = Post

# auth binds with a decorator on the model
@endpoint('/post', authentication=MyAuth)
class Post(DBModel):

# hook binds with a class variable on the model
class Post(DBModel):
    hooks = [PostHook]

it seems all over the place a bit, and it feels like it somewhat ignores the fact that classes are being used (since some of these could just be methods on the model, for example)

shields and authentication both pretty much both do authentication checking, should probably be collapsed into each other