Add show_if and hide_if methods for routes and APIs, as well as proper comparison of feature values
This commit is contained in:
parent
0abbf042dd
commit
4f4112b18d
5 changed files with 71 additions and 5 deletions
|
@ -9,7 +9,7 @@ from flask.ext.principal import identity_changed, AnonymousIdentity
|
|||
from app import app
|
||||
from endpoints.api import (ApiResource, nickname, resource, validate_json_request, request_error,
|
||||
log_action, internal_only, NotFound, require_user_admin,
|
||||
InvalidToken, require_scope, format_date)
|
||||
InvalidToken, require_scope, format_date, hide_if, show_if)
|
||||
from endpoints.api.subscribe import subscribe
|
||||
from endpoints.common import common_login
|
||||
from data import model
|
||||
|
@ -22,6 +22,7 @@ from util.gravatar import compute_hash
|
|||
from util.email import (send_confirmation_email, send_recovery_email,
|
||||
send_change_email)
|
||||
|
||||
import features
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
Reference in a new issue