app: Cleaned up imports and fixed Request.blank docstring

master
Dustin C. Hatch 2012-11-30 22:01:25 -06:00
parent 47103b76a4
commit 11271ebc31
1 changed files with 18 additions and 12 deletions

View File

@ -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 <webob.response.Response>` with minor tweaks
'''
class Request(Request):
class Request(webob.Request):
''':py:class:`WebOb Request <webob.request.BaseRequest>` 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 <webob.request.BaseRequest.blank>`
for information on other arguments and keywords
'''
req = super(Request, cls).blank(path, *args, **kwargs)
req.config = {}
return req