From 11271ebc314c86f6fa720616ce870b4d51c371f5 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 30 Nov 2012 22:01:25 -0600 Subject: [PATCH] app: Cleaned up imports and fixed Request.blank docstring --- src/milla/__init__.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/milla/__init__.py b/src/milla/__init__.py index 7442e2a..29eb958 100644 --- a/src/milla/__init__.py +++ b/src/milla/__init__.py @@ -1,11 +1,11 @@ # Copyright 2011 Dustin C. Hatch -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,12 +15,12 @@ ''' -from app import * +from milla.app import * +from milla.auth.decorators import * from webob.exc import * -from webob.request import * -from webob.response import * -from auth.decorators import * +import webob import urllib +import urlparse def allow(*methods): '''Specify the allowed HTTP verbs for a controller callable @@ -38,20 +38,26 @@ def allow(*methods): return wrapper -class Response(Response): +class Response(webob.Response): ''':py:class:`WebOb Response ` with minor tweaks ''' -class Request(Request): +class Request(webob.Request): ''':py:class:`WebOb Request ` with minor tweaks ''' ResponseClass = Response - + @classmethod - def blank(cls, *args, **kwargs): - req = super(Request, cls).blank(*args, **kwargs) + def blank(cls, path, *args, **kwargs): + '''Create a simple request for the specified path + + See :py:meth:`webob.Request.blank ` + for information on other arguments and keywords + ''' + + req = super(Request, cls).blank(path, *args, **kwargs) req.config = {} return req