Revision 347b2ba1 snf-cyclades-app/synnefo/app_settings/urls.py
b/snf-cyclades-app/synnefo/app_settings/urls.py | ||
---|---|---|
35 | 35 |
from django.conf import settings |
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.utils.urls import extend_with_root_redirects |
|
38 |
from snf_django.utils.urls import \ |
|
39 |
extend_with_root_redirects, extend_endpoint_with_slash |
|
39 | 40 |
from snf_django.lib.api.urls import api_patterns |
40 | 41 |
from synnefo.cyclades_settings import ( |
41 | 42 |
BASE_URL, BASE_HOST, BASE_PATH, COMPUTE_PREFIX, VMAPI_PREFIX, |
... | ... | |
47 | 48 |
from functools import partial |
48 | 49 |
|
49 | 50 |
|
51 |
urlpatterns = [] |
|
52 |
|
|
53 |
# Redirects should be first, otherwise they may get overridden by wildcards |
|
54 |
extend_endpoint_with_slash(urlpatterns, cyclades_services, 'cyclades_ui') |
|
55 |
extend_endpoint_with_slash(urlpatterns, cyclades_services, 'cyclades_helpdesk') |
|
56 |
extend_endpoint_with_slash(urlpatterns, cyclades_services, 'admin') |
|
57 |
extend_endpoint_with_slash(urlpatterns, cyclades_services, 'cyclades_userdata') |
|
58 |
|
|
50 | 59 |
astakos_proxy = partial(proxy, proxy_base=BASE_ASTAKOS_PROXY_PATH, |
51 | 60 |
target_base=ASTAKOS_BASE_URL) |
52 | 61 |
|
... | ... | |
63 | 72 |
(prefix_pattern(HELPDESK_PREFIX), include('synnefo.helpdesk.urls')), |
64 | 73 |
) |
65 | 74 |
|
66 |
urlpatterns = patterns( |
|
75 |
urlpatterns += patterns(
|
|
67 | 76 |
'', |
68 | 77 |
(prefix_pattern(BASE_PATH), include(cyclades_patterns)), |
69 | 78 |
) |
Also available in: Unified diff