コード例 #1
0
 def page(category, name, location):
     get_params = {}
     get_params.update(request.args)
     try:
         return hub.page(category,
                         name,
                         location,
                         get_params,
                         user=ularch_auth.get_user(session))
     except CouldNotResolveLocationError:
         abort(404)
コード例 #2
0
 def page(category, name, location):
     try:
         get_params = {}
         get_params.update(request.params)
         return hub.page(category,
                         name,
                         location,
                         get_params,
                         user=ularch_auth.get_user(get_session()))
     except CouldNotResolveLocationError:
         response.status = 404
         return 'Page at {0} not found'.format(location)
コード例 #3
0
def page(request, category, name, location):
    try:
        get_params = {}
        get_params.update(request.GET)
        return HttpResponse(
            hub.page(category,
                     name,
                     location,
                     get_params,
                     user=ularch_auth.get_user(request.session)))
    except CouldNotResolveLocationError:
        raise Http404
コード例 #4
0
 def root_page(category=None, name=None):
     get_params = {}
     get_params.update(request.args)
     if category is None or name is None:
         return redirect('/pages/main/larchapp')
     try:
         return hub.page(category,
                         name,
                         '',
                         get_params,
                         user=ularch_auth.get_user(session))
     except CouldNotResolveLocationError:
         abort(404)