Add a blank config dictionary to blank Requests

master
hg 2012-11-28 11:54:41 -06:00
parent a89e2396db
commit fe54d0a666
1 changed files with 7 additions and 2 deletions

View File

@ -21,7 +21,6 @@ from webob.request import *
from webob.response import * from webob.response import *
from auth.decorators 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
@ -49,9 +48,15 @@ class Request(Request):
''' '''
ResponseClass = Response ResponseClass = Response
@classmethod
def blank(cls, *args, **kwargs):
req = super(Request, cls).blank(*args, **kwargs)
req.config = {}
return req
def relative_url(self, other_url, to_application=True, path_only=True, def relative_url(self, other_url, to_application=True, path_only=True,
**vars): **vars): #@ReservedAssignment
'''Create a new URL relative to the request URL '''Create a new URL relative to the request URL
:param other_url: relative path to join with the request URL :param other_url: relative path to join with the request URL