Fix URL patterns

The URL patterns was deprecated in ~1.8, and this style has been
removed from the Horizon codebase.

Change-Id: I2ee7ff310a6b9d5c339fd5b2e9143d0ac72278ca
This commit is contained in:
Jacky Hu 2017-07-13 08:40:01 +08:00
parent de0c5b964d
commit 6c60245c29
2 changed files with 11 additions and 15 deletions

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from .views import DetailView # noqa
@ -22,15 +21,14 @@ from .views import UpdateView # noqa
INSTANCES = r'^(?P<loadbalancer_id>[^/]+)/%s$'
VIEW_MOD = 'openstack_dashboard.dashboards.project.loadbalancersv2.views'
urlpatterns = patterns(VIEW_MOD,
url(r'^$', IndexView.as_view(), name='index'),
url(r'^launch$',
LaunchLoadBalancerView.as_view(), name='launch'),
url(r'^(?P<loadbalancer_id>[^/]+)/$',
DetailView.as_view(), name='detail'),
url(INSTANCES %
'update', UpdateView.as_view(), name='update'),
)
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
url(r'^launch$',
LaunchLoadBalancerView.as_view(), name='launch'),
url(r'^(?P<loadbalancer_id>[^/]+)/$',
DetailView.as_view(), name='detail'),
url(INSTANCES %
'update', UpdateView.as_view(), name='update'),
]

View File

@ -12,13 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from octavia_dashboard.dashboards.project.ngloadbalancersv2 import views
urlpatterns = patterns(
'octavia_dashboard.dashboards.project.ngloadbalancersv2.views',
urlpatterns = [
url('', views.IndexView.as_view(), name='index'),
)
]