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.exc import *
from webob.request import * import webob
from webob.response import *
from auth.decorators import *
import urllib import urllib
import urlparse
def allow(*methods): def allow(*methods):
'''Specify the allowed HTTP verbs for a controller callable '''Specify the allowed HTTP verbs for a controller callable
@ -38,20 +38,26 @@ def allow(*methods):
return wrapper return wrapper
class Response(Response): class Response(webob.Response):
''':py:class:`WebOb Response <webob.response.Response>` with minor tweaks ''':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 ''':py:class:`WebOb Request <webob.request.BaseRequest>` with minor tweaks
''' '''
ResponseClass = Response ResponseClass = Response
@classmethod @classmethod
def blank(cls, *args, **kwargs): def blank(cls, path, *args, **kwargs):
req = super(Request, cls).blank(*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 = {} req.config = {}
return req return req