Revision e646ebe5 helpers.py
b/helpers.py | ||
---|---|---|
8 | 8 |
|
9 | 9 |
_accept_re = re.compile(r'([^\s;,]+)(?:[^,]*?;\s*q=(\d*(?:\.\d+)?))?') |
10 | 10 |
|
11 |
|
|
11 | 12 |
def parse_accept_header(value): |
12 | 13 |
"""Parse an HTTP Accept header |
13 | 14 |
|
... | ... | |
30 | 31 |
|
31 | 32 |
return result |
32 | 33 |
|
34 |
|
|
33 | 35 |
def url_with_format(regex, *args, **kwargs): |
34 | 36 |
""" |
35 | 37 |
An extended url() that adds an .json/.xml suffix to the end to avoid DRY |
Also available in: Unified diff