|
17 | 17 |
|
18 | 18 | from __future__ import unicode_literals |
19 | 19 |
|
20 | | -from django.conf.urls import url, include, handler404, handler500 # noqa |
| 20 | +from django.conf.urls import include, handler404, handler500 # noqa |
21 | 21 | from django.conf import settings |
22 | 22 | from django.contrib import admin |
| 23 | +from django.urls import path |
23 | 24 | from django.views import static |
24 | 25 |
|
25 | 26 | from rest_framework import routers |
|
51 | 52 | admin.autodiscover() |
52 | 53 |
|
53 | 54 | urlpatterns = [ |
54 | | - url(r'^', include('django.contrib.auth.urls')), |
55 | | - url(r'^admin/', admin.site.urls), |
56 | | - url(r'^api/', include(router.urls)), |
57 | | - url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), # noqa |
58 | | - url(r'^', include('util.urls', namespace='util')), |
59 | | - url(r'^reports/', include('reports.urls', namespace='reports')), |
60 | | - url(r'^hosts/', include('hosts.urls', namespace='hosts')), |
61 | | - url(r'^packages/', include('packages.urls', namespace='packages')), |
62 | | - url(r'^repos/', include('repos.urls', namespace='repos')), |
63 | | - url(r'^os/', include('operatingsystems.urls', namespace='operatingsystems')), # noqa |
| 55 | + path('', include('django.contrib.auth.urls')), |
| 56 | + path('admin/', admin.site.urls), |
| 57 | + path('api/', include(router.urls)), |
| 58 | + path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), # noqa |
| 59 | + path('', include('util.urls', namespace='util')), |
| 60 | + path('reports/', include('reports.urls', namespace='reports')), |
| 61 | + path('hosts/', include('hosts.urls', namespace='hosts')), |
| 62 | + path('packages/', include('packages.urls', namespace='packages')), |
| 63 | + path('repos/', include('repos.urls', namespace='repos')), |
| 64 | + path('os/', include('operatingsystems.urls', namespace='operatingsystems')), # noqa |
64 | 65 | ] |
65 | 66 |
|
66 | 67 | if settings.DEBUG: |
67 | | - urlpatterns += [url(r'^static/(?P<path>.*)$', static.serve)] |
| 68 | + urlpatterns += [path('static/<str:path>', static.serve)] |
0 commit comments