コード例 #1
0
ファイル: recipe.py プロジェクト: chancejiang/tiddlyweb
def get(environ, start_response):
    """
    Get the representation of a recipe, based on the
    requested serialization. Will usually show the list
    of bags and filters that make up the recipe.
    """
    recipe = _determine_recipe(environ)
    recipe.policy.allows(environ['tiddlyweb.usersign'], 'read')
    return send_entity(environ, start_response, recipe)
コード例 #2
0
def get(environ, start_response):
    """
    Get the representation of a recipe, based on the
    requested serialization. Will usually show the list
    of bags and filters that make up the recipe.
    """
    recipe = _determine_recipe(environ)
    recipe.policy.allows(environ['tiddlyweb.usersign'], 'read')
    return send_entity(environ, start_response, recipe)
コード例 #3
0
ファイル: bag.py プロジェクト: tup/tiddlyweb
def get(environ, start_response):
    """
    Get a representation in some serialization of
    a bag (the bag itself not the tiddlers within).
    """
    bag_name = web.get_route_value(environ, 'bag_name')
    bag_name = web.handle_extension(environ, bag_name)
    bag = _get_bag(environ, bag_name)

    bag.policy.allows(environ['tiddlyweb.usersign'], 'manage')

    return send_entity(environ, start_response, bag)
コード例 #4
0
ファイル: bag.py プロジェクト: jdlrobson/tiddlyweb
def get(environ, start_response):
    """
    Get a representation in some serialization of
    a bag (the bag itself not the tiddlers within).
    """
    bag_name = _determine_bag_name(environ)
    bag_name = web.handle_extension(environ, bag_name)
    bag = _get_bag(environ, bag_name)

    bag.policy.allows(environ["tiddlyweb.usersign"], "manage")

    return send_entity(environ, start_response, bag)
コード例 #5
0
ファイル: bag.py プロジェクト: funkyeah/tiddlyweb
def get(environ, start_response):
    """
    Get a representation in some serialization of
    a bag (the bag itself not the tiddlers within).
    """
    bag_name = web.get_route_value(environ, 'bag_name')
    bag_name = web.handle_extension(environ, bag_name)
    bag = _get_bag(environ, bag_name)

    bag.policy.allows(environ['tiddlyweb.usersign'], 'manage')

    return send_entity(environ, start_response, bag)
コード例 #6
0
ファイル: recipe.py プロジェクト: 24king/tiddlyweb
def get(environ, start_response):
    """
    Handle ``GET`` on a single recipe URI.

    Get a representation in some serialization determined by
    :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`recipe
    <tiddlyweb.model.recipe.Recipe>` (just the recipe itself,
    not the tiddlers it can produce).
    """
    recipe = _determine_recipe(environ)
    recipe.policy.allows(environ['tiddlyweb.usersign'], 'read')
    return send_entity(environ, start_response, recipe)
コード例 #7
0
def get(environ, start_response):
    """
    Handle ``GET`` on a single recipe URI.

    Get a representation in some serialization determined by
    :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`recipe
    <tiddlyweb.model.recipe.Recipe>` (just the recipe itself,
    not the tiddlers it can produce).
    """
    recipe = _determine_recipe(environ)
    recipe.policy.allows(environ['tiddlyweb.usersign'], 'read')
    return send_entity(environ, start_response, recipe)
コード例 #8
0
def get(environ, start_response):
    """
    Handle ``GET`` on a single bag URI.

    Get a representation in some serialization determined by
    :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`bag
    <tiddlyweb.model.bag.Bag>` (the bag itself, not the tiddlers within).
    """
    bag_name = web.get_route_value(environ, 'bag_name')
    bag_name = web.handle_extension(environ, bag_name)
    bag = _get_bag(environ, bag_name)

    bag.policy.allows(environ['tiddlyweb.usersign'], 'manage')

    return send_entity(environ, start_response, bag)
コード例 #9
0
ファイル: bag.py プロジェクト: 24king/tiddlyweb
def get(environ, start_response):
    """
    Handle ``GET`` on a single bag URI.

    Get a representation in some serialization determined by
    :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`bag
    <tiddlyweb.model.bag.Bag>` (the bag itself, not the tiddlers within).
    """
    bag_name = web.get_route_value(environ, 'bag_name')
    bag_name = web.handle_extension(environ, bag_name)
    bag = _get_bag(environ, bag_name)

    bag.policy.allows(environ['tiddlyweb.usersign'], 'manage')

    return send_entity(environ, start_response, bag)