Revision 5f2072f4 snf-pithos-app/pithos/api/urls.py
b/snf-pithos-app/pithos/api/urls.py | ||
---|---|---|
35 | 35 |
from django.conf.urls.defaults import include, patterns |
36 | 36 |
from snf_django.lib.api.proxy import proxy |
37 | 37 |
from snf_django.lib.api.utils import prefix_pattern |
38 |
from snf_django.lib.api.urls import api_patterns |
|
38 | 39 |
from pithos.api.settings import ( |
39 | 40 |
BASE_PATH, ASTAKOS_BASE_URL, BASE_ASTAKOS_PROXY_PATH, |
40 | 41 |
ASTAKOS_ACCOUNTS_PREFIX, PROXY_USER_SERVICES, |
... | ... | |
43 | 44 |
|
44 | 45 |
|
45 | 46 |
# TODO: This only works when in this order. |
46 |
pithos_api_patterns = patterns( |
|
47 |
pithos_api_patterns = api_patterns(
|
|
47 | 48 |
'pithos.api.functions', |
48 | 49 |
(r'^$', 'top_demux'), |
49 | 50 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/(?P<v_object>.+?)$', |
... | ... | |
67 | 68 |
if PROXY_USER_SERVICES: |
68 | 69 |
astakos_proxy = partial(proxy, proxy_base=BASE_ASTAKOS_PROXY_PATH, |
69 | 70 |
target_base=ASTAKOS_BASE_URL) |
70 |
|
|
71 |
proxy_patterns = patterns( |
|
71 |
|
|
72 |
proxy_patterns = api_patterns(
|
|
72 | 73 |
'', |
73 | 74 |
(r'^login/?$', astakos_proxy), |
74 | 75 |
(r'^feedback/?$', astakos_proxy), |
Also available in: Unified diff